From ed2a1dc1de0734e0f827fdfce2ec57e08fbf09ab Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Thu, 27 Apr 2017 23:46:02 +0200 Subject: [PATCH] CMake now ensures that carl is not only configured, but also built and thereby prevents compilation-time errors. --- resources/3rdparty/CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt index 138789c29..17e433ff3 100644 --- a/resources/3rdparty/CMakeLists.txt +++ b/resources/3rdparty/CMakeLists.txt @@ -202,7 +202,15 @@ if(USE_CARL) find_package(carl QUIET) endif() if(carl_FOUND AND NOT STORM_FORCE_SHIPPED_CARL) - set(STORM_SHIPPED_CARL OFF) + get_target_property(carlLOCATION lib_carl LOCATION) + if(${carlLOCATION} STREQUAL "carlLOCATION-NOTFOUND") + message(SEND_ERROR "Library location for carl is not found, did you build carl?") + elseif(EXISTS ${carlLOCATION}) + #empty on purpose + else() + message(SEND_ERROR "File ${carlLOCATION} does not exist, did you build carl?") + endif() + set(STORM_SHIPPED_CARL OFF) set(STORM_HAVE_CARL ON) message(STATUS "Storm - Use system version of carl.") message(STATUS "Storm - Linking with carl ${carl_VERSION} (CARL_USE_CLN_NUMBERS: ${CARL_USE_CLN_NUMBERS}).")