Browse Source

remove USE_CARL variable and add option to take hint for carl directory

tempestpy_adaptions
dehnert 7 years ago
parent
commit
75ec21b1d6
  1. 2
      CMakeLists.txt
  2. 38
      resources/3rdparty/CMakeLists.txt

2
CMakeLists.txt

@ -33,7 +33,7 @@ MARK_AS_ADVANCED(STORM_FORCE_POPCNT)
option(USE_BOOST_STATIC_LIBRARIES "Sets whether the Boost libraries should be linked statically." OFF) option(USE_BOOST_STATIC_LIBRARIES "Sets whether the Boost libraries should be linked statically." OFF)
option(STORM_USE_INTELTBB "Sets whether the Intel TBB libraries should be used." OFF) option(STORM_USE_INTELTBB "Sets whether the Intel TBB libraries should be used." OFF)
option(STORM_USE_GUROBI "Sets whether Gurobi should be used." OFF) option(STORM_USE_GUROBI "Sets whether Gurobi should be used." OFF)
set(USE_CARL ON)
set(STORM_CARL_DIR_HINT "" CACHE STRING "A hint where the preferred CArL version can be found. If CArL cannot be found there, it is searched in the OS's default paths.")
option(STORM_FORCE_SHIPPED_CARL "Sets whether the shipped version of carl is to be used no matter whether carl is found or not." OFF) option(STORM_FORCE_SHIPPED_CARL "Sets whether the shipped version of carl is to be used no matter whether carl is found or not." OFF)
MARK_AS_ADVANCED(STORM_FORCE_SHIPPED_CARL) MARK_AS_ADVANCED(STORM_FORCE_SHIPPED_CARL)
option(USE_SMTRAT "Sets whether SMT-RAT should be included." OFF) option(USE_SMTRAT "Sets whether SMT-RAT should be included." OFF)

38
resources/3rdparty/CMakeLists.txt

@ -210,11 +210,15 @@ set(STORM_HAVE_CARL OFF)
set(CARL_MINYEAR 17) set(CARL_MINYEAR 17)
set(CARL_MINMONTH 06) set(CARL_MINMONTH 06)
set(CARL_MINPATCH 0) set(CARL_MINPATCH 0)
if(USE_CARL)
if (NOT STORM_FORCE_SHIPPED_CARL)
if (NOT STORM_FORCE_SHIPPED_CARL)
if (NOT "${STORM_CARL_DIR_HINT}" STREQUAL "")
find_package(carl QUIET PATHS ${STORM_CARL_DIR_HINT} NO_DEFAULT_PATH)
endif()
if (NOT carl_FOUND)
find_package(carl QUIET) find_package(carl QUIET)
endif() endif()
if(carl_FOUND AND NOT STORM_FORCE_SHIPPED_CARL)
endif()
if(carl_FOUND AND NOT STORM_FORCE_SHIPPED_CARL)
get_target_property(carlLOCATION lib_carl LOCATION) get_target_property(carlLOCATION lib_carl LOCATION)
if(${carlLOCATION} STREQUAL "carlLOCATION-NOTFOUND") if(${carlLOCATION} STREQUAL "carlLOCATION-NOTFOUND")
message(SEND_ERROR "Library location for carl is not found, did you build carl?") message(SEND_ERROR "Library location for carl is not found, did you build carl?")
@ -241,8 +245,7 @@ if(USE_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}).") 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}).")
set(STORM_HAVE_CLN ${CARL_USE_CLN_NUMBERS}) set(STORM_HAVE_CLN ${CARL_USE_CLN_NUMBERS})
set(STORM_HAVE_GINAC ${CARL_USE_GINAC}) set(STORM_HAVE_GINAC ${CARL_USE_GINAC})
else()
else()
set(STORM_SHIPPED_CARL ON) set(STORM_SHIPPED_CARL ON)
# The first external project will be built at *configure stage* # The first external project will be built at *configure stage*
message("START CARL CONFIG PROCESS") message("START CARL CONFIG PROCESS")
@ -291,28 +294,23 @@ if(USE_CARL)
message(STATUS "Storm - Linking with shipped carl ${carl_VERSION} (include: ${carl_INCLUDE_DIR}, library ${carl_LIBRARIES}, CARL_USE_CLN_NUMBERS: ${CARL_USE_CLN_NUMBERS}, CARL_USE_GINAC: ${CARL_USE_GINAC}).") message(STATUS "Storm - Linking with shipped carl ${carl_VERSION} (include: ${carl_INCLUDE_DIR}, library ${carl_LIBRARIES}, CARL_USE_CLN_NUMBERS: ${CARL_USE_CLN_NUMBERS}, CARL_USE_GINAC: ${CARL_USE_GINAC}).")
# install the carl dynamic library if we build it
# install the carl dynamic library if we built it
install(FILES ${STORM_3RDPARTY_BINARY_DIR}/carl/lib/libcarl.${carl_VERSION}${DYNAMIC_EXT} DESTINATION lib) install(FILES ${STORM_3RDPARTY_BINARY_DIR}/carl/lib/libcarl.${carl_VERSION}${DYNAMIC_EXT} DESTINATION lib)
endif()
endif()
if(STORM_USE_CLN_RF AND NOT STORM_HAVE_CLN)
if(STORM_USE_CLN_RF AND NOT STORM_HAVE_CLN)
message(FATAL_ERROR "Cannot use CLN numbers if carl is build without.") message(FATAL_ERROR "Cannot use CLN numbers if carl is build without.")
endif()
if(STORM_USE_CLN_RF AND NOT STORM_HAVE_GINAC)
endif()
if(STORM_USE_CLN_RF AND NOT STORM_HAVE_GINAC)
message(FATAL_ERROR "Cannot use CLN numbers if carl is build without ginac.") message(FATAL_ERROR "Cannot use CLN numbers if carl is build without ginac.")
endif()
#The library that needs symbols must be first, then the library that resolves the symbol.
endif()
list(APPEND STORM_DEP_IMP_TARGETS lib_carl)
if(STORM_USE_CLN_EA OR STORM_USE_CLN_RF)
# The library that needs symbols must be first, then the library that resolves the symbol.
list(APPEND STORM_DEP_IMP_TARGETS lib_carl)
if(STORM_USE_CLN_EA OR STORM_USE_CLN_RF)
list(APPEND STORM_DEP_IMP_TARGETS GINAC_SHARED CLN_SHARED) list(APPEND STORM_DEP_IMP_TARGETS GINAC_SHARED CLN_SHARED)
endif()
list(APPEND STORM_DEP_IMP_TARGETS GMPXX_SHARED GMP_SHARED)
endif() endif()
list(APPEND STORM_DEP_IMP_TARGETS GMPXX_SHARED GMP_SHARED)
############################################################# #############################################################

Loading…
Cancel
Save