You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.0 KiB

  1. ####
  2. #### Find autoreconf for cudd update step
  3. find_program(AUTORECONF autoreconf)
  4. find_program(ACLOCAL aclocal)
  5. mark_as_advanced(AUTORECONF)
  6. mark_as_advanced(ACLOCAL)
  7. if (NOT AUTORECONF)
  8. message(FATAL_ERROR "Cannot find autoreconf, cannot compile cudd3.")
  9. endif()
  10. if (NOT ACLOCAL)
  11. message(FATAL_ERROR "Cannot find aclocal, cannot compile cudd3.")
  12. endif()
  13. set(CUDD_LIB_DIR ${STORM_3RDPARTY_BINARY_DIR}/cudd-3.0.0/lib)
  14. set(STORM_CUDD_FLAGS "CFLAGS=-O3 -w -DPIC -DHAVE_IEEE_754 -fno-common -ffast-math -fno-finite-math-only")
  15. if (NOT STORM_PORTABLE)
  16. set(STORM_CUDD_FLAGS "${STORM_CUDD_FLAGS} -march=native")
  17. endif()
  18. ExternalProject_Add(
  19. cudd3
  20. DOWNLOAD_COMMAND ""
  21. SOURCE_DIR ${STORM_3RDPARTY_SOURCE_DIR}/cudd-3.0.0
  22. PREFIX ${STORM_3RDPARTY_BINARY_DIR}/cudd-3.0.0
  23. PATCH_COMMAND ${AUTORECONF}
  24. CONFIGURE_COMMAND ${STORM_3RDPARTY_SOURCE_DIR}/cudd-3.0.0/configure --enable-shared --enable-obj --with-pic=yes --prefix=${STORM_3RDPARTY_BINARY_DIR}/cudd-3.0.0 --libdir=${CUDD_LIB_DIR} CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER}
  25. BUILD_COMMAND make ${STORM_CUDD_FLAGS}
  26. INSTALL_COMMAND make install
  27. BUILD_IN_SOURCE 0
  28. LOG_CONFIGURE ON
  29. LOG_BUILD ON
  30. LOG_INSTALL ON
  31. BUILD_BYPRODUCTS ${CUDD_LIB_DIR}/libcudd${DYNAMIC_EXT} ${CUDD_LIB_DIR}/libcudd${STATIC_EXT}
  32. )
  33. # Do not use system CUDD, StoRM has a modified version
  34. set(CUDD_INCLUDE_DIR ${STORM_3RDPARTY_BINARY_DIR}/cudd-3.0.0/include)
  35. set(CUDD_SHARED_LIBRARY ${CUDD_LIB_DIR}/libcudd${DYNAMIC_EXT})
  36. set(CUDD_STATIC_LIBRARY ${CUDD_LIB_DIR}/libcudd${STATIC_EXT})
  37. set(CUDD_VERSION_STRING 3.0.0)
  38. add_imported_library(cudd SHARED ${CUDD_SHARED_LIBRARY} ${CUDD_INCLUDE_DIR})
  39. add_imported_library(cudd STATIC ${CUDD_STATIC_LIBRARY} ${CUDD_INCLUDE_DIR})
  40. add_dependencies(resources cudd3)
  41. if(BUILD_SHARED_LIBS)
  42. list(APPEND STORM_DEP_TARGETS cudd_SHARED)
  43. else()
  44. list(APPEND STORM_DEP_TARGETS cudd_STATIC)
  45. endif()
  46. message(STATUS "storm - Linking with CUDD ${CUDD_VERSION_STRING}.")