From 53e9179722e610074d6b0e0652bdd0bf227c1ec8 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Thu, 30 Aug 2018 14:06:40 +0200 Subject: [PATCH] CMake more stable in case z3 version is not obtained --- resources/3rdparty/CMakeLists.txt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt index 18a68a23f..f52ae7f3d 100644 --- a/resources/3rdparty/CMakeLists.txt +++ b/resources/3rdparty/CMakeLists.txt @@ -169,12 +169,17 @@ else() endif(Z3_FOUND) # split Z3 version into its components -string(REPLACE "." ";" Z3_VERSION_LIST ${Z3_VERSION}) -list(GET Z3_VERSION_LIST 0 STORM_Z3_VERSION_MAJOR) -list(GET Z3_VERSION_LIST 1 STORM_Z3_VERSION_MINOR) -list(GET Z3_VERSION_LIST 2 STORM_Z3_VERSION_PATCH) -if (NOT "${Z3_VERSION}" VERSION_LESS "4.7.1") - set(STORM_Z3_API_USES_STANDARD_INTEGERS ON) +if(Z3_VERSION) + string(REPLACE "." ";" Z3_VERSION_LIST ${Z3_VERSION}) + list(GET Z3_VERSION_LIST 0 STORM_Z3_VERSION_MAJOR) + list(GET Z3_VERSION_LIST 1 STORM_Z3_VERSION_MINOR) + list(GET Z3_VERSION_LIST 2 STORM_Z3_VERSION_PATCH) + if (NOT "${Z3_VERSION}" VERSION_LESS "4.7.1") + set(STORM_Z3_API_USES_STANDARD_INTEGERS ON) + endif() +else() + message(WARNING "Storm - Could not obtain Z3 version. Do you have the binary installed?. Building of Prism/JANI models will not be supported.") + set(Z3_FOUND FALSE) endif() #############################################################