@ -18,7 +18,7 @@ include(imported)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # C M a k e o p t i o n s o f s t o r m
# # C M a k e o p t i o n s o f S t o r m
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
option ( STORM_DEVELOPER "Sets whether the development mode is used." OFF )
@ -44,7 +44,7 @@ option(STORM_COMPILE_WITH_CCACHE "Compile using CCache [if found]" ON)
mark_as_advanced ( STORM_COMPILE_WITH_CCACHE )
option ( STORM_LOG_DISABLE_DEBUG "Disable log and trace message support" OFF )
option ( STORM_USE_CLN_NUMBERS "Sets whether CLN or GMP numbers should be used" ON )
option ( BUILD_SHARED_LIBS "Build the s torm library dynamically" OFF )
option ( BUILD_SHARED_LIBS "Build the S torm library dynamically" OFF )
set ( BOOST_ROOT "" CACHE STRING "A hint to the root directory of Boost (optional)." )
set ( GUROBI_ROOT "" CACHE STRING "A hint to the root directory of Gurobi (optional)." )
set ( Z3_ROOT "" CACHE STRING "A hint to the root directory of Z3 (optional)." )
@ -55,11 +55,6 @@ set(ADDITIONAL_LINK_DIRS "" CACHE STRING "Additional directories added to the li
set ( USE_XERCESC ${ XML_SUPPORT } )
mark_as_advanced ( USE_XERCESC )
# S e t s t h e s o u r c e f r o m w h i c h s t o r m i s o b t a i n e d . C a n b e e i t h e r " g i t " o r " a r c h i v e " . T h i s
# i n f l u e n c e s , a m o n g o t h e r t h i n g s , t h e v e r s i o n i n f o r m a t i o n .
set ( STORM_SOURCE "git" CACHE STRING "The source from which storm is obtained: either 'git' or 'archive'." )
mark_as_advanced ( STORM_SOURCE )
# S e t s o m e C M A K E V a r i a b l e s a s a d v a n c e d
mark_as_advanced ( CMAKE_OSX_ARCHITECTURES )
mark_as_advanced ( CMAKE_OSX_SYSROOT )
@ -72,7 +67,7 @@ set(LIB_INSTALL_DIR lib/ CACHE PATH "Installation directory for libraries")
set ( BIN_INSTALL_DIR lib/ CACHE PATH "Installation directory for executables" )
# I n s t a l l d i r f o r c m a k e files ( info for other libraries that include s torm)
# I n s t a l l d i r f o r c m a k e files ( info for other libraries that include S torm)
set ( DEF_INSTALL_CMAKE_DIR "lib/CMake/storm" )
set ( CMAKE_INSTALL_DIR ${ DEF_INSTALL_CMAKE_DIR } CACHE PATH "Installation directory for CMake files" )
@ -91,17 +86,17 @@ else()
endif ( )
endif ( )
message ( STATUS "s torm - Building ${CMAKE_BUILD_TYPE} version." )
message ( STATUS "S torm - Building ${CMAKE_BUILD_TYPE} version." )
if ( STORM_COMPILE_WITH_CCACHE )
find_program ( CCACHE_FOUND ccache )
mark_as_advanced ( CCACHE_FOUND )
if ( CCACHE_FOUND )
message ( STATUS "s torm - Using ccache" )
message ( STATUS "S torm - Using ccache" )
set_property ( GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache )
set_property ( GLOBAL PROPERTY RULE_LAUNCH_LINK ccache )
else ( )
message ( STATUS "s torm - Could not find ccache." )
message ( STATUS "S torm - Could not find ccache." )
endif ( )
endif ( )
@ -127,7 +122,7 @@ else()
set ( OPERATING_SYSTEM "Linux" )
set ( LINUX 1 )
ENDIF ( )
message ( STATUS "s torm - Detected operating system ${OPERATING_SYSTEM}." )
message ( STATUS "S torm - Detected operating system ${OPERATING_SYSTEM}." )
set ( DYNAMIC_EXT ".so" )
set ( STATIC_EXT ".a" )
@ -305,12 +300,12 @@ if ("${CMAKE_GENERATOR}" STREQUAL "Xcode")
endif ( )
# D i s p l a y i n f o r m a t i o n a b o u t b u i l d c o n f i g u r a t i o n .
message ( STATUS "s torm - Using compiler configuration ${STORM_COMPILER_ID} ${STORM_COMPILER_VERSION}." )
message ( STATUS "S torm - Using compiler configuration ${STORM_COMPILER_ID} ${STORM_COMPILER_VERSION}." )
if ( STORM_DEVELOPER )
message ( STATUS "s torm - CXX Flags: ${CMAKE_CXX_FLAGS}" )
message ( STATUS "s torm - CXX Debug Flags: ${CMAKE_CXX_FLAGS_DEBUG}" )
message ( STATUS "s torm - CXX Release Flags: ${CMAKE_CXX_FLAGS_RELEASE}" )
message ( STATUS "s torm - Build type: ${CMAKE_BUILD_TYPE}" )
message ( STATUS "S torm - CXX Flags: ${CMAKE_CXX_FLAGS}" )
message ( STATUS "S torm - CXX Debug Flags: ${CMAKE_CXX_FLAGS_DEBUG}" )
message ( STATUS "S torm - CXX Release Flags: ${CMAKE_CXX_FLAGS_RELEASE}" )
message ( STATUS "S torm - Build type: ${CMAKE_BUILD_TYPE}" )
endif ( )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@ -350,50 +345,41 @@ endif(DOXYGEN_FOUND)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # C M a k e - g e n e r a t e d C o n f i g F i l e f o r s t o r m
# # C M a k e - g e n e r a t e d C o n f i g F i l e f o r S t o r m
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# I f s t o r m i s b u i l t f r o m a n a r c h i v e , w e n e e d t o s k i p t h e v e r s i o n d e t e c t i o n b a s e d o n g i t .
if ( STORM_SOURCE STREQUAL "archive" )
if ( NOT DEFINED STORM_VERSION_MAJOR OR NOT DEFINED STORM_VERSION_MINOR OR NOT DEFINED STORM_VERSION_PATCH )
message ( FATAL_ERROR "storm - building from archive requires setting a version via cmake." )
endif ( )
message ( STATUS "storm - version is ${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_PATCH} (building from archive)." )
set ( STORM_VERSION_COMMITS_AHEAD boost::none )
set ( STORM_VERSION_GIT_HASH boost::none )
# t r y t o o b t a i n t h e c u r r e n t v e r s i o n f r o m g i t .
include ( GetGitRevisionDescription )
get_git_head_revision ( STORM_VERSION_REFSPEC STORM_VERSION_GIT_HASH )
git_describe_checkout ( STORM_GIT_VERSION_STRING )
# p a r s e t h e g i t t a g i n t o v a r i a b l e s
string ( REGEX REPLACE "^([0-9]+)\\..*" "\\1" STORM_VERSION_MAJOR "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" STORM_VERSION_MINOR "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" STORM_VERSION_PATCH "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-([0-9]+)\\-.*" "\\1" STORM_VERSION_COMMITS_AHEAD "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+\\-([a-z0-9]+).*" "\\1" STORM_VERSION_TAG_HASH "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+\\-[a-z0-9]+\\-(.*)" "\\1" STORM_VERSION_APPENDIX "${STORM_GIT_VERSION_STRING}" )
# n o w c h e c k w h e t h e r t h e g i t v e r s i o n l o o k u p f a i l e d
if ( STORM_VERSION_MAJOR STREQUAL "HEAD-HASH-NOTFOUND" )
set ( STORM_VERSION_MAJOR 1 )
set ( STORM_VERSION_MINOR 0 )
set ( STORM_VERSION_PATCH 0 )
set ( STORM_VERSION_GIT_HASH "" )
set ( STORM_VERSION_COMMITS_AHEAD 0 )
set ( STORM_VERSION_DIRTY boost::none )
else ( )
if ( DEFINED STORM_VERSION_MAJOR OR DEFINED STORM_VERSION_MINOR OR DEFINED STORM_VERSION_PATCH )
message ( FATAL_ERROR "storm - building from git does not support setting a version via cmake." )
endif ( )
# M a k e a v e r s i o n f i l e c o n t a i n i n g t h e c u r r e n t v e r s i o n f r o m g i t .
include ( GetGitRevisionDescription )
get_git_head_revision ( STORM_VERSION_REFSPEC STORM_VERSION_GIT_HASH )
git_describe_checkout ( STORM_GIT_VERSION_STRING )
# P a r s e t h e g i t T a g i n t o v a r i a b l e s
string ( REGEX REPLACE "^([0-9]+)\\..*" "\\1" STORM_VERSION_MAJOR "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" STORM_VERSION_MINOR "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" STORM_VERSION_PATCH "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-([0-9]+)\\-.*" "\\1" STORM_VERSION_COMMITS_AHEAD "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+\\-([a-z0-9]+).*" "\\1" STORM_VERSION_TAG_HASH "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+\\-[a-z0-9]+\\-(.*)" "\\1" STORM_VERSION_APPENDIX "${STORM_GIT_VERSION_STRING}" )
message ( WARN "Storm - git version information not available." )
message ( STATUS "Storm - version is ${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_PATCH}." )
else ( )
if ( "${STORM_VERSION_APPENDIX}" MATCHES "^.*dirty.*$" )
set ( STORM_VERSION_DIRTY 1 )
else ( )
set ( STORM_VERSION_DIRTY 0 )
endif ( )
if ( STORM_VERSION_DIRTY )
set ( STORM_VERSION_DIRTY_STR "yes" )
set ( STORM_VERSION_DIRTY "true" )
else ( )
set ( STORM_VERSION_DIRTY_STR "no " )
set ( STORM_VERSION_DIRTY "false" )
endif ( )
message ( STATUS "storm - version is ${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_PATCH} (${STORM_VERSION_COMMITS_AHEAD} commits ahead of tag), building from git: ${STORM_VERSION_GIT_HASH} (dirty: ${STORM_VERSION_DIRTY_STR})." )
# p r o p e r t y p e c o n v e r s i o n s o w e c a n a s s i g n i t t o a n o p t i o n a l
set ( STORM_VERSION_GIT_HASH "std::string(\" ${ STORM_VERSION_GIT_HASH } \")")
message ( STATUS "Storm - version is ${STORM_VERSION_MAJOR}.${STORM_VERSION_MINOR}.${STORM_VERSION_PATCH} (${STORM_VERSION_COMMITS_AHEAD} commits ahead of tag), building from git: ${STORM_VERSION_GIT_HASH} (dirty: ${STORM_VERSION_DIRTY})." )
endif ( )
# C o n f i g u r e a h e a d e r f i l e t o p a s s s o m e o f t h e C M a k e s e t t i n g s t o t h e s o u r c e c o d e
@ -402,7 +388,7 @@ configure_file (
" $ { P R O J E C T _ B I N A R Y _ D I R } / i n c l u d e / s t o r m - c o n f i g . h "
)
# C o n f i g u r e a s o u r c e f i l e t o p a s s t h e s t o r m v e r s i o n t o t h e s o u r c e c o d e
# C o n f i g u r e a s o u r c e f i l e t o p a s s t h e S t o r m v e r s i o n t o t h e s o u r c e c o d e
configure_file (
" $ { P R O J E C T _ S O U R C E _ D I R } / s t o r m - v e r s i o n . c p p . i n "
" $ { P R O J E C T _ S O U R C E _ D I R } / s r c / s t o r m / u t i l i t y / s t o r m - v e r s i o n . c p p "