mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Require Z3 >= 4.6.0
This commit is contained in:
parent
637546850f
commit
4058978b3b
@ -1,8 +1,24 @@
|
|||||||
if (USE_Z3)
|
if (USE_Z3)
|
||||||
find_path(Z3_INCLUDE_DIR NAMES z3++.h PATH_SUFFIXES z3)
|
find_path(Z3_INCLUDE_DIR NAMES z3++.h PATH_SUFFIXES z3)
|
||||||
find_library(Z3_LIBRARY NAMES z3)
|
find_library(Z3_LIBRARY NAMES z3)
|
||||||
|
find_program(Z3_EXECUTABLE z3 PATH_SUFFIXES bin)
|
||||||
|
|
||||||
|
if(Z3_INCLUDE_DIR AND Z3_LIBRARY AND Z3_EXECUTABLE)
|
||||||
|
execute_process (COMMAND ${Z3_EXECUTABLE} -version
|
||||||
|
OUTPUT_VARIABLE libz3_version_str
|
||||||
|
ERROR_QUIET
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
|
string(REGEX REPLACE "^Z3 version ([0-9.]+).*" "\\1"
|
||||||
|
Z3_VERSION_STRING "${libz3_version_str}")
|
||||||
|
unset(libz3_version_str)
|
||||||
|
endif()
|
||||||
|
mark_as_advanced(Z3_VERSION_STRING z3_DIR)
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args(Z3 DEFAULT_MSG Z3_LIBRARY Z3_INCLUDE_DIR)
|
find_package_handle_standard_args(Z3
|
||||||
|
REQUIRED_VARS Z3_LIBRARY Z3_INCLUDE_DIR
|
||||||
|
VERSION_VAR Z3_VERSION_STRING)
|
||||||
|
|
||||||
if (NOT TARGET Z3::Z3)
|
if (NOT TARGET Z3::Z3)
|
||||||
add_library(Z3::Z3 UNKNOWN IMPORTED)
|
add_library(Z3::Z3 UNKNOWN IMPORTED)
|
||||||
|
@ -102,7 +102,7 @@ set(sources
|
|||||||
parsing/Token.h
|
parsing/Token.h
|
||||||
)
|
)
|
||||||
|
|
||||||
find_package(Z3 QUIET)
|
find_package(Z3 4.6.0)
|
||||||
if (${Z3_FOUND})
|
if (${Z3_FOUND})
|
||||||
add_definitions(-DHAVE_Z3)
|
add_definitions(-DHAVE_Z3)
|
||||||
message("Z3 SMT solver found. This enables optional SMT checking with Z3.")
|
message("Z3 SMT solver found. This enables optional SMT checking with Z3.")
|
||||||
|
Loading…
Reference in New Issue
Block a user