@ -7,13 +7,10 @@ project (storm CXX C)
include_directories ( "${PROJECT_SOURCE_DIR}" )
include_directories ( "${PROJECT_SOURCE_DIR}/src" )
# A d d t h e v e r s i o n o f E i g e n 3 i n t h e r e p o s i t o r y t o t h e i n c l u d e p a t h e s
set ( EIGEN3_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/eigen" )
include_directories ( ${ EIGEN3_INCLUDE_DIR } )
# A d d t h e v e r s i o n o f G M M i n t h e r e p o s i t o r y t o t h e i n c l u d e p a t h e s
set ( GMMXX_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/gmm-5.0/include ")
include_directories ( ${ GMMXX_INCLUDE_DIR } )
# A d d t h e r e s o u r c e s / c m a k e f o l d e r t o M o d u l e S e a r c h P a t h f o r F i n d T B B . c m a k e
set ( CMAKE_MODULE_PATH ${ CMAKE_MODULE_PATH } "${PROJECT_SOURCE_DIR}/resources/cmake/" )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
@ -37,37 +34,6 @@ set(MSAT_ROOT "" CACHE STRING "The root directory of MathSAT (if available).")
set ( ADDITIONAL_INCLUDE_DIRS "" CACHE STRING "Additional directories added to the include directories." )
set ( ADDITIONAL_LINK_DIRS "" CACHE STRING "Additional directories added to the link directories." )
set ( CUSTOM_BOOST_ROOT "" CACHE STRING "A custom path to the Boost root directory." )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # I n c l u s i o n o f r e q u i r e d l i b r a r i e s
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# A d d t h e r e s o u r c e s / c m a k e f o l d e r t o M o d u l e S e a r c h P a t h f o r F i n d T B B . c m a k e
set ( CMAKE_MODULE_PATH ${ CMAKE_MODULE_PATH } "${PROJECT_SOURCE_DIR}/resources/cmake/" )
# B o o s t O p t i o n v a r i a b l e s
set ( Boost_USE_STATIC_LIBS ON )
set ( Boost_USE_MULTITHREADED ON )
set ( Boost_USE_STATIC_RUNTIME OFF )
# I f a c u s t o m b o o s t r o o t d i r e c t o r y w a s s p e c i f i e d , w e s e t t h e c o r r e s p o n d i n g h i n t f o r t h e s c r i p t t o f i n d i t .
if ( CUSTOM_BOOST_ROOT )
message ( STATUS "StoRM - Using Boost from CUSTOM_BOOST_ROOT located at ${CUSTOM_BOOST_ROOT}" )
set ( BOOST_ROOT "${CUSTOM_BOOST_ROOT}" )
endif ( CUSTOM_BOOST_ROOT )
set ( TBB_INSTALL_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/tbb42_20140122_merged-win-lin-mac" )
if ( STORM_PYTHON )
find_package ( Boost REQUIRED COMPONENTS python3 )
else ( )
find_package ( Boost REQUIRED )
endif ( )
find_package ( Doxygen REQUIRED )
find_package ( Gurobi )
find_package ( TBB )
find_package ( Threads REQUIRED )
find_package ( GMP )
find_package ( Z3 QUIET )
# I f t h e D E B U G o p t i o n w a s t u r n e d o n , w e w i l l t a r g e t a d e b u g v e r s i o n a n d a r e l e a s e v e r s i o n o t h e r w i s e .
if ( STORM_DEBUG )
@ -76,48 +42,14 @@ else()
set ( CMAKE_BUILD_TYPE "RELEASE" )
endif ( )
message ( STATUS "StoRM - Building ${CMAKE_BUILD_TYPE} version." )
message ( STATUS "StoRM - CMAKE_BUILD_TYPE (ENV): $ENV{CMAKE_BUILD_TYPE}" )
if ( "${GUROBI_ROOT}" STREQUAL "" AND NOT GUROBI_FOUND )
set ( ENABLE_GUROBI OFF )
else ( )
set ( ENABLE_GUROBI ON )
endif ( )
if ( "${CUDA_ROOT}" STREQUAL "" )
set ( ENABLE_CUDA OFF )
else ( )
set ( ENABLE_CUDA ON )
endif ( )
if ( "${MSAT_ROOT}" STREQUAL "" )
set ( ENABLE_MSAT OFF )
else ( )
set ( ENABLE_MSAT ON )
endif ( )
if ( USE_CARL )
find_package ( carl QUIET )
if ( carl_FOUND )
set ( STORM_HAVE_CARL ON )
endif ( )
# find_package ( smtrat QUIET )
if ( smtrat_FOUND )
set ( STORM_HAVE_SMTRAT ON )
endif ( )
endif ( )
if ( STORM_PYTHON )
set ( Python_ADDITIONAL_VERSIONS 3.4 )
FIND_PACKAGE ( PythonInterp REQUIRED )
FIND_PACKAGE ( PythonLibs 3.4 REQUIRED )
include_directories ( ${ PYTHON_INCLUDE_DIR } )
endif ( )
# B a s e p a t h f o r t e s t f i l e s
set ( STORM_CPP_TESTS_BASE_PATH "${PROJECT_SOURCE_DIR}/test" )
message ( STATUS "StoRM - CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}" )
message ( STATUS "StoRM - CMAKE_BUILD_TYPE (ENV): $ENV{CMAKE_BUILD_TYPE}" )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
@ -200,77 +132,125 @@ message(STATUS "StoRM - Using Compiler Configuration: ${STORM_COMPILED_BY}")
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # 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 n c l u s i o n o f r e q u i r e d l i b r a r i e s
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# 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 )
git_describe_checkout ( STORM_GIT_VERSION_STRING )
message ( STATUS "STORM_GIT_VERSION_STRING: ${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_CPP_VERSION_MAJOR "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" STORM_CPP_VERSION_MINOR "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" STORM_CPP_VERSION_PATCH "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-([0-9]+)\\-.*" "\\1" STORM_CPP_VERSION_COMMITS_AHEAD "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+\\-([a-z0-9]+).*" "\\1" STORM_CPP_VERSION_HASH "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+\\-[a-z0-9]+\\-(.*)" "\\1" STORM_CPP_VERSION_APPENDIX "${STORM_GIT_VERSION_STRING}" )
if ( "${STORM_CPP_VERSION_APPENDIX}" MATCHES "^.*dirty.*$" )
set ( STORM_CPP_VERSION_DIRTY 1 )
else ( )
set ( STORM_CPP_VERSION_DIRTY 0 )
endif ( )
message ( STATUS "StoRM - Version information: ${STORM_CPP_VERSION_MAJOR}.${STORM_CPP_VERSION_MINOR}.${STORM_CPP_VERSION_PATCH} (${STORM_CPP_VERSION_COMMITS_AHEAD} commits ahead of Tag) build from ${STORM_CPP_VERSION_HASH} (Dirty: ${STORM_CPP_VERSION_DIRTY})" )
# B a s e p a t h f o r t e s t f i l e s
set ( STORM_CPP_TESTS_BASE_PATH "${PROJECT_SOURCE_DIR}/test" )
# G u r o b i D e f i n e s
set ( STORM_HAVE_GUROBI ${ ENABLE_GUROBI } )
# A d d t h e v e r s i o n o f E i g e n 3 i n t h e r e p o s i t o r y t o t h e i n c l u d e p a t h e s
set ( EIGEN3_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/eigen" )
include_directories ( ${ EIGEN3_INCLUDE_DIR } )
# C U D A D e f i n e s
if ( ENABLE_CUDA )
set ( STORM_CPP_CUDA_DEF "define" )
# A d d t h e v e r s i o n o f G M M i n t h e r e p o s i t o r y t o t h e i n c l u d e p a t h e s
set ( GMMXX_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/gmm-5.0/include" )
include_directories ( ${ GMMXX_INCLUDE_DIR } )
find_package ( GMP )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # B o o s t
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# B o o s t O p t i o n v a r i a b l e s
set ( Boost_USE_STATIC_LIBS ON )
set ( Boost_USE_MULTITHREADED ON )
set ( Boost_USE_STATIC_RUNTIME OFF )
# I f a c u s t o m b o o s t r o o t d i r e c t o r y w a s s p e c i f i e d , w e s e t t h e c o r r e s p o n d i n g h i n t f o r t h e s c r i p t t o f i n d i t .
if ( CUSTOM_BOOST_ROOT )
message ( STATUS "StoRM - Using Boost from CUSTOM_BOOST_ROOT located at ${CUSTOM_BOOST_ROOT}" )
set ( BOOST_ROOT "${CUSTOM_BOOST_ROOT}" )
endif ( CUSTOM_BOOST_ROOT )
if ( STORM_PYTHON )
find_package ( Boost REQUIRED COMPONENTS python3 )
else ( )
set ( STORM_CPP_CUDA_DEF "undef" )
find_package ( Boost REQUIRED )
endif ( )
# g l p k d e f i n e s
set ( STORM_HAVE_GLPK 1 )
if ( ( NOT Boost_LIBRARY_DIRS ) OR ( "${Boost_LIBRARY_DIRS}" STREQUAL "" ) )
set ( Boost_LIBRARY_DIRS "${Boost_INCLUDE_DIRS}/stage/lib" )
endif ( )
link_directories ( ${ Boost_LIBRARY_DIRS } )
# C U D A D e f i n e s
set ( STORM_CPP_CUDAFORSTORM_DEF "undef" )
include_directories ( ${ Boost_INCLUDE_DIRS } )
list ( APPEND STORM_LINK_LIBRARIES ${ Boost_LIBRARIES } )
# message ( STATUS "BOOST_INCLUDE_DIRS is ${Boost_INCLUDE_DIRS}" )
# message ( STATUS "BOOST_LIBRARY_DIRS is ${Boost_LIBRARY_DIRS}" )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # E x p r T k
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
message ( STATUS "StoRM - Including ExprTk" )
include_directories ( "${PROJECT_SOURCE_DIR}/resources/3rdparty/exprtk" )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # Z3 ( optional )
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
find_package ( Z3 QUIET )
# Z 3 D e f i n e s
set ( STORM_HAVE_Z3 ${ Z3_FOUND } )
# M a t h S A T D e f i n e s
set ( STORM_HAVE_MSAT ${ ENABLE_MSAT } )
if ( STORM_HAVE_Z3 )
message ( STATUS "StoRM - Linking with Z3" )
include_directories ( ${ Z3_INCLUDE_DIRS } )
list ( APPEND STORM_LINK_LIBRARIES ${ Z3_LIBRARIES } )
endif ( STORM_HAVE_Z3 )
# I n t e l T B B D e f i n e s
if ( TBB_FOUND AND STORM_USE_INTELTBB )
set ( STORM_CPP_INTELTBB_DEF "define" )
else ( )
set ( STORM_CPP_INTELTBB_DEF "undef" )
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
configure_file (
" $ { P R O J E C T _ S O U R C E _ D I R } / s t o r m - c o n f i g . h . i n "
" $ { 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 h e a d e r 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 _ B I N A R Y _ D I R } / s r c / u t i l i t y / s t o r m - v e r s i o n . c p p "
)
set ( STORM_GENERATED_SOURCES "${PROJECT_BINARY_DIR}/src/utility/storm-version.cpp" )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # g l p k
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# A d d t h e b i n a r y d i r i n c l u d e d i r e c t o r y f o r s t o r m - c o n f i g . h
include_directories ( "${PROJECT_BINARY_DIR}/include" )
set ( STORM_HAVE_GLPK 1 )
message ( STATUS "StoRM - Linking with glpk" )
add_subdirectory ( "${PROJECT_SOURCE_DIR}/resources/3rdparty/glpk-4.53" )
include_directories ( "${PROJECT_SOURCE_DIR}/resources/3rdparty/glpk-4.53/src" )
list ( APPEND STORM_LINK_LIBRARIES "glpk" )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # Gurobi ( optional )
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
find_package ( Gurobi )
if ( "${GUROBI_ROOT}" STREQUAL "" AND NOT GUROBI_FOUND )
set ( ENABLE_GUROBI OFF )
else ( )
set ( ENABLE_GUROBI ON )
endif ( )
# G u r o b i D e f i n e s
set ( STORM_HAVE_GUROBI ${ ENABLE_GUROBI } )
if ( ENABLE_GUROBI )
if ( NOT GUROBI_FOUND )
message ( FATAL_ERROR "Gurobi was requested, but not found!" )
endif ( )
message ( STATUS "StoRM - Linking with Gurobi (include: ${GUROBI_INCLUDE_DIRS})" )
include_directories ( ${ GUROBI_INCLUDE_DIRS } )
list ( APPEND STORM_LINK_LIBRARIES ${ GUROBI_LIBRARY } )
# link_directories ( "${GUROBI_ROOT}/lib" )
endif ( )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
@ -278,6 +258,25 @@ include_directories("${PROJECT_BINARY_DIR}/include")
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
if ( "${CUDA_ROOT}" STREQUAL "" )
set ( ENABLE_CUDA OFF )
else ( )
set ( ENABLE_CUDA ON )
endif ( )
# C U D A D e f i n e s
if ( ENABLE_CUDA )
set ( STORM_CPP_CUDA_DEF "define" )
else ( )
set ( STORM_CPP_CUDA_DEF "undef" )
endif ( )
# C U D A D e f i n e s
set ( STORM_CPP_CUDAFORSTORM_DEF "undef" )
if ( ENABLE_CUDA )
# T e s t f o r t y p e a l i g n m e n t
@ -384,179 +383,20 @@ if(ENABLE_CUDA)
cuda_add_library ( ${ STORM_CUDA_LIB_NAME }
$ { S T O R M _ C U D A _ K E R N E L _ F I L E S } $ { S T O R M _ C U D A _ H E A D E R _ F I L E S }
)
message ( STATUS "StoRM - Linking with CUDA" )
list ( APPEND STORM_LINK_LIBRARIES ${ STORM_CUDA_LIB_NAME } )
include_directories ( "${PROJECT_SOURCE_DIR}/cuda/kernels/" )
endif ( )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # S o u r c e f i l e a g g r e g a t i o n a n d c l u s t e r i n g
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
file ( GLOB_RECURSE STORM_HEADERS ${ PROJECT_SOURCE_DIR } /src/*.h )
file ( GLOB_RECURSE STORM_HEADERS_CLI ${ PROJECT_SOURCE_DIR } /src/cli/*.h )
file ( GLOB_RECURSE STORM_SOURCES_WITHOUT_MAIN ${ PROJECT_SOURCE_DIR } /src/*/*.cpp )
file ( GLOB_RECURSE STORM_SOURCES_CLI ${ PROJECT_SOURCE_DIR } /src/cli/*.cpp )
file ( GLOB_RECURSE STORM_MAIN_FILE ${ PROJECT_SOURCE_DIR } /src/storm.cpp )
file ( GLOB_RECURSE STORM_PY_SOURCES ${ PROJECT_SOURCE_DIR } /src/python/*.cpp )
file ( GLOB_RECURSE STORM_PY_HEADERS ${ PROJECT_SOURCE_DIR } /src/python/*.h )
file ( GLOB_RECURSE STORM_ADAPTERS_FILES ${ PROJECT_SOURCE_DIR } /src/adapters/*.h ${ PROJECT_SOURCE_DIR } /src/adapters/*.cpp )
file ( GLOB_RECURSE STORM_BUILDER_FILES ${ PROJECT_SOURCE_DIR } /src/builder/*.h ${ PROJECT_SOURCE_DIR } /src/builder/*.cpp )
file ( GLOB_RECURSE STORM_CLI_FILES ${ PROJECT_SOURCE_DIR } /src/cli/*.h ${ PROJECT_SOURCE_DIR } /src/cli/*.cpp )
file ( GLOB_RECURSE STORM_EXCEPTIONS_FILES ${ PROJECT_SOURCE_DIR } /src/exceptions/*.h ${ PROJECT_SOURCE_DIR } /src/exceptions/*.cpp )
file ( GLOB_RECURSE STORM_LOGIC_FILES ${ PROJECT_SOURCE_DIR } /src/logic/*.h ${ PROJECT_SOURCE_DIR } /src/logic/*.cpp )
file ( GLOB STORM_MODELCHECKER_FILES ${ PROJECT_SOURCE_DIR } /src/modelchecker/*.h ${ PROJECT_SOURCE_DIR } /src/modelchecker/*.cpp )
file ( GLOB STORM_MODELCHECKER_PRCTL_FILES ${ PROJECT_SOURCE_DIR } /src/modelchecker/prctl/*.h ${ PROJECT_SOURCE_DIR } /src/modelchecker/prctl/*.cpp )
file ( GLOB_RECURSE STORM_MODELCHECKER_PRCTL_HELPER_FILES ${ PROJECT_SOURCE_DIR } /src/modelchecker/prctl/helper/*.h ${ PROJECT_SOURCE_DIR } /src/modelchecker/prctl/helper/*.cpp )
file ( GLOB STORM_MODELCHECKER_CSL_FILES ${ PROJECT_SOURCE_DIR } /src/modelchecker/csl/*.h ${ PROJECT_SOURCE_DIR } /src/modelchecker/csl/*.cpp )
file ( GLOB_RECURSE STORM_MODELCHECKER_CSL_HELPER_FILES ${ PROJECT_SOURCE_DIR } /src/modelchecker/csl/helper/*.h ${ PROJECT_SOURCE_DIR } /src/modelchecker/csl/helper/*.cpp )
file ( GLOB_RECURSE STORM_MODELCHECKER_REACHABILITY_FILES ${ PROJECT_SOURCE_DIR } /src/modelchecker/reachability/*.h ${ PROJECT_SOURCE_DIR } /src/modelchecker/reachability/*.cpp )
file ( GLOB_RECURSE STORM_MODELCHECKER_PROPOSITIONAL_FILES ${ PROJECT_SOURCE_DIR } /src/modelchecker/propositional/*.h ${ PROJECT_SOURCE_DIR } /src/modelchecker/propositional/*.cpp )
file ( GLOB_RECURSE STORM_MODELCHECKER_RESULTS_FILES ${ PROJECT_SOURCE_DIR } /src/modelchecker/results/*.h ${ PROJECT_SOURCE_DIR } /src/modelchecker/results/*.cpp )
file ( GLOB_RECURSE STORM_COUNTEREXAMPLES_FILES ${ PROJECT_SOURCE_DIR } /src/counterexamples/*.h ${ PROJECT_SOURCE_DIR } /src/counterexamples/*.cpp )
file ( GLOB_RECURSE STORM_PERMISSIVESCHEDULER_FILES ${ PROJECT_SOURCE_DIR } /src/permissivesched/*.h ${ PROJECT_SOURCE_DIR } /src/permissivesched/*.cpp )
file ( GLOB STORM_MODELS_FILES ${ PROJECT_SOURCE_DIR } /src/models/*.h ${ PROJECT_SOURCE_DIR } /src/models/*.cpp )
file ( GLOB_RECURSE STORM_MODELS_SPARSE_FILES ${ PROJECT_SOURCE_DIR } /src/models/sparse/*.h ${ PROJECT_SOURCE_DIR } /src/models/sparse/*.cpp )
file ( GLOB_RECURSE STORM_MODELS_SYMBOLIC_FILES ${ PROJECT_SOURCE_DIR } /src/models/symbolic/*.h ${ PROJECT_SOURCE_DIR } /src/models/symbolic/*.cpp )
file ( GLOB STORM_PARSER_FILES ${ PROJECT_SOURCE_DIR } /src/parser/*.h ${ PROJECT_SOURCE_DIR } /src/parser/*.cpp )
file ( GLOB_RECURSE STORM_PARSER_PRISMPARSER_FILES ${ PROJECT_SOURCE_DIR } /src/parser/prismparser/*.h ${ PROJECT_SOURCE_DIR } /src/parser/prismparser/*.cpp )
file ( GLOB STORM_SETTINGS_FILES ${ PROJECT_SOURCE_DIR } /src/settings/*.h ${ PROJECT_SOURCE_DIR } /src/settings/*.cpp )
file ( GLOB STORM_SETTINGS_MODULES_FILES ${ PROJECT_SOURCE_DIR } /src/settings/modules/*.h ${ PROJECT_SOURCE_DIR } /src/settings/modules/*.cpp )
file ( GLOB_RECURSE STORM_SOLVER_FILES ${ PROJECT_SOURCE_DIR } /src/solver/*.h ${ PROJECT_SOURCE_DIR } /src/solver/*.cpp )
file ( GLOB STORM_STORAGE_FILES ${ PROJECT_SOURCE_DIR } /src/storage/*.h ${ PROJECT_SOURCE_DIR } /src/storage/*.cpp )
file ( GLOB_RECURSE STORM_STORAGE_DD_FILES ${ PROJECT_SOURCE_DIR } /src/storage/dd/*.h ${ PROJECT_SOURCE_DIR } /src/storage/dd/*.cpp )
file ( GLOB_RECURSE STORM_STORAGE_EXPRESSIONS_FILES ${ PROJECT_SOURCE_DIR } /src/storage/expressions/*.h ${ PROJECT_SOURCE_DIR } /src/storage/expressions/*.cpp )
file ( GLOB_RECURSE STORM_STORAGE_PRISM_FILES ${ PROJECT_SOURCE_DIR } /src/storage/prism/*.h ${ PROJECT_SOURCE_DIR } /src/storage/prism/*.cpp )
file ( GLOB_RECURSE STORM_STORAGE_SPARSE_FILES ${ PROJECT_SOURCE_DIR } /src/storage/sparse/*.h ${ PROJECT_SOURCE_DIR } /src/storage/sparse/*.cpp )
file ( GLOB_RECURSE STORM_UTILITY_FILES ${ PROJECT_SOURCE_DIR } /src/utility/*.h ${ PROJECT_SOURCE_DIR } /src/utility/*.cpp )
# T e s t S o u r c e s
# N o t e t h a t t h e t e s t s a l s o n e e d t h e s o u r c e f i l e s , e x c e p t f o r t h e m a i n f i l e
file ( GLOB STORM_FUNCTIONAL_TEST_MAIN_FILE ${ STORM_CPP_TESTS_BASE_PATH } /functional/storm-functional-tests.cpp )
file ( GLOB_RECURSE STORM_FUNCTIONAL_TEST_FILES ${ STORM_CPP_TESTS_BASE_PATH } /functional/*.h ${ STORM_CPP_TESTS_BASE_PATH } /functional/*.cpp )
file ( GLOB STORM_PERFORMANCE_TEST_MAIN_FILE ${ STORM_CPP_TESTS_BASE_PATH } /performance/storm-performance-tests.cpp )
file ( GLOB_RECURSE STORM_PERFORMANCE_TEST_FILES ${ STORM_CPP_TESTS_BASE_PATH } /performance/*.h ${ STORM_CPP_TESTS_BASE_PATH } /performance/*.cpp )
# A d d i t i o n a l i n c l u d e f i l e s l i k e t h e s t o r m - c o n f i g . h
file ( GLOB_RECURSE STORM_BUILD_HEADERS ${ PROJECT_BINARY_DIR } /include/*.h )
set ( STORM_LIB_SOURCES ${ STORM_SOURCES_WITHOUT_MAIN } )
list ( REMOVE_ITEM STORM_LIB_SOURCES ${ STORM_SOURCES_CLI } )
list ( REMOVE_ITEM STORM_LIB_SOURCES ${ STORM_PY_SOURCES } )
set ( STORM_LIB_HEADERS ${ STORM_HEADERS } )
list ( REMOVE_ITEM STORM_LIB_HEADERS ${ STORM_HEADERS_CLI } )
# list ( REMOVE_ITEM STORM_LIB_HEADERS ${ STORM_PY_HEADERS } )
set ( STORM_MAIN_SOURCES ${ STORM_SOURCES_CLI } ${ STORM_MAIN_FILE } )
set ( STORM_MAIN_HEADERS ${ STORM_HEADERS_CLI } )
# G r o u p t h e h e a d e r s a n d s o u r c e s
source_group ( main FILES ${ STORM_MAIN_FILE } )
source_group ( adapters FILES ${ STORM_ADAPTERS_FILES } )
source_group ( builder FILES ${ STORM_BUILDER_FILES } )
source_group ( cli FILES ${ STORM_CLI_FILES } )
source_group ( exceptions FILES ${ STORM_EXCEPTIONS_FILES } )
source_group ( logic FILES ${ STORM_LOGIC_FILES } )
source_group ( generated FILES ${ STORM_BUILD_HEADERS } ${ STORM_BUILD_SOURCES } )
source_group ( modelchecker FILES ${ STORM_MODELCHECKER_FILES } )
source_group ( modelchecker\\prctl FILES ${ STORM_MODELCHECKER_PRCTL_FILES } )
source_group ( modelchecker\\prctl\\helper FILES ${ STORM_MODELCHECKER_PRCTL_HELPER_FILES } )
source_group ( modelchecker\\csl FILES ${ STORM_MODELCHECKER_CSL_FILES } )
source_group ( modelchecker\\csl\\helper FILES ${ STORM_MODELCHECKER_CSL_HELPER_FILES } )
source_group ( modelchecker\\reachability FILES ${ STORM_MODELCHECKER_REACHABILITY_FILES } )
source_group ( modelchecker\\propositional FILES ${ STORM_MODELCHECKER_PROPOSITIONAL_FILES } )
source_group ( modelchecker\\results FILES ${ STORM_MODELCHECKER_RESULTS_FILES } )
source_group ( counterexamples FILES ${ STORM_COUNTEREXAMPLES_FILES } )
source_group ( permissiveschedulers FILES ${ STORM_PERMISSIVESCHEDULER_FILES } )
source_group ( models FILES ${ STORM_MODELS_FILES } )
source_group ( models\\sparse FILES ${ STORM_MODELS_SPARSE_FILES } )
source_group ( models\\symbolic FILES ${ STORM_MODELS_SYMBOLIC_FILES } )
source_group ( parser FILES ${ STORM_PARSER_FILES } )
source_group ( parser\\prismparser FILES ${ STORM_PARSER_PRISMPARSER_FILES } )
source_group ( settings FILES ${ STORM_SETTINGS_FILES } )
source_group ( settings\\modules FILES ${ STORM_SETTINGS_MODULES_FILES } )
source_group ( solver FILES ${ STORM_SOLVER_FILES } )
source_group ( storage FILES ${ STORM_STORAGE_FILES } )
source_group ( storage\\dd FILES ${ STORM_STORAGE_DD_FILES } )
source_group ( storage\\expressions FILES ${ STORM_STORAGE_EXPRESSIONS_FILES } )
source_group ( storage\\prism FILES ${ STORM_STORAGE_PRISM_FILES } )
source_group ( storage\\sparse FILES ${ STORM_STORAGE_SPARSE_FILES } )
source_group ( utility FILES ${ STORM_UTILITY_FILES } )
source_group ( functional-test FILES ${ STORM_FUNCTIONAL_TEST_FILES } )
source_group ( performance-test FILES ${ STORM_PERFORMANCE_TEST_FILES } $ {} )
# A d d c u s t o m a d d i t i o n a l i n c l u d e o r l i n k d i r e c t o r i e s
if ( ADDITIONAL_INCLUDE_DIRS )
message ( STATUS "StoRM - Using additional include directories ${ADDITIONAL_INCLUDE_DIRS}" )
include_directories ( ${ ADDITIONAL_INCLUDE_DIRS } )
endif ( ADDITIONAL_INCLUDE_DIRS )
if ( ADDITIONAL_LINK_DIRS )
message ( STATUS "StoRM - Using additional link directories ${ADDITIONAL_LINK_DIRS}" )
link_directories ( ${ ADDITIONAL_LINK_DIRS } )
endif ( ADDITIONAL_LINK_DIRS )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # P r e e x e c u t a b l e - c r e a t i o n l i n k _ d i r e c t o r i e s s e t u p
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
if ( ENABLE_GUROBI )
if ( NOT GUROBI_FOUND )
message ( FATAL_ERROR "Gurobi was requested, but not found!" )
endif ( )
# link_directories ( "${GUROBI_ROOT}/lib" )
endif ( )
if ( ENABLE_MSAT )
link_directories ( "${MSAT_ROOT}/lib" )
endif ( )
if ( GMP_FOUND )
link_directories ( ${ GMP_LIBRARY_DIR } )
elseif ( MPIR_FOUND )
link_directories ( ${ GMP_MPIR_LIBRARY_DIR } ${ GMP_MPIRXX_LIBRARY_DIR } )
else ( GMP_FOUND )
if ( ENABLE_MSAT )
message ( FATAL_ERROR "GMP is required for MathSAT, but was not found!" )
endif ( ENABLE_MSAT )
endif ( GMP_FOUND )
if ( ( NOT Boost_LIBRARY_DIRS ) OR ( "${Boost_LIBRARY_DIRS}" STREQUAL "" ) )
set ( Boost_LIBRARY_DIRS "${Boost_INCLUDE_DIRS}/stage/lib" )
endif ( )
link_directories ( ${ Boost_LIBRARY_DIRS } )
if ( TBB_FOUND AND STORM_USE_INTELTBB )
link_directories ( ${ TBB_LIBRARY_DIRS } )
endif ( )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # #
# # E x e c u t a b l e C r e a t i o n #
# # #
# # A l l link_directories ( ) c a l l s M U S T b e m a d e b e f o r e t h i s p o i n t #
# # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
add_library ( storm ${ STORM_LIB_SOURCES } ${ STORM_LIB_HEADERS } ${ STORM_GENERATED_SOURCES } ) # A d d i n g h e a d e r s f o r x c o d e
add_executable ( storm-main ${ STORM_MAIN_SOURCES } ${ STORM_MAIN_HEADERS } )
target_link_libraries ( storm-main storm ) # A d d i n g h e a d e r s f o r x c o d e
set_target_properties ( storm-main PROPERTIES OUTPUT_NAME "storm" )
add_executable ( storm-functional-tests ${ STORM_FUNCTIONAL_TEST_MAIN_FILE } ${ STORM_FUNCTIONAL_TEST_FILES } )
target_link_libraries ( storm-functional-tests storm )
add_executable ( storm-performance-tests ${ STORM_PERFORMANCE_TEST_MAIN_FILE } ${ STORM_PERFORMANCE_TEST_FILES } )
target_link_libraries ( storm-performance-tests storm )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # S T O R M P Y T H O N
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
if ( STORM_PYTHON )
add_library ( stormpy_info SHARED ${ STORM_PY_SOURCES } )
target_link_libraries ( stormpy storm ${ BOOST_PYTHON_LIB } ${ PYTHON_LIBRARIES } )
endif ( )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # B o o s t
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
include_directories ( ${ Boost_INCLUDE_DIRS } )
target_link_libraries ( storm ${ Boost_LIBRARIES } )
# message ( STATUS "BOOST_INCLUDE_DIRS is ${Boost_INCLUDE_DIRS}" )
# message ( STATUS "BOOST_LIBRARY_DIRS is ${Boost_LIBRARY_DIRS}" )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
@ -571,70 +411,34 @@ include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/nan
include_directories ( "${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/obj" )
include_directories ( "${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/st" )
include_directories ( "${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/util" )
target_link_libraries ( storm cudd )
list ( APPEND STORM_LINK_LIBRARIES cudd )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # Gurobi ( optional )
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
if ( ENABLE_GUROBI )
message ( STATUS "StoRM - Linking with Gurobi (include: ${GUROBI_INCLUDE_DIRS})" )
include_directories ( ${ GUROBI_INCLUDE_DIRS } )
target_link_libraries ( storm ${ GUROBI_LIBRARY } )
endif ( ENABLE_GUROBI )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # CUDA ( optional )
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
if ( ENABLE_CUDA )
message ( STATUS "StoRM - Linking with CUDA" )
target_link_libraries ( storm ${ STORM_CUDA_LIB_NAME } )
include_directories ( "${PROJECT_SOURCE_DIR}/cuda/kernels/" )
endif ( ENABLE_CUDA )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # g l p k
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
message ( STATUS "StoRM - Linking with glpk" )
add_subdirectory ( "${PROJECT_SOURCE_DIR}/resources/3rdparty/glpk-4.53" )
include_directories ( "${PROJECT_SOURCE_DIR}/resources/3rdparty/glpk-4.53/src" )
target_link_libraries ( storm "glpk" )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # E x p r T k
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
message ( STATUS "StoRM - Including ExprTk" )
include_directories ( "${PROJECT_SOURCE_DIR}/resources/3rdparty/exprtk" )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # Z3 ( optional )
# # c a r l
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
if ( STORM_HAVE_Z3 )
message ( STATUS "StoRM - Linking with Z3" )
include_directories ( ${ Z3_INCLUDE_DIRS } )
target_link_libraries ( storm ${ Z3_LIBRARIES } )
endif ( STORM_HAVE_Z3 )
if ( USE_CARL )
find_package ( carl QUIET )
if ( carl_FOUND )
set ( STORM_HAVE_CARL ON )
endif ( )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # c a r l
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# find_package ( smtrat QUIET )
if ( smtrat_FOUND )
set ( STORM_HAVE_SMTRAT ON )
endif ( )
endif ( )
if ( STORM_HAVE_CARL )
message ( STATUS "StoRM - Linking with carl." )
include_directories ( "${carl_INCLUDE_DIR}" )
target_link_libraries ( storm ${ carl_LIBRARIES } )
list ( APPEND STORM_LINK_LIBRARIES ${ carl_LIBRARIES } )
endif ( )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@ -646,7 +450,7 @@ endif()
if ( STORM_HAVE_SMTRAT )
message ( STATUS "StoRM - Linking with smtrat." )
include_directories ( "${smtrat_INCLUDE_DIR}" )
target_link_libraries ( storm ${ smtrat_LIBRARIES } )
list ( APPEND STORM_LINK_LIBRARIES ${ smtrat_LIBRARIES } )
endif ( )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@ -654,16 +458,28 @@ endif()
# # MathSAT ( optional )
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
if ( "${MSAT_ROOT}" STREQUAL "" )
set ( ENABLE_MSAT OFF )
else ( )
set ( ENABLE_MSAT ON )
endif ( )
# M a t h S A T D e f i n e s
set ( STORM_HAVE_MSAT ${ ENABLE_MSAT } )
if ( ENABLE_MSAT )
link_directories ( "${MSAT_ROOT}/lib" )
message ( STATUS "StoRM - Linking with MathSAT" )
include_directories ( "${MSAT_ROOT}/include" )
target_link_libraries ( storm "mathsat" )
list ( APPEND STORM_LINK_LIBRARIES "mathsat" )
if ( GMP_FOUND )
include_directories ( "${GMP_INCLUDE_DIR}" )
target_link_libraries ( storm "gmp" )
list ( APPEND STORM_LINK_LIBRARIES "gmp" )
elseif ( MPIR_FOUND )
include_directories ( "${GMP_INCLUDE_DIR}" )
target_link_libraries ( storm "mpir" "mpirxx" )
list ( APPEND STORM_LINK_LIBRARIES "mpir" "mpirxx" )
else ( GMP_FOUND )
message ( FATAL_ERROR "GMP is required for MathSAT, but was not found!" )
endif ( GMP_FOUND )
@ -674,14 +490,9 @@ endif(ENABLE_MSAT)
# # G o o g l e T e s t g t e s t
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
set ( gtest_force_shared_crt ON )
add_subdirectory ( "${PROJECT_SOURCE_DIR}/resources/3rdparty/gtest-1.7.0" )
include_directories ( "${PROJECT_SOURCE_DIR}/resources/3rdparty/gtest-1.7.0/include" )
enable_testing ( )
target_link_libraries ( storm-functional-tests gtest )
target_link_libraries ( storm-performance-tests gtest )
add_test ( NAME storm-functional-tests COMMAND storm-functional-tests )
add_test ( NAME storm-performance-tests COMMAND storm-performance-tests )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
@ -696,14 +507,10 @@ set(LOG4CPLUS_DEFINE_INSTALL_TARGET OFF)
add_subdirectory ( "${PROJECT_SOURCE_DIR}/resources/3rdparty/log4cplus-1.1.3-rc1" )
include_directories ( "${PROJECT_SOURCE_DIR}/resources/3rdparty/log4cplus-1.1.3-rc1/include" )
include_directories ( "${PROJECT_BINARY_DIR}/resources/3rdparty/log4cplus-1.1.3-rc1/include" ) # T h i s a d d s t h e d e f i n e s . h x x f i l e
target_link_libraries ( storm log4cplusS )
target_link_libraries ( storm-functional-tests log4cplusS )
target_link_libraries ( storm-performance-tests log4cplusS )
list ( APPEND STORM_LINK_LIBRARIES log4cplusS )
if ( UNIX AND NOT APPLE )
target_link_libraries ( storm rt )
if ( STORM_USE_COTIRE )
target_link_libraries ( storm_unity rt )
endif ( STORM_USE_COTIRE )
list ( APPEND STORM_LINK_LIBRARIES rt )
endif ( UNIX AND NOT APPLE )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@ -711,6 +518,19 @@ endif(UNIX AND NOT APPLE)
# # I n t e l T h r e a d i n g B u i l d i n g Blocks ( optional )
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
set ( TBB_INSTALL_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/tbb42_20140122_merged-win-lin-mac" )
find_package ( TBB )
if ( TBB_FOUND AND STORM_USE_INTELTBB )
link_directories ( ${ TBB_LIBRARY_DIRS } )
set ( STORM_CPP_INTELTBB_DEF "define" )
else ( )
set ( STORM_CPP_INTELTBB_DEF "undef" )
endif ( )
if ( TBB_FOUND )
message ( STATUS "StoRM - Found Intel TBB with interface version ${TBB_INTERFACE_VERSION}." )
if ( STORM_USE_INTELTBB )
@ -725,8 +545,10 @@ endif(TBB_FOUND)
# # T h r e a d s
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
find_package ( Threads REQUIRED )
include_directories ( ${ THREADS_INCLUDE_DIRS } )
target_link_libraries ( storm ${ CMAKE_THREAD_LIBS_INIT } )
list ( APPEND STORM_LINK_LIBRARIES ${ CMAKE_THREAD_LIBS_INIT } )
if ( STORM_USE_COTIRE )
target_link_libraries ( storm_unity ${ CMAKE_THREAD_LIBS_INIT } )
endif ( STORM_USE_COTIRE )
@ -773,6 +595,8 @@ endif(LINK_LIBCXXABI)
# # D o x y g e n
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
find_package ( Doxygen REQUIRED )
# A d d a t a r g e t t o g e n e r a t e A P I d o c u m e n t a t i o n w i t h D o x y g e n
if ( DOXYGEN_FOUND )
set ( CMAKE_DOXYGEN_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc" )
@ -782,6 +606,67 @@ if(DOXYGEN_FOUND)
add_custom_target ( doc ${ DOXYGEN_EXECUTABLE } "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile" DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile" COMMENT "Generating API documentation with Doxygen" VERBATIM )
endif ( DOXYGEN_FOUND )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # P y t h o n
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
if ( STORM_PYTHON )
set ( Python_ADDITIONAL_VERSIONS 3.4 )
FIND_PACKAGE ( PythonInterp REQUIRED )
FIND_PACKAGE ( PythonLibs 3.4 REQUIRED )
include_directories ( ${ PYTHON_INCLUDE_DIR } )
endif ( )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # 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
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# 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 )
git_describe_checkout ( STORM_GIT_VERSION_STRING )
message ( STATUS "STORM_GIT_VERSION_STRING: ${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_CPP_VERSION_MAJOR "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" STORM_CPP_VERSION_MINOR "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" STORM_CPP_VERSION_PATCH "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-([0-9]+)\\-.*" "\\1" STORM_CPP_VERSION_COMMITS_AHEAD "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+\\-([a-z0-9]+).*" "\\1" STORM_CPP_VERSION_HASH "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+\\-[a-z0-9]+\\-(.*)" "\\1" STORM_CPP_VERSION_APPENDIX "${STORM_GIT_VERSION_STRING}" )
if ( "${STORM_CPP_VERSION_APPENDIX}" MATCHES "^.*dirty.*$" )
set ( STORM_CPP_VERSION_DIRTY 1 )
else ( )
set ( STORM_CPP_VERSION_DIRTY 0 )
endif ( )
message ( STATUS "StoRM - Version information: ${STORM_CPP_VERSION_MAJOR}.${STORM_CPP_VERSION_MINOR}.${STORM_CPP_VERSION_PATCH} (${STORM_CPP_VERSION_COMMITS_AHEAD} commits ahead of Tag) build from ${STORM_CPP_VERSION_HASH} (Dirty: ${STORM_CPP_VERSION_DIRTY})" )
# 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
configure_file (
" $ { P R O J E C T _ S O U R C E _ D I R } / s t o r m - c o n f i g . h . i n "
" $ { 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 h e a d e r 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 _ B I N A R Y _ D I R } / s r c / u t i l i t y / s t o r m - v e r s i o n . c p p "
)
set ( STORM_GENERATED_SOURCES "${PROJECT_BINARY_DIR}/src/utility/storm-version.cpp" )
# A d d t h e b i n a r y d i r i n c l u d e d i r e c t o r y f o r s t o r m - c o n f i g . h
include_directories ( "${PROJECT_BINARY_DIR}/include" )
add_subdirectory ( src )
add_subdirectory ( test )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
@ -795,9 +680,5 @@ add_custom_target(memcheck-performance-tests valgrind --leak-check=full --show-r
set ( CPPLINT_ARGS --filter=-whitespace/tab,-whitespace/line_length,-legal/copyright,-readability/streams )
add_custom_target ( style python cpplint.py ${ CPPLINT_ARGS } `find ./src/ -iname "*.h" -or -iname "*.cpp" ` )
INSTALL ( TARGETS storm-main storm-functional-tests storm-performance-tests
R U N T I M E D E S T I N A T I O N b i n
L I B R A R Y D E S T I N A T I O N l i b
A R C H I V E D E S T I N A T I O N l i b
)
include ( StormCPackConfig.cmake )