Browse Source

cmake: Workaround for the FATAL_ERROR that occurred whenever building shipped carl was aborted (bypassing github issue #62).

tempestpy_adaptions
Tim Quatmann 4 years ago
parent
commit
d135bc8ecb
  1. 16
      resources/3rdparty/CMakeLists.txt

16
resources/3rdparty/CMakeLists.txt

@ -260,15 +260,27 @@ if (NOT STORM_FORCE_SHIPPED_CARL)
find_package(carl QUIET)
endif()
endif()
set(STORM_SHIPPED_CARL OFF)
if(carl_FOUND AND NOT STORM_FORCE_SHIPPED_CARL)
get_target_property(carlLOCATION lib_carl LOCATION)
if("${carlLOCATION}" STREQUAL "carlLOCATION-NOTFOUND")
if(EXISTS ${STORM_3RDPARTY_BINARY_DIR}/carl)
message(WARNING "Storm - Library for carl location is not found but the directory ${STORM_3RDPARTY_BINARY_DIR}/carl exists. Will (re-)try to build a shipped version of carl.")
set(STORM_SHIPPED_CARL ON)
else()
message(FATAL_ERROR "Library location for carl is not found, did you build carl?")
endif()
elseif(EXISTS ${carlLOCATION})
#empty on purpose
else()
if(EXISTS ${STORM_3RDPARTY_BINARY_DIR}/carl)
message(WARNING "Storm - File ${carlLOCATION} does not exist but the directory ${STORM_3RDPARTY_BINARY_DIR}/carl exists. Will (re-)try to build a shipped version of carl.")
set(STORM_SHIPPED_CARL ON)
else()
message(FATAL_ERROR "File ${carlLOCATION} does not exist, did you build carl?")
endif()
endif()
if("${carl_VERSION_MAJOR}" STREQUAL "${CARL_C14VERSION}")
message(STATUS "Storm - Found carl using master14 branch.")
# empty on purpose. Maybe put a warning here?
@ -276,7 +288,6 @@ if(carl_FOUND AND NOT STORM_FORCE_SHIPPED_CARL)
message(FATAL_ERROR "Carl outdated, require ${CARL_MINVERSION}, have ${carl_VERSION}")
endif()
set(STORM_SHIPPED_CARL OFF)
set(STORM_HAVE_CARL ON)
message(STATUS "Storm - Use system version of carl.")
message(STATUS "Storm - Linking with preinstalled carl ${carl_VERSION} (include: ${carl_INCLUDE_DIR}, library ${carl_LIBRARIES}, CARL_USE_CLN_NUMBERS: ${CARL_USE_CLN_NUMBERS}, CARL_USE_GINAC: ${CARL_USE_GINAC}).")
@ -284,6 +295,9 @@ if(carl_FOUND AND NOT STORM_FORCE_SHIPPED_CARL)
set(STORM_HAVE_GINAC ${CARL_USE_GINAC})
else()
set(STORM_SHIPPED_CARL ON)
endif()
if (STORM_SHIPPED_CARL)
# The first external project will be built at *configure stage*
message(STATUS "Carl - Start of config process")
file(MAKE_DIRECTORY ${STORM_3RDPARTY_BINARY_DIR}/carl_download)

Loading…
Cancel
Save