diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt index b9af8dc95..8d6bc7aff 100644 --- a/resources/3rdparty/CMakeLists.txt +++ b/resources/3rdparty/CMakeLists.txt @@ -4,22 +4,9 @@ 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( - cudd3 - DOWNLOAD_COMMAND "" - SOURCE_DIR ${STORM_3RDPARTY_SOURCE_DIR}/cudd-3.0.0 - PREFIX ${STORM_3RDPARTY_BINARY_DIR}/cudd-3.0.0 - UPDATE_COMMAND autoreconf - CONFIGURE_COMMAND ${STORM_3RDPARTY_SOURCE_DIR}/cudd-3.0.0/configure --enable-shared --enable-obj --prefix=${STORM_3RDPARTY_SOURCE_DIR}/cudd-3.0.0 --libdir=${STORM_3RDPARTY_SOURCE_DIR}/cudd-3.0.0/lib CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} - BUILD_COMMAND make "CFLAGS=-O2 -w" - INSTALL_COMMAND make install - BUILD_IN_SOURCE 0 - LOG_CONFIGURE ON - LOG_BUILD ON - LOG_INSTALL ON -) +#### +#### Find autoreconf for cudd update step +find_program(AUTORECONF autoreconf) ExternalProject_Add( sylvan @@ -220,18 +207,7 @@ endif() ## CUDD ## ############################################################# - -# Do not use system CUDD, StoRM has a modified version -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}) +include(${STORM_3RDPARTY_SOURCE_DIR}/include_cudd.cmake) ############################################################# ## diff --git a/resources/3rdparty/include_cudd.cmake b/resources/3rdparty/include_cudd.cmake new file mode 100644 index 000000000..e53168848 --- /dev/null +++ b/resources/3rdparty/include_cudd.cmake @@ -0,0 +1,31 @@ +if(NOT AUTORECONF) + message(ERROR "Cannot find autoreconf, cannot compile cudd3") +endif() + + +ExternalProject_Add( + cudd3 + DOWNLOAD_COMMAND "" + SOURCE_DIR ${STORM_3RDPARTY_SOURCE_DIR}/cudd-3.0.0 + PREFIX ${STORM_3RDPARTY_BINARY_DIR}/cudd-3.0.0 + UPDATE_COMMAND ${AUTORECONF} + CONFIGURE_COMMAND ${STORM_3RDPARTY_SOURCE_DIR}/cudd-3.0.0/configure --enable-shared --enable-obj --prefix=${STORM_3RDPARTY_SOURCE_DIR}/cudd-3.0.0 --libdir=${STORM_3RDPARTY_SOURCE_DIR}/cudd-3.0.0/lib CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} + BUILD_COMMAND make "CFLAGS=-O2 -w" + INSTALL_COMMAND make install + BUILD_IN_SOURCE 0 + LOG_CONFIGURE ON + LOG_BUILD ON + LOG_INSTALL ON +) + +# Do not use system CUDD, StoRM has a modified version +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}) \ No newline at end of file