File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -19,15 +19,20 @@ if (USE_Z3)
19
19
find_library (Z3_LIBRARY NAMES z3 )
20
20
find_program (Z3_EXECUTABLE z3 PATH_SUFFIXES bin )
21
21
22
- if (Z3_INCLUDE_DIR AND Z3_LIBRARY AND Z3_EXECUTABLE )
23
- execute_process (COMMAND ${Z3_EXECUTABLE} -version
24
- OUTPUT_VARIABLE libz3_version_str
25
- ERROR_QUIET
26
- OUTPUT_STRIP_TRAILING_WHITESPACE )
22
+ if (Z3_INCLUDE_DIR AND Z3_LIBRARY )
23
+ if (Z3_EXECUTABLE )
24
+ execute_process (COMMAND ${Z3_EXECUTABLE} -version
25
+ OUTPUT_VARIABLE libz3_version_str
26
+ ERROR_QUIET
27
+ OUTPUT_STRIP_TRAILING_WHITESPACE )
27
28
28
- string (REGEX REPLACE "^Z3 version ([0-9.]+).*" "\\ 1"
29
- Z3_VERSION_STRING "${libz3_version_str} " )
30
- unset (libz3_version_str )
29
+ string (REGEX REPLACE "^Z3 version ([0-9.]+).*" "\\ 1"
30
+ Z3_VERSION_STRING "${libz3_version_str} " )
31
+ unset (libz3_version_str )
32
+ else ()
33
+ message (WARNING "Could not determine the version of z3, since the z3 executable was not found." )
34
+ set (Z3_VERSION_STRING "0.0.0" )
35
+ endif ()
31
36
endif ()
32
37
mark_as_advanced (Z3_VERSION_STRING z3_DIR )
33
38
You can’t perform that action at this time.
0 commit comments