@ -1,11 +1,14 @@
add_custom_target ( resources )
add_custom_target ( test-resources )
set ( STORM_3RDPARTY_SOURCE_DIR ${ PROJECT_SOURCE_DIR } /resources/3rdparty )
set ( STORM_3RDPARTY_BINARY_DIR ${ PROJECT_BINARY_DIR } /resources/3rdparty )
ExternalProject_Add (
x e r c e s c
S O U R C E _ D I R $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / x e r c e s c - 3 . 1 . 2
C O N F I G U R E _ C O M M A N D $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / x e r c e s c - 3 . 1 . 2 / c o n f i g u r e - - p r e f i x = $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / x e r c e s c - 3 . 1 . 2 - - l i b d i r = $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / x e r c e s c - 3 . 1 . 2 / l i b C C = $ { C M A K E _ C _ C O M P I L E R } C X X = $ { C M A K E _ C X X _ C O M P I L E R } C F L A G S = - O 3 C X X F L A G S = - O 3
P R E F I X $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / x e r c e s c - 3 . 1 . 2
S O U R C E _ D I R $ { S T O R M _ 3 R D P A R T Y _ S O U R C E _ D I R } / x e r c e s c - 3 . 1 . 2
C O N F I G U R E _ C O M M A N D $ { S T O R M _ 3 R D P A R T Y _ S O U R C E _ D I R } / x e r c e s c - 3 . 1 . 2 / c o n f i g u r e - - p r e f i x = $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / x e r c e s c - 3 . 1 . 2 - - l i b d i r = $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / x e r c e s c - 3 . 1 . 2 / l i b C C = $ { C M A K E _ C _ C O M P I L E R } C X X = $ { C M A K E _ C X X _ C O M P I L E R } C F L A G S = - O 3 C X X F L A G S = - O 3
P R E F I X $ { S T O R M _ 3 R D P A R T Y _ B I N A R Y _ D I R } / x e r c e s c - 3 . 1 . 2
B U I L D _ C O M M A N D m a k e
B U I L D _ I N _ S O U R C E 0
L O G _ C O N F I G U R E O N
@ -16,9 +19,9 @@ ExternalProject_Add(
ExternalProject_Add (
g l p k
D O W N L O A D _ C O M M A N D " "
P R E F I X $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / g l p k - 4 . 5 7
S O U R C E _ D I R $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / g l p k - 4 . 5 7
C O N F I G U R E _ C O M M A N D $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / g l p k - 4 . 5 7 / c o n f i g u r e - - p r e f i x = $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / g l p k - 4 . 5 7 - - l i b d i r = $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / g l p k - 4 . 5 7 / l i b C C = $ { C M A K E _ C _ C O M P I L E R }
P R E F I X $ { S T O R M _ 3 R D P A R T Y _ B I N A R Y _ D I R } / g l p k - 4 . 5 7
S O U R C E _ D I R $ { S T O R M _ 3 R D P A R T Y _ S O U R C E _ D I R } / g l p k - 4 . 5 7
C O N F I G U R E _ C O M M A N D $ { S T O R M _ 3 R D P A R T Y _ S O U R C E _ D I R } / g l p k - 4 . 5 7 / c o n f i g u r e - - p r e f i x = $ { S T O R M _ 3 R D P A R T Y _ B I N A R Y _ D I R } / g l p k - 4 . 5 7 - - l i b d i r = $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / g l p k - 4 . 5 7 / l i b C C = $ { C M A K E _ C _ C O M P I L E R }
B U I L D _ C O M M A N D m a k e " C F L A G S = - O 2 - w "
I N S T A L L _ C O M M A N D m a k e i n s t a l l
B U I L D _ I N _ S O U R C E 0
@ -30,10 +33,10 @@ ExternalProject_Add(
ExternalProject_Add (
c u d d 3
D O W N L O A D _ C O M M A N D " "
S O U R C E _ D I R $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c u d d - 3 . 0 . 0
P R E F I X $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c u d d - 3 . 0 . 0
S O U R C E _ D I R $ { S T O R M _ 3 R D P A R T Y _ S O U R C E _ D I R } / c u d d - 3 . 0 . 0
P R E F I X $ { S T O R M _ 3 R D P A R T Y _ B I N A R Y _ D I R } / c u d d - 3 . 0 . 0
U P D A T E _ C O M M A N D a u t o r e c o n f
C O N F I G U R E _ C O M M A N D $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c u d d - 3 . 0 . 0 / c o n f i g u r e - - e n a b l e - s h a r e d - - e n a b l e - o b j - - p r e f i x = $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c u d d - 3 . 0 . 0 - - l i b d i r = $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c u d d - 3 . 0 . 0 / l i b C C = $ { C M A K E _ C _ C O M P I L E R } C X X = $ { C M A K E _ C X X _ C O M P I L E R }
C O N F I G U R E _ C O M M A N D $ { S T O R M _ 3 R D P A R T Y _ S O U R C E _ D I R } / c u d d - 3 . 0 . 0 / c o n f i g u r e - - e n a b l e - s h a r e d - - e n a b l e - o b j - - p r e f i x = $ { S T O R M _ 3 R D P A R T Y _ S O U R C E _ D I R } / c u d d - 3 . 0 . 0 - - l i b d i r = $ { S T O R M _ 3 R D P A R T Y _ S O U R C E _ D I R } / c u d d - 3 . 0 . 0 / l i b C C = $ { C M A K E _ C _ C O M P I L E R } C X X = $ { C M A K E _ C X X _ C O M P I L E R }
B U I L D _ C O M M A N D m a k e " C F L A G S = - O 2 - w "
I N S T A L L _ C O M M A N D m a k e i n s t a l l
B U I L D _ I N _ S O U R C E 0
@ -46,16 +49,16 @@ ExternalProject_Add(
s y l v a n
D O W N L O A D _ C O M M A N D " "
P R E F I X " s y l v a n "
S O U R C E _ D I R $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s y l v a n
S O U R C E _ D I R $ { S T O R M _ 3 R D P A R T Y _ S O U R C E _ D I R } / s y l v a n
C M A K E _ A R G S - D S Y L V A N _ B U I L D _ T E S T = O f f - D S Y L V A N _ B U I L D _ E X A M P L E S = O f f - D C M A K E _ B U I L D _ T Y P E = R e l e a s e
B I N A R Y _ D I R " $ { P R O J E C T _ B I N A R Y _ D I R } / s y l v a n "
I N S T A L L _ C O M M A N D " "
I N S T A L L _ D I R " $ { P R O J E C T _ B I N A R Y _ D I R } / s y l v a n "
I N S T A L L _ D I R " $ { S T O R M _ 3 R D P A R T Y _ B I N A R Y _ D I R } / s y l v a n "
)
ExternalProject_Get_Property ( sylvan source_dir )
ExternalProject_Get_Property ( sylvan binary_dir )
set ( Sylvan_INCLUDE_DIR "${source_dir}/src" PARENT_SCOPE )
set ( Sylvan_LIBRARY "${binary_dir}/src/libsylvan.a" PARENT_SCOPE )
set ( Sylvan_INCLUDE_DIR "${source_dir}/src" )
set ( Sylvan_LIBRARY "${binary_dir}/src/libsylvan.a" )
ExternalProject_Add (
g o o g l e t e s t
@ -63,34 +66,555 @@ ExternalProject_Add(
# S V N _ R E P O S I T O R Y h t t p : / / g o o g l e t e s t . g o o g l e c o d e . c o m / s v n / t r u n k /
# T I M E O U T 1 0
D O W N L O A D _ C O M M A N D " "
S O U R C E _ D I R " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / g t e s t - 1 . 7 . 0 "
S O U R C E _ D I R " $ { S T O R M _ 3 R D P A R T Y _ S O U R C E _ D I R } / g t e s t - 1 . 7 . 0 "
# F o r c e t h e s a m e o u t p u t p a t h s f o r d e b u g a n d r e l e a s e b u i l d s s o t h a t
# w e k n o w i n w h i c h p l a c e t h e b i n a r i e s e n d u p w h e n u s i n g t h e X c o d e g e n e r a t o r
C M A K E _ A R G S - D g t e s t _ f o r c e _ s h a r e d _ c r t = O N - D C X X = $ { C M A K E _ C X X _ C O M P I L E R } - D C M A K E _ A R C H I V E _ O U T P U T _ D I R E C T O R Y _ D E B U G : P A T H = $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / g t e s t - 1 . 7 . 0 - D C M A K E _ A R C H I V E _ O U T P U T _ D I R E C T O R Y _ R E L E A S E : P A T H = $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / g t e s t - 1 . 7 . 0
C M A K E _ A R G S - D g t e s t _ f o r c e _ s h a r e d _ c r t = O N - D C X X = $ { C M A K E _ C X X _ C O M P I L E R } - D C M A K E _ A R C H I V E _ O U T P U T _ D I R E C T O R Y _ D E B U G : P A T H = $ { S T O R M _ 3 R D P A R T Y _ B I N A R Y _ D I R } / g t e s t - 1 . 7 . 0 - D C M A K E _ A R C H I V E _ O U T P U T _ D I R E C T O R Y _ R E L E A S E : P A T H = $ { S T O R M _ 3 R D P A R T Y _ B I N A R Y _ D I R } / g t e s t - 1 . 7 . 0
# D i s a b l e i n s t a l l s t e p
I N S T A L L _ C O M M A N D " "
B I N A R Y _ D I R " $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / g t e s t - 1 . 7 . 0 "
I N S T A L L _ D I R " $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / g t e s t - 1 . 7 . 0 "
B I N A R Y _ D I R " $ { S T O R M _ 3 R D P A R T Y _ B I N A R Y _ D I R } / g t e s t - 1 . 7 . 0 "
I N S T A L L _ D I R " $ { S T O R M _ 3 R D P A R T Y _ B I N A R Y _ D I R } / g t e s t - 1 . 7 . 0 "
# W r a p d o w n l o a d , c o n f i g u r e a n d b u i l d s t e p s i n a s c r i p t t o l o g o u t p u t
L O G _ C O N F I G U R E O N
L O G _ B U I L D O N )
# S p e c i f y i n c l u d e d i r
ExternalProject_Get_Property ( googletest source_dir )
set ( GTEST_INCLUDE_DIR ${ source_dir } /include PARENT_SCOPE )
set ( GTEST_INCLUDE_DIR ${ source_dir } /include )
# S p e c i f y M a i n T e s t ' s l i n k l i b r a r i e s
ExternalProject_Get_Property ( googletest binary_dir )
set ( GTEST_LIBRARIES ${ binary_dir } /libgtest.a ${ binary_dir } /libgtest_main.a PARENT_SCOPE )
set ( GTEST_LIBRARIES ${ binary_dir } /libgtest.a ${ binary_dir } /libgtest_main.a )
ExternalProject_Add (
l 3 p p
G I T _ R E P O S I T O R Y h t t p s : / / g i t h u b . c o m / h b r u i n t j e s / l 3 p p . g i t
G I T _ T A G m a s t e r
S O U R C E _ D I R $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / l 3 p p
S O U R C E _ D I R $ { S T O R M _ 3 R D P A R T Y _ S O U R C E _ D I R } / l 3 p p
C O N F I G U R E _ C O M M A N D " "
B U I L D _ C O M M A N D " "
I N S T A L L _ C O M M A N D " "
L O G _ I N S T A L L O N
)
ExternalProject_Get_Property ( l3pp source_dir )
set ( l3pp_INCLUDE "${source_dir}/" PARENT_SCOPE )
set ( l3pp_INCLUDE "${source_dir}/" )
#
# ExternalProject_Add (
# c a r l
# G I T _ R E P O S I T O R Y h t t p : / / s m t r a t . g i t h u b . i o / c a r l
# G I T _ T A G m a s t e r
# S O U R C E _ D I R $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c a r l
# C M A K E _ A R G S - D C X X = $ { C M A K E _ C X X _ C O M P I L E R }
# L O G _ C O N F I G U R E O N
# L O G _ B U I L D O N
# )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # l 3 p p
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# l 3 p p i s s e t u p a s e x t e r n a l p r o j e c t
message ( "${l3pp_INCLUDE}" )
include_directories ( ${ l3pp_INCLUDE } )
add_dependencies ( resources l3pp )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # g m m
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# A d d t h e s h i p p e d v e r s i o n o f G M M 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 } )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # E i g e n
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# A d d t h e s h i p p e d v e r s i o n o f E i g e n t o t h e i n c l u d e p a t h e s
set ( EIGEN_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/eigen-3.3-beta1" )
include_directories ( ${ EIGEN_INCLUDE_DIR } )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # g m p
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# G M P i s optional ( unless MathSAT is used, see below )
find_package ( GMP QUIET )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # 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 ${ USE_BOOST_STATIC_LIBRARIES } )
set ( Boost_USE_MULTITHREADED ON )
set ( Boost_USE_STATIC_RUNTIME OFF )
find_package ( Boost 1.56.0 QUIET REQUIRED )
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 } )
include_directories ( ${ Boost_INCLUDE_DIRS } )
list ( APPEND STORM_LINK_LIBRARIES ${ Boost_LIBRARIES } )
message ( STATUS "StoRM - Using Boost ${Boost_VERSION} (lib ${Boost_LIB_VERSION})" )
# message ( STATUS "StoRM - BOOST_INCLUDE_DIRS is ${Boost_INCLUDE_DIRS}" )
# message ( STATUS "StoRM - BOOST_LIBRARY_DIRS is ${Boost_LIBRARY_DIRS}" )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # E x p r T k
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# U s e t h e s h i p p e d v e r s i o n o f E x p r T K
message ( STATUS "StoRM - Including ExprTk" )
include_directories ( "${PROJECT_SOURCE_DIR}/resources/3rdparty/exprtk" )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # M o d e r n J S O N
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# u s e t h e s h i p p e d v e r s i o n o f m o d e r n j s o n
message ( STATUS "StoRM - Including ModernJSON" )
include_directories ( "${PROJECT_SOURCE_DIR}/resources/3rdparty/modernjson/src/" )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # Z3 ( optional )
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
find_package ( Z3 QUIET )
# Z 3 D e f i n e s
set ( STORM_HAVE_Z3 ${ Z3_FOUND } )
if ( Z3_FOUND )
message ( STATUS "StoRM - Linking with Z3" )
include_directories ( ${ Z3_INCLUDE_DIRS } )
list ( APPEND STORM_LINK_LIBRARIES ${ Z3_LIBRARIES } )
endif ( Z3_FOUND )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # g l p k
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
find_package ( GLPK QUIET )
if ( GLPK_FOUND )
message ( STATUS "StoRM - Using system version of GLPK" )
else ( )
message ( STATUS "StoRM - Using shipped version of GLPK" )
set ( GLPK_LIBRARIES ${ CMAKE_BINARY_DIR } /resources/3rdparty/glpk-4.57/lib/libglpk ${ DYNAMIC_EXT } )
set ( GLPK_INCLUDE_DIR ${ CMAKE_BINARY_DIR } /resources/3rdparty/glpk-4.57/include )
set ( GLPK_VERSION_STRING 4.57 )
add_dependencies ( resources glpk )
endif ( )
# S i n c e t h e r e i s a s h i p p e d v e r s i o n , a l w a y s u s e G L P K
set ( STORM_HAVE_GLPK ON )
message ( STATUS "StoRM - Linking with glpk ${GLPK_VERSION_STRING}" )
include_directories ( ${ GLPK_INCLUDE_DIR } )
list ( APPEND STORM_LINK_LIBRARIES ${ GLPK_LIBRARIES } )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # Gurobi ( optional )
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
if ( STORM_USE_GUROBI )
find_package ( Gurobi QUIET REQUIRED )
set ( STORM_HAVE_GUROBI ${ GUROBI_FOUND } )
if ( GUROBI_FOUND )
message ( STATUS "StoRM - Linking with Gurobi" )
include_directories ( ${ GUROBI_INCLUDE_DIRS } )
list ( APPEND STORM_LINK_LIBRARIES ${ GUROBI_LIBRARY } )
# link_directories ( "${GUROBI_ROOT}/lib" )
else ( )
# message ( FATAL_ERROR "StoRM - Gurobi was requested, but not found!" )
endif ( )
else ( )
set ( STORM_HAVE_GUROBI OFF )
endif ( )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # C U D D
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# D o n o t u s e s y s t e m C U D D , S t o R M h a s a m o d i f i e d v e r s i o n
set ( CUDD_INCLUDE_DIR ${ CMAKE_BINARY_DIR } /resources/3rdparty/cudd-3.0.0/include )
set ( CUDD_SHARED_LIBRARY ${ CMAKE_BINARY_DIR } /resources/3rdparty/cudd-3.0.0/lib/libcudd ${ DYNAMIC_EXT } )
set ( CUDD_STATIC_LIBRARY ${ CMAKE_BINARY_DIR } /resources/3rdparty/cudd-3.0.0/lib/libcudd ${ STATIC_EXT } )
set ( CUDD_VERSION_STRING 3.0.0 )
list ( APPEND STORM_LINK_LIBRARIES ${ CUDD_SHARED_LIBRARY } )
add_dependencies ( resources cudd3 )
message ( STATUS "StoRM - Linking with CUDD ${CUDD_VERSION_STRING}" )
# message ( "StoRM - CUDD include dir: ${CUDD_INCLUDE_DIR}" )
include_directories ( ${ CUDD_INCLUDE_DIR } )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # C L N
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
find_package ( CLN QUIET )
if ( CLN_FOUND )
set ( STORM_HAVE_CLN ON )
message ( STATUS "StoRM - Linking with CLN ${CLN_VERSION_STRING}" )
include_directories ( "${CLN_INCLUDE_DIR}" )
list ( APPEND STORM_LINK_LIBRARIES ${ CLN_LIBRARIES } )
else ( )
set ( STORM_HAVE_CLN OFF )
if ( NOT GMP_FOUND )
message ( FATAL_ERROR "StoRM - Neither CLN nor GMP found" )
endif ( )
endif ( )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # c a r l
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
set ( STORM_HAVE_CARL OFF )
if ( USE_CARL )
find_package ( carl QUIET REQUIRED )
if ( carl_FOUND )
set ( STORM_HAVE_CARL ON )
message ( STATUS "StoRM - Linking with carl ${carl_VERSION_STRING}" )
include_directories ( "${carl_INCLUDE_DIR}" )
list ( APPEND STORM_LINK_LIBRARIES ${ carl_LIBRARIES } )
else ( )
# message ( FATAL_ERROR "StoRM - CARL was requested but not found" )
endif ( )
endif ( )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # S M T - R A T
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# N o f i n d r o u t i n e y e t
# find_package ( smtrat QUIET )
# N o t y e t s u p p o r t e d
set ( smtrat_FOUND OFF )
set ( STORM_HAVE_SMTRAT OFF )
if ( smtrat_FOUND )
set ( STORM_HAVE_SMTRAT ON )
message ( STATUS "StoRM - Linking with smtrat." )
include_directories ( "${smtrat_INCLUDE_DIR}" )
list ( APPEND STORM_LINK_LIBRARIES ${ smtrat_LIBRARIES } )
endif ( )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # G i N a C
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
find_package ( GiNaC QUIET )
if ( GINAC_FOUND )
set ( STORM_HAVE_GINAC ON )
message ( STATUS "StoRM - Linking with GiNaC ${GINAC_VERSION_STRING}" )
# R i g h t n o w o n l y l i n k w i t h G i N a C f o r c a r l
# include_directories ( "${GINAC_INCLUDE_DIR}" )
list ( APPEND STORM_LINK_LIBRARIES ${ GINAC_LIBRARIES } )
else ( )
set ( STORM_HAVE_GINAC OFF )
# T O D O : C h e c k i f C A R L a c t u a l l y r e q u i r e s t h e u s e o f G i N a C
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 )
message ( STATUS "StoRM - Linking with MathSAT" )
link_directories ( "${MSAT_ROOT}/lib" )
include_directories ( "${MSAT_ROOT}/include" )
list ( APPEND STORM_LINK_LIBRARIES "mathsat" )
if ( GMP_FOUND )
include_directories ( "${GMP_INCLUDE_DIR}" )
list ( APPEND STORM_LINK_LIBRARIES "gmp" )
elseif ( MPIR_FOUND )
include_directories ( "${GMP_INCLUDE_DIR}" )
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 )
endif ( ENABLE_MSAT )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # X e r c e s
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
if ( USE_XERCES )
find_package ( Xerces QUIET REQUIRED )
if ( XERCES_FOUND )
message ( STATUS "StoRM - Use system version of xerces" )
else ( )
message ( STATUS "StoRM - Use shipped version of xerces" )
set ( XERCES_ROOT ${ CMAKE_BINARY_DIR } /resources/3rdparty/xercesc-3.1.2 )
set ( XERCESC_INCLUDE ${ XERCES_ROOT } /include )
set ( XERCES_LIBRARY_PATH ${ XERCES_ROOT } /lib )
set ( XERCESC_LIBRARIES ${ XERCES_LIBRARY_PATH } /libxerces-c.a )
add_dependencies ( resources xercesc )
endif ( )
message ( STATUS "StoRM - Linking with xercesc" )
set ( STORM_HAVE_XERCES ON )
include_directories ( ${ XERCESC_INCLUDE } )
list ( APPEND STORM_LINK_LIBRARIES ${ XERCESC_LIBRARIES } )
endif ( USE_XERCES )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # S y l v a n
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
message ( STATUS "StoRM - Using shipped version of sylvan" )
message ( STATUS "StoRM - Linking with sylvan" )
include_directories ( "${Sylvan_INCLUDE_DIR}" )
list ( APPEND STORM_LINK_LIBRARIES ${ Sylvan_LIBRARY } )
add_dependencies ( resources sylvan )
if ( ${ OPERATING_SYSTEM } MATCHES "Linux" )
find_package ( Hwloc QUIET REQUIRED )
if ( Hwloc_FOUND )
message ( STATUS "StoRM - Linking with hwloc ${Hwloc_VERSION}" )
list ( APPEND STORM_LINK_LIBRARIES ${ Hwloc_LIBRARIES } )
else ( )
message ( FATAL_ERROR "HWLOC is required but was not found." )
endif ( )
endif ( )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # G o o g l e T e s t g t e s t
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
add_dependencies ( test-resources googletest )
list ( APPEND STORM_TEST_LINK_LIBRARIES ${ GTEST_LIBRARIES } )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # 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 ( STORM_HAVE_INTELTBB OFF )
if ( STORM_USE_INTELTBB )
# P o i n t t o s h i p p e d T B B d i r e c t o r y
set ( TBB_INSTALL_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/tbb42_20140122_merged-win-lin-mac" )
find_package ( TBB QUIET REQUIRED )
if ( TBB_FOUND )
message ( STATUS "StoRM - Found Intel TBB with interface version ${TBB_INTERFACE_VERSION}." )
message ( STATUS "StoRM - Linking with Intel TBB in ${TBB_LIBRARY_DIRS}." )
set ( STORM_HAVE_INTELTBB ON )
link_directories ( ${ TBB_LIBRARY_DIRS } )
include_directories ( ${ TBB_INCLUDE_DIRS } )
list ( APPEND STORM_LINK_LIBRARIES tbb tbbmalloc )
else ( TBB_FOUND )
message ( FATAL_ERROR "StoRM - TBB was requested, but not found!" )
endif ( TBB_FOUND )
endif ( STORM_USE_INTELTBB )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # T h r e a d s
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
find_package ( Threads QUIET REQUIRED )
if ( NOT Threads_FOUND )
message ( FATAL_ERROR "StoRM - Threads was requested, but not found!" )
endif ( )
include_directories ( ${ THREADS_INCLUDE_DIRS } )
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 )
if ( MSVC )
# A d d t h e D e b u g H e l p e r D L L
set ( CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} Dbghelp.lib" )
target_link_libraries ( storm "Dbghelp.lib" )
endif ( MSVC )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # C U D A L i b r a r y g e n e r a t i o n
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
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
try_run ( STORM_CUDA_RUN_RESULT_TYPEALIGNMENT STORM_CUDA_COMPILE_RESULT_TYPEALIGNMENT
$ { P R O J E C T _ B I N A R Y _ D I R } " $ { P R O J E C T _ S O U R C E _ D I R } / c u d a / C M a k e A l i g n m e n t C h e c k . c p p "
C O M P I L E _ O U T P U T _ V A R I A B L E O U T P U T _ T E S T _ V A R
)
if ( NOT STORM_CUDA_COMPILE_RESULT_TYPEALIGNMENT )
message ( FATAL_ERROR "StoRM (CudaPlugin) - Could not test type alignment, there was an Error while compiling the file ${PROJECT_SOURCE_DIR}/cuda/CMakeAlignmentCheck.cpp: ${OUTPUT_TEST_VAR}" )
elseif ( STORM_CUDA_RUN_RESULT_TYPEALIGNMENT EQUAL 0 )
message ( STATUS "StoRM (CudaPlugin) - Result of Type Alignment Check: OK." )
else ( )
message ( FATAL_ERROR "StoRM (CudaPlugin) - Result of Type Alignment Check: FAILED (Code ${STORM_CUDA_RUN_RESULT_TYPEALIGNMENT})" )
endif ( )
# T e s t f o r F l o a t 6 4 b i t A l i g n m e n t
try_run ( STORM_CUDA_RUN_RESULT_FLOATALIGNMENT STORM_CUDA_COMPILE_RESULT_FLOATALIGNMENT
$ { P R O J E C T _ B I N A R Y _ D I R } " $ { P R O J E C T _ S O U R C E _ D I R } / c u d a / C M a k e F l o a t A l i g n m e n t C h e c k . c p p "
C O M P I L E _ O U T P U T _ V A R I A B L E O U T P U T _ T E S T _ V A R
)
if ( NOT STORM_CUDA_COMPILE_RESULT_FLOATALIGNMENT )
message ( FATAL_ERROR "StoRM (CudaPlugin) - Could not test float type alignment, there was an Error while compiling the file ${PROJECT_SOURCE_DIR}/cuda/CMakeFloatAlignmentCheck.cpp: ${OUTPUT_TEST_VAR}" )
elseif ( STORM_CUDA_RUN_RESULT_FLOATALIGNMENT EQUAL 2 )
message ( STATUS "StoRM (CudaPlugin) - Result of Float Type Alignment Check: 64bit alignment active." )
set ( STORM_CUDAPLUGIN_FLOAT_64BIT_ALIGN_DEF "define" )
elseif ( STORM_CUDA_RUN_RESULT_FLOATALIGNMENT EQUAL 3 )
message ( STATUS "StoRM (CudaPlugin) - Result of Float Type Alignment Check: 64bit alignment disabled." )
set ( STORM_CUDAPLUGIN_FLOAT_64BIT_ALIGN_DEF "undef" )
else ( )
message ( FATAL_ERROR "StoRM (CudaPlugin) - Result of Float Type Alignment Check: FAILED (Code ${STORM_CUDA_RUN_RESULT_FLOATALIGNMENT})" )
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 )
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_CUDAPLUGIN_VERSION_MAJOR "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" STORM_CUDAPLUGIN_VERSION_MINOR "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" STORM_CUDAPLUGIN_VERSION_PATCH "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-([0-9]+)\\-.*" "\\1" STORM_CUDAPLUGIN_VERSION_COMMITS_AHEAD "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+\\-([a-z0-9]+).*" "\\1" STORM_CUDAPLUGIN_VERSION_HASH "${STORM_GIT_VERSION_STRING}" )
string ( REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+\\-[a-z0-9]+\\-(.*)" "\\1" STORM_CUDAPLUGIN_VERSION_APPENDIX "${STORM_GIT_VERSION_STRING}" )
if ( "${STORM_CUDAPLUGIN_VERSION_APPENDIX}" MATCHES "^.*dirty.*$" )
set ( STORM_CUDAPLUGIN_VERSION_DIRTY 1 )
else ( )
set ( STORM_CUDAPLUGIN_VERSION_DIRTY 0 )
endif ( )
message ( STATUS "StoRM (CudaPlugin) - Version information: ${STORM_CUDAPLUGIN_VERSION_MAJOR}.${STORM_CUDAPLUGIN_VERSION_MINOR}.${STORM_CUDAPLUGIN_VERSION_PATCH} (${STORM_CUDAPLUGIN_VERSION_COMMITS_AHEAD} commits ahead of Tag) build from ${STORM_CUDAPLUGIN_VERSION_HASH} (Dirty: ${STORM_CUDAPLUGIN_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 } / c u d a / s t o r m - c u d a p l u g i n - 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 u d a p l u g i n - c o n f i g . h "
)
# c r e a t e l i b r a r y
find_package ( CUDA REQUIRED )
set ( CUSP_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/resources/3rdparty/cusplibrary" )
find_package ( Cusp REQUIRED )
find_package ( Thrust REQUIRED )
set ( STORM_CUDA_LIB_NAME "storm-cuda" )
file ( GLOB_RECURSE STORM_CUDA_KERNEL_FILES ${ PROJECT_SOURCE_DIR } /cuda/kernels/*.cu )
file ( GLOB_RECURSE STORM_CUDA_HEADER_FILES ${ PROJECT_SOURCE_DIR } /cuda/kernels/*.h )
source_group ( kernels FILES ${ STORM_CUDA_KERNEL_FILES } ${ STORM_CUDA_HEADER_FILES } )
include_directories ( ${ PROJECT_SOURCE_DIR } /cuda/kernels/ )
# set ( CUDA_PROPAGATE_HOST_FLAGS OFF )
set ( CUDA_NVCC_FLAGS "-arch=sm_30" )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # C U S P
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
if ( CUSP_FOUND )
include_directories ( ${ CUSP_INCLUDE_DIR } )
cuda_include_directories ( ${ CUSP_INCLUDE_DIR } )
message ( STATUS "StoRM (CudaPlugin) - Found CUSP Version ${CUSP_VERSION} in location ${CUSP_INCLUDE_DIR}" )
else ( )
message ( FATAL_ERROR "StoRM (CudaPlugin) - Could not find CUSP!" )
endif ( )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# # T h r u s t
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
if ( THRUST_FOUND )
include_directories ( ${ THRUST_INCLUDE_DIR } )
cuda_include_directories ( ${ THRUST_INCLUDE_DIR } )
message ( STATUS "StoRM (CudaPlugin) - Found Thrust Version ${THRUST_VERSION} in location ${THRUST_INCLUDE_DIR}" )
else ( )
message ( FATAL_ERROR "StoRM (CudaPlugin) - Could not find Thrust! Check your CUDA installation." )
endif ( )
include_directories ( ${ CUDA_INCLUDE_DIRS } )
include_directories ( ${ ADDITIONAL_INCLUDE_DIRS } )
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 ( )