@ -210,109 +210,107 @@ set(STORM_HAVE_CARL OFF)
set ( CARL_MINYEAR 17 )
set ( CARL_MINMONTH 06 )
set ( CARL_MINPATCH 0 )
if ( USE_CARL )
if ( NOT STORM_FORCE_SHIPPED_CARL )
find_package ( carl QUIET )
endif ( )
if ( carl_FOUND AND NOT STORM_FORCE_SHIPPED_CARL )
get_target_property ( carlLOCATION lib_carl LOCATION )
if ( ${ carlLOCATION } STREQUAL "carlLOCATION-NOTFOUND" )
message ( SEND_ERROR "Library location for carl is not found, did you build carl?" )
elseif ( EXISTS ${ carlLOCATION } )
# e m p t y o n p u r p o s e
else ( )
message ( SEND_ERROR "File ${carlLOCATION} does not exist, did you build carl?" )
endif ( )
if ( ${ carl_MINORYEARVERSION } LESS ${ CARL_MINYEAR } )
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 )
endif ( )
endif ( )
if ( carl_FOUND AND NOT STORM_FORCE_SHIPPED_CARL )
get_target_property ( carlLOCATION lib_carl LOCATION )
if ( ${ carlLOCATION } STREQUAL "carlLOCATION-NOTFOUND" )
message ( SEND_ERROR "Library location for carl is not found, did you build carl?" )
elseif ( EXISTS ${ carlLOCATION } )
# e m p t y o n p u r p o s e
else ( )
message ( SEND_ERROR "File ${carlLOCATION} does not exist, did you build carl?" )
endif ( )
if ( ${ carl_MINORYEARVERSION } LESS ${ CARL_MINYEAR } )
message ( SEND_ERROR "Carl outdated, require ${CARL_MINYEAR}.${CARL_MINMONTH}.${CARL_MINPATCH}, have ${carl_VERSION}" )
elseif ( ${ carl_MINORYEARVERSION } EQUAL ${ CARL_MINYEAR } )
if ( ${ carl_MINORMONTHVERSION } LESS ${ CARL_MINMONTH } )
message ( SEND_ERROR "Carl outdated, require ${CARL_MINYEAR}.${CARL_MINMONTH}.${CARL_MINPATCH}, have ${carl_VERSION}" )
elseif ( ${ carl_MINORYEARVERSION } EQUAL ${ CARL_MINYEAR } )
if ( ${ carl_MINORMONTHVERSION } LESS ${ CARL_MINMONTH } )
elseif ( ${ carl_MINORMONTH VERSION } EQUAL ${ CARL_MINMONTH } )
if ( ${ carl_MAINTENANCE VERSION } LESS ${ CARL_MINPATC H } )
message ( SEND_ERROR "Carl outdated, require ${CARL_MINYEAR}.${CARL_MINMONTH}.${CARL_MINPATCH}, have ${carl_VERSION}" )
elseif ( ${ carl_MINORMONTHVERSION } EQUAL ${ CARL_MINMONTH } )
if ( ${ carl_MAINTENANCEVERSION } LESS ${ CARL_MINPATCH } )
message ( SEND_ERROR "Carl outdated, require ${CARL_MINYEAR}.${CARL_MINMONTH}.${CARL_MINPATCH}, have ${carl_VERSION}" )
endif ( )
endif ( )
endif ( )
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})." )
set ( STORM_HAVE_CLN ${ CARL_USE_CLN_NUMBERS } )
set ( STORM_HAVE_GINAC ${ CARL_USE_GINAC } )
else ( )
set ( STORM_SHIPPED_CARL ON )
# T h e f i r s t e x t e r n a l p r o j e c t w i l l b e b u i l t a t * c o n f i g u r e s t a g e *
message ( "START CARL CONFIG PROCESS" )
file ( MAKE_DIRECTORY ${ STORM_3RDPARTY_BINARY_DIR } /carl_download )
execute_process (
C O M M A N D $ { C M A K 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 a r l " - D S T O R M _ 3 R D P A R T Y _ 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 } " " - D B o o s t _ L I B R A R Y _ D I R S = $ { B o o s t _ L I B R A R Y _ D I R S } " " - D B o o s t _ I N C L U D E _ D I R S = $ { B o o s t _ I N C L U D E _ D I R S } "
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})." )
set ( STORM_HAVE_CLN ${ CARL_USE_CLN_NUMBERS } )
set ( STORM_HAVE_GINAC ${ CARL_USE_GINAC } )
else ( )
set ( STORM_SHIPPED_CARL ON )
# T h e f i r s t e x t e r n a l p r o j e c t w i l l b e b u i l t a t * c o n f i g u r e s t a g e *
message ( "START CARL CONFIG PROCESS" )
file ( MAKE_DIRECTORY ${ STORM_3RDPARTY_BINARY_DIR } /carl_download )
execute_process (
C O M M A N D $ { C M A K 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 a r l " - D S T O R M _ 3 R D P A R T Y _ 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 } " " - D B o o s t _ L I B R A R Y _ D I R S = $ { B o o s t _ L I B R A R Y _ D I R S } " " - D B o o s t _ I N C L U D E _ D I R S = $ { B o o s t _ I N C L U D E _ D I R S } "
W O R K I N G _ D I R E C T O R Y $ { S T O R M _ 3 R D P A R T Y _ B I N A R Y _ D I R } / c a r l _ d o w n l o a d
O U T P U T _ V A R I A B L E c a r l c o n f i g _ o u t
R E S U L T _ V A R I A B L E c a r l c o n f i g _ r e s u l t )
if ( NOT carlconfig_result )
message ( "${carlconfig_out}" )
endif ( )
execute_process (
C O M M A N D $ { C M A K E _ C O M M A N D } - - b u i l d . - - t a r g e t c a r l - c o n f i g
W O R K I N G _ D I R E C T O R Y $ { S T O R M _ 3 R D P A R T Y _ B I N A R Y _ D I R } / c a r l _ d o w n l o a d
O U T P U T _ V A R I A B L E c a r l c o n f i g _ o u t
R E S U L T _ V A R I A B L E c a r l c o n f i g _ r e s u l t )
R E S U L T _ V A R I A B L E c a r l c o n f i g _ r e s u l t
)
if ( NOT carlconfig_result )
message ( "${carlconfig_out}" )
endif ( )
execute_process (
C O M M A N D $ { C M A K E _ C O M M A N D } - - b u i l d . - - t a r g e t c a r l - c o n f i g
W O R K I N G _ D I R E C T O R Y $ { S T O R M _ 3 R D P A R T Y _ B I N A R Y _ D I R } / c a r l _ d o w n l o a d
O U T P U T _ V A R I A B L E c a r l c o n f i g _ o u t
R E S U L T _ V A R I A B L E c a r l c o n f i g _ r e s u l t
)
if ( NOT carlconfig_result )
message ( "${carlconfig_out}" )
endif ( )
message ( "END CARL CONFIG PROCESS" )
message ( STATUS "Storm - Using shipped version of carl." )
ExternalProject_Add (
c a r l
S O U R C E _ 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 } / c a r l
C O N F I G U R E _ C O M M A N D " "
B U I L D _ I N _ S O U R C E 1
B U I L D _ C O M M A N D m a k e l i b _ c a r l
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
L O G _ B U I L D O N
L O G _ I N S T A L L O N
B U I L D _ B Y P R O D U C T S $ { S T O R M _ 3 R D P A R T Y _ B I N A R Y _ D I R } / c a r l / l i b / l i b c a r l $ { D Y N A M I C _ E X T }
)
include ( ${ STORM_3RDPARTY_BINARY_DIR } /carl/carlConfig.cmake )
set ( STORM_HAVE_CLN ${ CARL_USE_CLN_NUMBERS } )
set ( STORM_HAVE_GINAC ${ CARL_USE_GINAC } )
add_dependencies ( resources carl )
set ( carl_INCLUDE_DIR "${STORM_3RDPARTY_BINARY_DIR}/carl/include/" )
set ( carl_LIBRARIES ${ STORM_3RDPARTY_BINARY_DIR } /carl/lib/libcarl ${ DYNAMIC_EXT } )
set ( STORM_HAVE_CARL ON )
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})." )
# i n s t a l l t h e c a r l d y n a m i c l i b r a r y i f w e b u i l d i t
install ( FILES ${ STORM_3RDPARTY_BINARY_DIR } /carl/lib/libcarl. ${ carl_VERSION } ${ DYNAMIC_EXT } DESTINATION lib )
endif ( )
if ( STORM_USE_CLN_RF AND NOT STORM_HAVE_CLN )
message ( FATAL_ERROR "Cannot use CLN numbers if carl is build without." )
message ( "${carlconfig_out}" )
endif ( )
if ( STORM_USE_CLN_RF AND NOT STORM_HAVE_GINAC )
message ( FATAL_ERROR "Cannot use CLN numbers if carl is build without ginac." )
endif ( )
message ( "END CARL CONFIG PROCESS" )
message ( STATUS "Storm - Using shipped version of carl." )
ExternalProject_Add (
c a r l
S O U R C E _ 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 } / c a r l
C O N F I G U R E _ C O M M A N D " "
B U I L D _ I N _ S O U R C E 1
B U I L D _ C O M M A N D m a k e l i b _ c a r l
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
L O G _ B U I L D O N
L O G _ I N S T A L L O N
B U I L D _ B Y P R O D U C T S $ { S T O R M _ 3 R D P A R T Y _ B I N A R Y _ D I R } / c a r l / l i b / l i b c a r l $ { D Y N A M I C _ E X T }
)
include ( ${ STORM_3RDPARTY_BINARY_DIR } /carl/carlConfig.cmake )
set ( STORM_HAVE_CLN ${ CARL_USE_CLN_NUMBERS } )
set ( STORM_HAVE_GINAC ${ CARL_USE_GINAC } )
# T h e l i b r a r y t h a t n e e d s s y m b o l s m u s t b e f i r s t , t h e n t h e l i b r a r y t h a t r e s o l v e s t h e s y m b o l .
add_dependencies ( resources carl )
set ( carl_INCLUDE_DIR "${STORM_3RDPARTY_BINARY_DIR}/carl/include/" )
set ( carl_LIBRARIES ${ STORM_3RDPARTY_BINARY_DIR } /carl/lib/libcarl ${ DYNAMIC_EXT } )
set ( STORM_HAVE_CARL ON )
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 )
endif ( )
list ( APPEND STORM_DEP_IMP_TARGETS GMPXX_SHARED GMP_SHARED )
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})." )
# i n s t a l l t h e c a r l d y n a m i c l i b r a r y i f w e b u i l t i t
install ( FILES ${ STORM_3RDPARTY_BINARY_DIR } /carl/lib/libcarl. ${ carl_VERSION } ${ DYNAMIC_EXT } DESTINATION lib )
endif ( )
if ( STORM_USE_CLN_RF AND NOT STORM_HAVE_CLN )
message ( FATAL_ERROR "Cannot use CLN numbers if carl is build without." )
endif ( )
if ( STORM_USE_CLN_RF AND NOT STORM_HAVE_GINAC )
message ( FATAL_ERROR "Cannot use CLN numbers if carl is build without ginac." )
endif ( )
# T h e l i b r a r y t h a t n e e d s s y m b o l s m u s t b e f i r s t , t h e n t h e l i b r a r y t h a t r e s o l v e s t h e s y m b o l .
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 )
endif ( )
list ( APPEND STORM_DEP_IMP_TARGETS GMPXX_SHARED GMP_SHARED )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #