aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/CMakeLists.txt
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-07-14 03:04:19 +0800
committerchriseth <chris@ethereum.org>2017-08-23 23:37:35 +0800
commitc9cf24458baa77e2a2de1bedbad5040d0d83aab2 (patch)
tree75e1ae7b329c81470d3df39b24c564be9cff9740 /libsolidity/CMakeLists.txt
parentb3f8ed457a10dab36abaef72310a755a95e0753f (diff)
downloaddexon-solidity-c9cf24458baa77e2a2de1bedbad5040d0d83aab2.tar.gz
dexon-solidity-c9cf24458baa77e2a2de1bedbad5040d0d83aab2.tar.zst
dexon-solidity-c9cf24458baa77e2a2de1bedbad5040d0d83aab2.zip
Prepare build system for Z3.
Diffstat (limited to 'libsolidity/CMakeLists.txt')
-rw-r--r--libsolidity/CMakeLists.txt16
1 files changed, 15 insertions, 1 deletions
diff --git a/libsolidity/CMakeLists.txt b/libsolidity/CMakeLists.txt
index a88d16b8..f7c1a390 100644
--- a/libsolidity/CMakeLists.txt
+++ b/libsolidity/CMakeLists.txt
@@ -2,5 +2,19 @@
file(GLOB_RECURSE sources "*.cpp" "../libjulia/*.cpp")
file(GLOB_RECURSE headers "*.h" "../libjulia/*.h")
+find_package(Z3 QUIET)
+if (${Z3_FOUND})
+ include_directories(${Z3_INCLUDE_DIR})
+ add_definitions(-DHAVE_Z3)
+ message("Z3 SMT solver FOUND.")
+else()
+ message("Z3 SMT solver NOT found.")
+ list(REMOVE_ITEM sources "${CMAKE_CURRENT_SOURCE_DIR}/formal/Z3Interface.cpp")
+endif()
+
add_library(solidity ${sources} ${headers})
-target_link_libraries(solidity PUBLIC evmasm devcore z3)
+target_link_libraries(solidity PUBLIC evmasm devcore)
+
+if (${Z3_FOUND})
+ target_link_libraries(solidity PUBLIC ${Z3_LIBRARY})
+endif() \ No newline at end of file