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.

801 lines
35 KiB

  1. cmake_minimum_required (VERSION 2.8.6)
  2. cmake_policy(VERSION 3.2)
  3. # Set project name
  4. project (storm CXX C)
  5. # Add base folder for better inclusion paths
  6. include_directories("${PROJECT_SOURCE_DIR}")
  7. include_directories("${PROJECT_SOURCE_DIR}/src")
  8. # Add the version of Eigen3 in the repository to the include pathes
  9. set(EIGEN3_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/eigen")
  10. include_directories(${EIGEN3_INCLUDE_DIR})
  11. # Add the version of GMM in the repository to the include pathes
  12. set(GMMXX_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/gmm-5.0/include")
  13. include_directories(${GMMXX_INCLUDE_DIR})
  14. #############################################################
  15. ##
  16. ## CMake options of StoRM
  17. ##
  18. #############################################################
  19. option(STORM_DEBUG "Sets whether the DEBUG mode is used" ON)
  20. option(STORM_USE_POPCNT "Sets whether the popcnt instruction is going to be used." ON)
  21. option(USE_BOOST_STATIC_LIBRARIES "Sets whether the Boost libraries should be linked statically." ON)
  22. option(STORM_USE_INTELTBB "Sets whether the Intel TBB libraries should be used." OFF)
  23. option(STORM_USE_COTIRE "Sets whether Cotire should be used (for building precompiled headers)." OFF)
  24. option(LINK_LIBCXXABI "Sets whether libc++abi should be linked." OFF)
  25. option(USE_LIBCXX "Sets whether the standard library is libc++." OFF)
  26. option(USE_CARL "Sets whether carl should be included." ON)
  27. option(FORCE_COLOR "Force color output" ON)
  28. option(STORM_PYTHON "Builds the API for Python" OFF)
  29. set(GUROBI_ROOT "" CACHE STRING "A hint to the root directory of Gurobi (optional).")
  30. set(Z3_ROOT "" CACHE STRING "A hint to the root directory of Z3 (optional).")
  31. set(CUDA_ROOT "" CACHE STRING "The root directory of CUDA.")
  32. set(MSAT_ROOT "" CACHE STRING "The root directory of MathSAT (if available).")
  33. set(ADDITIONAL_INCLUDE_DIRS "" CACHE STRING "Additional directories added to the include directories.")
  34. set(ADDITIONAL_LINK_DIRS "" CACHE STRING "Additional directories added to the link directories.")
  35. set(CUSTOM_BOOST_ROOT "" CACHE STRING "A custom path to the Boost root directory.")
  36. #############################################################
  37. ##
  38. ## Inclusion of required libraries
  39. ##
  40. #############################################################
  41. # Add the resources/cmake folder to Module Search Path for FindTBB.cmake
  42. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/resources/cmake/")
  43. # Boost Option variables
  44. set(Boost_USE_STATIC_LIBS ON)
  45. set(Boost_USE_MULTITHREADED ON)
  46. set(Boost_USE_STATIC_RUNTIME OFF)
  47. # If a custom boost root directory was specified, we set the corresponding hint for the script to find it.
  48. if(CUSTOM_BOOST_ROOT)
  49. message(STATUS "StoRM - Using Boost from CUSTOM_BOOST_ROOT located at ${CUSTOM_BOOST_ROOT}")
  50. set(BOOST_ROOT "${CUSTOM_BOOST_ROOT}")
  51. endif(CUSTOM_BOOST_ROOT)
  52. set(TBB_INSTALL_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/tbb42_20140122_merged-win-lin-mac")
  53. if(STORM_PYTHON)
  54. find_package(Boost REQUIRED COMPONENTS python3)
  55. else()
  56. find_package(Boost REQUIRED)
  57. endif()
  58. find_package(Doxygen REQUIRED)
  59. find_package(Gurobi)
  60. find_package(TBB)
  61. find_package(Threads REQUIRED)
  62. find_package(GMP)
  63. find_package(Z3 QUIET)
  64. # If the DEBUG option was turned on, we will target a debug version and a release version otherwise.
  65. if (STORM_DEBUG)
  66. set (CMAKE_BUILD_TYPE "DEBUG")
  67. else()
  68. set (CMAKE_BUILD_TYPE "RELEASE")
  69. endif()
  70. message(STATUS "StoRM - Building ${CMAKE_BUILD_TYPE} version.")
  71. if ("${GUROBI_ROOT}" STREQUAL "" AND NOT GUROBI_FOUND)
  72. set(ENABLE_GUROBI OFF)
  73. else()
  74. set(ENABLE_GUROBI ON)
  75. endif()
  76. if ("${CUDA_ROOT}" STREQUAL "")
  77. set(ENABLE_CUDA OFF)
  78. else()
  79. set(ENABLE_CUDA ON)
  80. endif()
  81. if ("${MSAT_ROOT}" STREQUAL "")
  82. set(ENABLE_MSAT OFF)
  83. else()
  84. set(ENABLE_MSAT ON)
  85. endif()
  86. if(USE_CARL)
  87. find_package(carl QUIET)
  88. if(carl_FOUND)
  89. set(STORM_HAVE_CARL ON)
  90. endif()
  91. find_package(smtrat QUIET)
  92. if(smtrat_FOUND)
  93. set(STORM_HAVE_SMTRAT ON)
  94. endif()
  95. endif()
  96. if(STORM_PYTHON)
  97. set(Python_ADDITIONAL_VERSIONS 3.4)
  98. FIND_PACKAGE(PythonInterp REQUIRED)
  99. FIND_PACKAGE(PythonLibs 3.4 REQUIRED)
  100. include_directories(${PYTHON_INCLUDE_DIR})
  101. endif()
  102. message(STATUS "StoRM - CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
  103. message(STATUS "StoRM - CMAKE_BUILD_TYPE (ENV): $ENV{CMAKE_BUILD_TYPE}")
  104. #############################################################
  105. ##
  106. ## Compiler specific settings and definitions
  107. ##
  108. #############################################################
  109. # Path to the no-strict-aliasing target
  110. set(CONVERSIONHELPER_TARGET "${PROJECT_SOURCE_DIR}/src/utility/ConversionHelper.cpp")
  111. if(CMAKE_COMPILER_IS_GNUCC)
  112. set(STORM_COMPILED_BY "GCC")
  113. # Set standard flags for GCC
  114. set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -funroll-loops")
  115. set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -funroll-loops")
  116. add_definitions(-DBOOST_RESULT_OF_USE_DECLTYPE)
  117. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -pedantic -Wno-deprecated-declarations -Wno-unused-local-typedefs")
  118. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -Wno-deprecated-declarations")
  119. # Turn on popcnt instruction if desired (yes by default)
  120. if (STORM_USE_POPCNT)
  121. set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcnt")
  122. endif(STORM_USE_POPCNT)
  123. # Set the no-strict-aliasing target for GCC
  124. set_source_files_properties(${CONVERSIONHELPER_TARGET} PROPERTIES COMPILE_FLAGS " -fno-strict-aliasing")
  125. elseif(MSVC)
  126. set(STORM_COMPILED_BY "MSVC")
  127. # required for GMM to compile, ugly error directive in their code
  128. add_definitions(/D_SCL_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS)
  129. # required as the PRCTL Parser bloats object files (COFF) beyond their maximum size (see http://msdn.microsoft.com/en-us/library/8578y171(v=vs.110).aspx)
  130. add_definitions(/bigobj)
  131. # required by GTest and PrismGrammar::createIntegerVariable
  132. add_definitions(/D_VARIADIC_MAX=10)
  133. # Windows.h breaks GMM in gmm_except.h because of its macro definition for min and max
  134. add_definitions(/DNOMINMAX)
  135. # Boost Defs, required for using boost's transform iterator
  136. add_definitions(/DBOOST_RESULT_OF_USE_DECLTYPE)
  137. # since nobody cares at the moment
  138. add_definitions(/wd4250)
  139. # MSVC does not do strict-aliasing, so no option needed
  140. else(CLANG)
  141. set(STORM_COMPILED_BY "Clang (LLVM)")
  142. # As CLANG is not set as a variable, we need to set it in case we have not matched another compiler.
  143. set (CLANG ON)
  144. # Set standard flags for clang
  145. set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -funroll-loops -O3")
  146. if(UNIX AND NOT APPLE AND NOT USE_LIBCXX)
  147. set(CLANG_STDLIB libstdc++)
  148. message(STATUS "StoRM - Linking against libstdc++")
  149. else()
  150. set(CLANG_STDLIB libc++)
  151. message(STATUS "StoRM - Linking against libc++")
  152. # Disable Cotire
  153. set(STORM_USE_COTIRE OFF)
  154. # Set up some Xcode specific settings
  155. set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
  156. set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
  157. endif()
  158. add_definitions(-DBOOST_RESULT_OF_USE_DECLTYPE)
  159. set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -stdlib=${CLANG_STDLIB} -Wall -pedantic -Wno-newline-eof -Wno-mismatched-tags -ftemplate-depth=1024")
  160. set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic")
  161. if(FORCE_COLOR)
  162. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
  163. endif()
  164. # Turn on popcnt instruction if desired (yes by default)
  165. if (STORM_USE_POPCNT)
  166. set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcnt")
  167. endif(STORM_USE_POPCNT)
  168. # Set the no-strict-aliasing target for Clang
  169. set_source_files_properties(${CONVERSIONHELPER_TARGET} PROPERTIES COMPILE_FLAGS " -fno-strict-aliasing ")
  170. endif()
  171. message(STATUS "StoRM - Using Compiler Configuration: ${STORM_COMPILED_BY}")
  172. #############################################################
  173. ##
  174. ## CMake-generated Config File for StoRM
  175. ##
  176. #############################################################
  177. #
  178. # Make a version file containing the current version from git.
  179. #
  180. include(GetGitRevisionDescription)
  181. git_describe_checkout(STORM_GIT_VERSION_STRING)
  182. message(STATUS "STORM_GIT_VERSION_STRING: ${STORM_GIT_VERSION_STRING}")
  183. # Parse the git Tag into variables
  184. string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" STORM_CPP_VERSION_MAJOR "${STORM_GIT_VERSION_STRING}")
  185. string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" STORM_CPP_VERSION_MINOR "${STORM_GIT_VERSION_STRING}")
  186. string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" STORM_CPP_VERSION_PATCH "${STORM_GIT_VERSION_STRING}")
  187. string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-([0-9]+)\\-.*" "\\1" STORM_CPP_VERSION_COMMITS_AHEAD "${STORM_GIT_VERSION_STRING}")
  188. string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+\\-([a-z0-9]+).*" "\\1" STORM_CPP_VERSION_HASH "${STORM_GIT_VERSION_STRING}")
  189. string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+\\-[a-z0-9]+\\-(.*)" "\\1" STORM_CPP_VERSION_APPENDIX "${STORM_GIT_VERSION_STRING}")
  190. if ("${STORM_CPP_VERSION_APPENDIX}" MATCHES "^.*dirty.*$")
  191. set(STORM_CPP_VERSION_DIRTY 1)
  192. else()
  193. set(STORM_CPP_VERSION_DIRTY 0)
  194. endif()
  195. 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})")
  196. # Base path for test files
  197. set(STORM_CPP_TESTS_BASE_PATH "${PROJECT_SOURCE_DIR}/test")
  198. # Gurobi Defines
  199. set(STORM_HAVE_GUROBI ${ENABLE_GUROBI})
  200. # CUDA Defines
  201. if (ENABLE_CUDA)
  202. set(STORM_CPP_CUDA_DEF "define")
  203. else()
  204. set(STORM_CPP_CUDA_DEF "undef")
  205. endif()
  206. # glpk defines
  207. set(STORM_HAVE_GLPK 1)
  208. # CUDA Defines
  209. set(STORM_CPP_CUDAFORSTORM_DEF "undef")
  210. # Z3 Defines
  211. set(STORM_HAVE_Z3 ${Z3_FOUND})
  212. # MathSAT Defines
  213. set(STORM_HAVE_MSAT ${ENABLE_MSAT})
  214. # Intel TBB Defines
  215. if (TBB_FOUND AND STORM_USE_INTELTBB)
  216. set(STORM_CPP_INTELTBB_DEF "define")
  217. else()
  218. set(STORM_CPP_INTELTBB_DEF "undef")
  219. endif()
  220. # Configure a header file to pass some of the CMake settings to the source code
  221. configure_file (
  222. "${PROJECT_SOURCE_DIR}/storm-config.h.in"
  223. "${PROJECT_BINARY_DIR}/include/storm-config.h"
  224. )
  225. # Configure a header file to pass the storm version to the source code
  226. configure_file (
  227. "${PROJECT_SOURCE_DIR}/storm-version.cpp.in"
  228. "${PROJECT_BINARY_DIR}/src/utility/storm-version.cpp"
  229. )
  230. set(STORM_GENERATED_SOURCES "${PROJECT_BINARY_DIR}/src/utility/storm-version.cpp")
  231. # Add the binary dir include directory for storm-config.h
  232. include_directories("${PROJECT_BINARY_DIR}/include")
  233. #############################################################
  234. ##
  235. ## CUDA Library generation
  236. ##
  237. #############################################################
  238. if(ENABLE_CUDA)
  239. # Test for type alignment
  240. try_run(STORM_CUDA_RUN_RESULT_TYPEALIGNMENT STORM_CUDA_COMPILE_RESULT_TYPEALIGNMENT
  241. ${PROJECT_BINARY_DIR} "${PROJECT_SOURCE_DIR}/cuda/CMakeAlignmentCheck.cpp"
  242. COMPILE_OUTPUT_VARIABLE OUTPUT_TEST_VAR
  243. )
  244. if(NOT STORM_CUDA_COMPILE_RESULT_TYPEALIGNMENT)
  245. 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}")
  246. elseif(STORM_CUDA_RUN_RESULT_TYPEALIGNMENT EQUAL 0)
  247. message(STATUS "StoRM (CudaPlugin) - Result of Type Alignment Check: OK.")
  248. else()
  249. message(FATAL_ERROR "StoRM (CudaPlugin) - Result of Type Alignment Check: FAILED (Code ${STORM_CUDA_RUN_RESULT_TYPEALIGNMENT})")
  250. endif()
  251. # Test for Float 64bit Alignment
  252. try_run(STORM_CUDA_RUN_RESULT_FLOATALIGNMENT STORM_CUDA_COMPILE_RESULT_FLOATALIGNMENT
  253. ${PROJECT_BINARY_DIR} "${PROJECT_SOURCE_DIR}/cuda/CMakeFloatAlignmentCheck.cpp"
  254. COMPILE_OUTPUT_VARIABLE OUTPUT_TEST_VAR
  255. )
  256. if(NOT STORM_CUDA_COMPILE_RESULT_FLOATALIGNMENT)
  257. 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}")
  258. elseif(STORM_CUDA_RUN_RESULT_FLOATALIGNMENT EQUAL 2)
  259. message(STATUS "StoRM (CudaPlugin) - Result of Float Type Alignment Check: 64bit alignment active.")
  260. set(STORM_CUDAPLUGIN_FLOAT_64BIT_ALIGN_DEF "define")
  261. elseif(STORM_CUDA_RUN_RESULT_FLOATALIGNMENT EQUAL 3)
  262. message(STATUS "StoRM (CudaPlugin) - Result of Float Type Alignment Check: 64bit alignment disabled.")
  263. set(STORM_CUDAPLUGIN_FLOAT_64BIT_ALIGN_DEF "undef")
  264. else()
  265. message(FATAL_ERROR "StoRM (CudaPlugin) - Result of Float Type Alignment Check: FAILED (Code ${STORM_CUDA_RUN_RESULT_FLOATALIGNMENT})")
  266. endif()
  267. #
  268. # Make a version file containing the current version from git.
  269. #
  270. include(GetGitRevisionDescription)
  271. git_describe_checkout(STORM_GIT_VERSION_STRING)
  272. # Parse the git Tag into variables
  273. string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" STORM_CUDAPLUGIN_VERSION_MAJOR "${STORM_GIT_VERSION_STRING}")
  274. string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" STORM_CUDAPLUGIN_VERSION_MINOR "${STORM_GIT_VERSION_STRING}")
  275. string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" STORM_CUDAPLUGIN_VERSION_PATCH "${STORM_GIT_VERSION_STRING}")
  276. string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-([0-9]+)\\-.*" "\\1" STORM_CUDAPLUGIN_VERSION_COMMITS_AHEAD "${STORM_GIT_VERSION_STRING}")
  277. string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+\\-([a-z0-9]+).*" "\\1" STORM_CUDAPLUGIN_VERSION_HASH "${STORM_GIT_VERSION_STRING}")
  278. string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+\\-[a-z0-9]+\\-(.*)" "\\1" STORM_CUDAPLUGIN_VERSION_APPENDIX "${STORM_GIT_VERSION_STRING}")
  279. if ("${STORM_CUDAPLUGIN_VERSION_APPENDIX}" MATCHES "^.*dirty.*$")
  280. set(STORM_CUDAPLUGIN_VERSION_DIRTY 1)
  281. else()
  282. set(STORM_CUDAPLUGIN_VERSION_DIRTY 0)
  283. endif()
  284. 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})")
  285. # Configure a header file to pass some of the CMake settings to the source code
  286. configure_file (
  287. "${PROJECT_SOURCE_DIR}/cuda/storm-cudaplugin-config.h.in"
  288. "${PROJECT_BINARY_DIR}/include/storm-cudaplugin-config.h"
  289. )
  290. #create library
  291. find_package(CUDA REQUIRED)
  292. set(CUSP_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/resources/3rdparty/cusplibrary")
  293. find_package(Cusp REQUIRED)
  294. find_package(Thrust REQUIRED)
  295. set(STORM_CUDA_LIB_NAME "storm-cuda")
  296. file(GLOB_RECURSE STORM_CUDA_KERNEL_FILES ${PROJECT_SOURCE_DIR}/cuda/kernels/*.cu)
  297. file(GLOB_RECURSE STORM_CUDA_HEADER_FILES ${PROJECT_SOURCE_DIR}/cuda/kernels/*.h)
  298. source_group(kernels FILES ${STORM_CUDA_KERNEL_FILES} ${STORM_CUDA_HEADER_FILES})
  299. include_directories(${PROJECT_SOURCE_DIR}/cuda/kernels/)
  300. #set(CUDA_PROPAGATE_HOST_FLAGS OFF)
  301. set(CUDA_NVCC_FLAGS "-arch=sm_30")
  302. #############################################################
  303. ##
  304. ## CUSP
  305. ##
  306. #############################################################
  307. if(CUSP_FOUND)
  308. include_directories(${CUSP_INCLUDE_DIR})
  309. cuda_include_directories(${CUSP_INCLUDE_DIR})
  310. message(STATUS "StoRM (CudaPlugin) - Found CUSP Version ${CUSP_VERSION} in location ${CUSP_INCLUDE_DIR}")
  311. else()
  312. message(FATAL_ERROR "StoRM (CudaPlugin) - Could not find CUSP!")
  313. endif()
  314. #############################################################
  315. ##
  316. ## Thrust
  317. ##
  318. #############################################################
  319. if(THRUST_FOUND)
  320. include_directories(${THRUST_INCLUDE_DIR})
  321. cuda_include_directories(${THRUST_INCLUDE_DIR})
  322. message(STATUS "StoRM (CudaPlugin) - Found Thrust Version ${THRUST_VERSION} in location ${THRUST_INCLUDE_DIR}")
  323. else()
  324. message(FATAL_ERROR "StoRM (CudaPlugin) - Could not find Thrust! Check your CUDA installation.")
  325. endif()
  326. include_directories(${CUDA_INCLUDE_DIRS})
  327. include_directories(${ADDITIONAL_INCLUDE_DIRS})
  328. cuda_add_library(${STORM_CUDA_LIB_NAME}
  329. ${STORM_CUDA_KERNEL_FILES} ${STORM_CUDA_HEADER_FILES}
  330. )
  331. endif()
  332. #############################################################
  333. ##
  334. ## Source file aggregation and clustering
  335. ##
  336. #############################################################
  337. file(GLOB_RECURSE STORM_HEADERS ${PROJECT_SOURCE_DIR}/src/*.h)
  338. file(GLOB_RECURSE STORM_HEADERS_CLI ${PROJECT_SOURCE_DIR}/src/cli/*.h)
  339. file(GLOB_RECURSE STORM_SOURCES_WITHOUT_MAIN ${PROJECT_SOURCE_DIR}/src/*/*.cpp)
  340. file(GLOB_RECURSE STORM_SOURCES_CLI ${PROJECT_SOURCE_DIR}/src/cli/*.cpp)
  341. file(GLOB_RECURSE STORM_MAIN_FILE ${PROJECT_SOURCE_DIR}/src/storm.cpp)
  342. file(GLOB_RECURSE STORM_PY_SOURCES ${PROJECT_SOURCE_DIR}/src/python/*.cpp)
  343. file(GLOB_RECURSE STORM_PY_HEADERS ${PROJECT_SOURCE_DIR}/src/python/*.h)
  344. file(GLOB_RECURSE STORM_ADAPTERS_FILES ${PROJECT_SOURCE_DIR}/src/adapters/*.h ${PROJECT_SOURCE_DIR}/src/adapters/*.cpp)
  345. file(GLOB_RECURSE STORM_BUILDER_FILES ${PROJECT_SOURCE_DIR}/src/builder/*.h ${PROJECT_SOURCE_DIR}/src/builder/*.cpp)
  346. file(GLOB_RECURSE STORM_CLI_FILES ${PROJECT_SOURCE_DIR}/src/cli/*.h ${PROJECT_SOURCE_DIR}/src/cli/*.cpp)
  347. file(GLOB_RECURSE STORM_EXCEPTIONS_FILES ${PROJECT_SOURCE_DIR}/src/exceptions/*.h ${PROJECT_SOURCE_DIR}/src/exceptions/*.cpp)
  348. file(GLOB_RECURSE STORM_LOGIC_FILES ${PROJECT_SOURCE_DIR}/src/logic/*.h ${PROJECT_SOURCE_DIR}/src/logic/*.cpp)
  349. file(GLOB STORM_MODELCHECKER_FILES ${PROJECT_SOURCE_DIR}/src/modelchecker/*.h ${PROJECT_SOURCE_DIR}/src/modelchecker/*.cpp)
  350. file(GLOB STORM_MODELCHECKER_PRCTL_FILES ${PROJECT_SOURCE_DIR}/src/modelchecker/prctl/*.h ${PROJECT_SOURCE_DIR}/src/modelchecker/prctl/*.cpp)
  351. file(GLOB_RECURSE STORM_MODELCHECKER_PRCTL_HELPER_FILES ${PROJECT_SOURCE_DIR}/src/modelchecker/prctl/helper/*.h ${PROJECT_SOURCE_DIR}/src/modelchecker/prctl/helper/*.cpp)
  352. file(GLOB STORM_MODELCHECKER_CSL_FILES ${PROJECT_SOURCE_DIR}/src/modelchecker/csl/*.h ${PROJECT_SOURCE_DIR}/src/modelchecker/csl/*.cpp)
  353. file(GLOB_RECURSE STORM_MODELCHECKER_CSL_HELPER_FILES ${PROJECT_SOURCE_DIR}/src/modelchecker/csl/helper/*.h ${PROJECT_SOURCE_DIR}/src/modelchecker/csl/helper/*.cpp)
  354. file(GLOB_RECURSE STORM_MODELCHECKER_REACHABILITY_FILES ${PROJECT_SOURCE_DIR}/src/modelchecker/reachability/*.h ${PROJECT_SOURCE_DIR}/src/modelchecker/reachability/*.cpp)
  355. file(GLOB_RECURSE STORM_MODELCHECKER_PROPOSITIONAL_FILES ${PROJECT_SOURCE_DIR}/src/modelchecker/propositional/*.h ${PROJECT_SOURCE_DIR}/src/modelchecker/propositional/*.cpp)
  356. file(GLOB_RECURSE STORM_MODELCHECKER_RESULTS_FILES ${PROJECT_SOURCE_DIR}/src/modelchecker/results/*.h ${PROJECT_SOURCE_DIR}/src/modelchecker/results/*.cpp)
  357. file(GLOB_RECURSE STORM_COUNTEREXAMPLES_FILES ${PROJECT_SOURCE_DIR}/src/counterexamples/*.h ${PROJECT_SOURCE_DIR}/src/counterexamples/*.cpp)
  358. file(GLOB STORM_MODELS_FILES ${PROJECT_SOURCE_DIR}/src/models/*.h ${PROJECT_SOURCE_DIR}/src/models/*.cpp)
  359. file(GLOB_RECURSE STORM_MODELS_SPARSE_FILES ${PROJECT_SOURCE_DIR}/src/models/sparse/*.h ${PROJECT_SOURCE_DIR}/src/models/sparse/*.cpp)
  360. file(GLOB_RECURSE STORM_MODELS_SYMBOLIC_FILES ${PROJECT_SOURCE_DIR}/src/models/symbolic/*.h ${PROJECT_SOURCE_DIR}/src/models/symbolic/*.cpp)
  361. file(GLOB STORM_PARSER_FILES ${PROJECT_SOURCE_DIR}/src/parser/*.h ${PROJECT_SOURCE_DIR}/src/parser/*.cpp)
  362. file(GLOB_RECURSE STORM_PARSER_PRISMPARSER_FILES ${PROJECT_SOURCE_DIR}/src/parser/prismparser/*.h ${PROJECT_SOURCE_DIR}/src/parser/prismparser/*.cpp)
  363. file(GLOB STORM_SETTINGS_FILES ${PROJECT_SOURCE_DIR}/src/settings/*.h ${PROJECT_SOURCE_DIR}/src/settings/*.cpp)
  364. file(GLOB STORM_SETTINGS_MODULES_FILES ${PROJECT_SOURCE_DIR}/src/settings/modules/*.h ${PROJECT_SOURCE_DIR}/src/settings/modules/*.cpp)
  365. file(GLOB_RECURSE STORM_SOLVER_FILES ${PROJECT_SOURCE_DIR}/src/solver/*.h ${PROJECT_SOURCE_DIR}/src/solver/*.cpp)
  366. file(GLOB STORM_STORAGE_FILES ${PROJECT_SOURCE_DIR}/src/storage/*.h ${PROJECT_SOURCE_DIR}/src/storage/*.cpp)
  367. file(GLOB_RECURSE STORM_STORAGE_DD_FILES ${PROJECT_SOURCE_DIR}/src/storage/dd/*.h ${PROJECT_SOURCE_DIR}/src/storage/dd/*.cpp)
  368. file(GLOB_RECURSE STORM_STORAGE_EXPRESSIONS_FILES ${PROJECT_SOURCE_DIR}/src/storage/expressions/*.h ${PROJECT_SOURCE_DIR}/src/storage/expressions/*.cpp)
  369. file(GLOB_RECURSE STORM_STORAGE_PRISM_FILES ${PROJECT_SOURCE_DIR}/src/storage/prism/*.h ${PROJECT_SOURCE_DIR}/src/storage/prism/*.cpp)
  370. file(GLOB_RECURSE STORM_STORAGE_SPARSE_FILES ${PROJECT_SOURCE_DIR}/src/storage/sparse/*.h ${PROJECT_SOURCE_DIR}/src/storage/sparse/*.cpp)
  371. file(GLOB_RECURSE STORM_UTILITY_FILES ${PROJECT_SOURCE_DIR}/src/utility/*.h ${PROJECT_SOURCE_DIR}/src/utility/*.cpp)
  372. # Test Sources
  373. # Note that the tests also need the source files, except for the main file
  374. file(GLOB STORM_FUNCTIONAL_TEST_MAIN_FILE ${STORM_CPP_TESTS_BASE_PATH}/functional/storm-functional-tests.cpp)
  375. file(GLOB_RECURSE STORM_FUNCTIONAL_TEST_FILES ${STORM_CPP_TESTS_BASE_PATH}/functional/*.h ${STORM_CPP_TESTS_BASE_PATH}/functional/*.cpp)
  376. file(GLOB STORM_PERFORMANCE_TEST_MAIN_FILE ${STORM_CPP_TESTS_BASE_PATH}/performance/storm-performance-tests.cpp)
  377. file(GLOB_RECURSE STORM_PERFORMANCE_TEST_FILES ${STORM_CPP_TESTS_BASE_PATH}/performance/*.h ${STORM_CPP_TESTS_BASE_PATH}/performance/*.cpp)
  378. # Additional include files like the storm-config.h
  379. file(GLOB_RECURSE STORM_BUILD_HEADERS ${PROJECT_BINARY_DIR}/include/*.h)
  380. set(STORM_LIB_SOURCES ${STORM_SOURCES_WITHOUT_MAIN})
  381. list(REMOVE_ITEM STORM_LIB_SOURCES ${STORM_SOURCES_CLI})
  382. list(REMOVE_ITEM STORM_LIB_SOURCES ${STORM_PY_SOURCES})
  383. set(STORM_LIB_HEADERS ${STORM_HEADERS})
  384. list(REMOVE_ITEM STORM_LIB_HEADERS ${STORM_HEADERS_CLI})
  385. #list(REMOVE_ITEM STORM_LIB_HEADERS ${STORM_PY_HEADERS})
  386. set(STORM_MAIN_SOURCES ${STORM_SOURCES_CLI} ${STORM_MAIN_FILE})
  387. set(STORM_MAIN_HEADERS ${STORM_HEADERS_CLI})
  388. # Group the headers and sources
  389. source_group(main FILES ${STORM_MAIN_FILE})
  390. source_group(adapters FILES ${STORM_ADAPTERS_FILES})
  391. source_group(builder FILES ${STORM_BUILDER_FILES})
  392. source_group(cli FILES ${STORM_CLI_FILES})
  393. source_group(exceptions FILES ${STORM_EXCEPTIONS_FILES})
  394. source_group(logic FILES ${STORM_LOGIC_FILES})
  395. source_group(generated FILES ${STORM_BUILD_HEADERS} ${STORM_BUILD_SOURCES})
  396. source_group(modelchecker FILES ${STORM_MODELCHECKER_FILES})
  397. source_group(modelchecker\\prctl FILES ${STORM_MODELCHECKER_PRCTL_FILES})
  398. source_group(modelchecker\\prctl\\helper FILES ${STORM_MODELCHECKER_PRCTL_HELPER_FILES})
  399. source_group(modelchecker\\csl FILES ${STORM_MODELCHECKER_CSL_FILES})
  400. source_group(modelchecker\\csl\\helper FILES ${STORM_MODELCHECKER_CSL_HELPER_FILES})
  401. source_group(modelchecker\\reachability FILES ${STORM_MODELCHECKER_REACHABILITY_FILES})
  402. source_group(modelchecker\\propositional FILES ${STORM_MODELCHECKER_PROPOSITIONAL_FILES})
  403. source_group(modelchecker\\results FILES ${STORM_MODELCHECKER_RESULTS_FILES})
  404. source_group(counterexamples FILES ${STORM_COUNTEREXAMPLES_FILES})
  405. source_group(models FILES ${STORM_MODELS_FILES})
  406. source_group(models\\sparse FILES ${STORM_MODELS_SPARSE_FILES})
  407. source_group(models\\symbolic FILES ${STORM_MODELS_SYMBOLIC_FILES})
  408. source_group(parser FILES ${STORM_PARSER_FILES})
  409. source_group(parser\\prismparser FILES ${STORM_PARSER_PRISMPARSER_FILES})
  410. source_group(settings FILES ${STORM_SETTINGS_FILES})
  411. source_group(settings\\modules FILES ${STORM_SETTINGS_MODULES_FILES})
  412. source_group(solver FILES ${STORM_SOLVER_FILES})
  413. source_group(storage FILES ${STORM_STORAGE_FILES})
  414. source_group(storage\\dd FILES ${STORM_STORAGE_DD_FILES})
  415. source_group(storage\\expressions FILES ${STORM_STORAGE_EXPRESSIONS_FILES})
  416. source_group(storage\\prism FILES ${STORM_STORAGE_PRISM_FILES})
  417. source_group(storage\\sparse FILES ${STORM_STORAGE_SPARSE_FILES})
  418. source_group(utility FILES ${STORM_UTILITY_FILES})
  419. source_group(functional-test FILES ${STORM_FUNCTIONAL_TEST_FILES})
  420. source_group(performance-test FILES ${STORM_PERFORMANCE_TEST_FILES} ${})
  421. # Add custom additional include or link directories
  422. if (ADDITIONAL_INCLUDE_DIRS)
  423. message(STATUS "StoRM - Using additional include directories ${ADDITIONAL_INCLUDE_DIRS}")
  424. include_directories(${ADDITIONAL_INCLUDE_DIRS})
  425. endif(ADDITIONAL_INCLUDE_DIRS)
  426. if (ADDITIONAL_LINK_DIRS)
  427. message(STATUS "StoRM - Using additional link directories ${ADDITIONAL_LINK_DIRS}")
  428. link_directories(${ADDITIONAL_LINK_DIRS})
  429. endif(ADDITIONAL_LINK_DIRS)
  430. #############################################################
  431. ##
  432. ## Pre executable-creation link_directories setup
  433. ##
  434. #############################################################
  435. if (ENABLE_GUROBI)
  436. if (NOT GUROBI_FOUND)
  437. message(FATAL_ERROR "Gurobi was requested, but not found!")
  438. endif()
  439. #link_directories("${GUROBI_ROOT}/lib")
  440. endif()
  441. if (ENABLE_MSAT)
  442. link_directories("${MSAT_ROOT}/lib")
  443. endif()
  444. if(GMP_FOUND)
  445. link_directories(${GMP_LIBRARY_DIR})
  446. elseif(MPIR_FOUND)
  447. link_directories(${GMP_MPIR_LIBRARY_DIR} ${GMP_MPIRXX_LIBRARY_DIR})
  448. else(GMP_FOUND)
  449. if (ENABLE_MSAT)
  450. message(FATAL_ERROR "GMP is required for MathSAT, but was not found!")
  451. endif(ENABLE_MSAT)
  452. endif(GMP_FOUND)
  453. if ((NOT Boost_LIBRARY_DIRS) OR ("${Boost_LIBRARY_DIRS}" STREQUAL ""))
  454. set(Boost_LIBRARY_DIRS "${Boost_INCLUDE_DIRS}/stage/lib")
  455. endif ()
  456. link_directories(${Boost_LIBRARY_DIRS})
  457. if (TBB_FOUND AND STORM_USE_INTELTBB)
  458. link_directories(${TBB_LIBRARY_DIRS})
  459. endif()
  460. ###############################################################################
  461. ## #
  462. ## Executable Creation #
  463. ## #
  464. ## All link_directories() calls MUST be made before this point #
  465. ## #
  466. ###############################################################################
  467. add_library(storm ${STORM_LIB_SOURCES} ${STORM_LIB_HEADERS} ${STORM_GENERATED_SOURCES}) # Adding headers for xcode
  468. add_executable(storm-main ${STORM_MAIN_SOURCES} ${STORM_MAIN_HEADERS})
  469. target_link_libraries(storm-main storm) # Adding headers for xcode
  470. set_target_properties(storm-main PROPERTIES OUTPUT_NAME "storm")
  471. add_executable(storm-functional-tests ${STORM_FUNCTIONAL_TEST_MAIN_FILE} ${STORM_FUNCTIONAL_TEST_FILES})
  472. target_link_libraries(storm-functional-tests storm)
  473. add_executable(storm-performance-tests ${STORM_PERFORMANCE_TEST_MAIN_FILE} ${STORM_PERFORMANCE_TEST_FILES})
  474. target_link_libraries(storm-performance-tests storm)
  475. #############################################################
  476. ##
  477. ## STORM PYTHON
  478. ##
  479. #############################################################
  480. if(STORM_PYTHON)
  481. add_library(stormpy_info SHARED ${STORM_PY_SOURCES})
  482. target_link_libraries(stormpy storm ${BOOST_PYTHON_LIB} ${PYTHON_LIBRARIES})
  483. endif()
  484. #############################################################
  485. ##
  486. ## Boost
  487. ##
  488. #############################################################
  489. include_directories(${Boost_INCLUDE_DIRS})
  490. target_link_libraries(storm ${Boost_LIBRARIES})
  491. #message(STATUS "BOOST_INCLUDE_DIRS is ${Boost_INCLUDE_DIRS}")
  492. #message(STATUS "BOOST_LIBRARY_DIRS is ${Boost_LIBRARY_DIRS}")
  493. #############################################################
  494. ##
  495. ## CUDD
  496. ##
  497. #############################################################
  498. add_subdirectory("${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0")
  499. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/cudd")
  500. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/epd")
  501. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/mtr")
  502. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/nanotrav")
  503. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/obj")
  504. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/st")
  505. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/util")
  506. target_link_libraries(storm cudd)
  507. #############################################################
  508. ##
  509. ## Gurobi (optional)
  510. ##
  511. #############################################################
  512. if (ENABLE_GUROBI)
  513. message (STATUS "StoRM - Linking with Gurobi (include: ${GUROBI_INCLUDE_DIRS})")
  514. include_directories(${GUROBI_INCLUDE_DIRS})
  515. target_link_libraries(storm ${GUROBI_LIBRARY})
  516. endif(ENABLE_GUROBI)
  517. #############################################################
  518. ##
  519. ## CUDA (optional)
  520. ##
  521. #############################################################
  522. if (ENABLE_CUDA)
  523. message (STATUS "StoRM - Linking with CUDA")
  524. target_link_libraries(storm ${STORM_CUDA_LIB_NAME})
  525. include_directories("${PROJECT_SOURCE_DIR}/cuda/kernels/")
  526. endif(ENABLE_CUDA)
  527. #############################################################
  528. ##
  529. ## glpk
  530. ##
  531. #############################################################
  532. message (STATUS "StoRM - Linking with glpk")
  533. add_subdirectory("${PROJECT_SOURCE_DIR}/resources/3rdparty/glpk-4.53")
  534. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/glpk-4.53/src")
  535. target_link_libraries(storm "glpk")
  536. #############################################################
  537. ##
  538. ## ExprTk
  539. ##
  540. #############################################################
  541. message (STATUS "StoRM - Including ExprTk")
  542. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/exprtk")
  543. #############################################################
  544. ##
  545. ## Z3 (optional)
  546. ##
  547. #############################################################
  548. if(STORM_HAVE_Z3)
  549. message (STATUS "StoRM - Linking with Z3")
  550. include_directories(${Z3_INCLUDE_DIRS})
  551. target_link_libraries(storm ${Z3_LIBRARIES})
  552. endif(STORM_HAVE_Z3)
  553. #############################################################
  554. ##
  555. ## carl
  556. ##
  557. #############################################################
  558. if(STORM_HAVE_CARL)
  559. message(STATUS "StoRM - Linking with carl.")
  560. include_directories("${carl_INCLUDE_DIR}")
  561. target_link_libraries(storm ${carl_LIBRARIES})
  562. endif()
  563. #############################################################
  564. ##
  565. ## SMT-RAT
  566. ##
  567. #############################################################
  568. if(STORM_HAVE_SMTRAT)
  569. message(STATUS "StoRM - Linking with smtrat.")
  570. include_directories("${smtrat_INCLUDE_DIR}")
  571. target_link_libraries(storm ${smtrat_LIBRARIES})
  572. endif()
  573. #############################################################
  574. ##
  575. ## MathSAT (optional)
  576. ##
  577. #############################################################
  578. if (ENABLE_MSAT)
  579. message (STATUS "StoRM - Linking with MathSAT")
  580. include_directories("${MSAT_ROOT}/include")
  581. target_link_libraries(storm "mathsat")
  582. if(GMP_FOUND)
  583. include_directories("${GMP_INCLUDE_DIR}")
  584. target_link_libraries(storm "gmp")
  585. elseif(MPIR_FOUND)
  586. include_directories("${GMP_INCLUDE_DIR}")
  587. target_link_libraries(storm "mpir" "mpirxx")
  588. else(GMP_FOUND)
  589. message(FATAL_ERROR "GMP is required for MathSAT, but was not found!")
  590. endif(GMP_FOUND)
  591. endif(ENABLE_MSAT)
  592. #############################################################
  593. ##
  594. ## Google Test gtest
  595. ##
  596. #############################################################
  597. set(gtest_force_shared_crt ON)
  598. add_subdirectory("${PROJECT_SOURCE_DIR}/resources/3rdparty/gtest-1.7.0")
  599. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/gtest-1.7.0/include")
  600. enable_testing()
  601. target_link_libraries(storm-functional-tests gtest)
  602. target_link_libraries(storm-performance-tests gtest)
  603. add_test(NAME storm-functional-tests COMMAND storm-functional-tests)
  604. add_test(NAME storm-performance-tests COMMAND storm-performance-tests)
  605. #############################################################
  606. ##
  607. ## Log4CPlus
  608. ##
  609. #############################################################
  610. set(BUILD_SHARED_LIBS OFF CACHE BOOL "If TRUE, log4cplus is built as a shared library, otherwise as a static library")
  611. set(LOG4CPLUS_BUILD_LOGGINGSERVER OFF)
  612. set(LOG4CPLUS_BUILD_TESTING OFF)
  613. set(LOG4CPLUS_USE_UNICODE OFF)
  614. set(LOG4CPLUS_DEFINE_INSTALL_TARGET OFF)
  615. add_subdirectory("${PROJECT_SOURCE_DIR}/resources/3rdparty/log4cplus-1.1.3-rc1")
  616. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/log4cplus-1.1.3-rc1/include")
  617. include_directories("${PROJECT_BINARY_DIR}/resources/3rdparty/log4cplus-1.1.3-rc1/include") # This adds the defines.hxx file
  618. target_link_libraries(storm log4cplusS)
  619. target_link_libraries(storm-functional-tests log4cplusS)
  620. target_link_libraries(storm-performance-tests log4cplusS)
  621. if (UNIX AND NOT APPLE)
  622. target_link_libraries(storm rt)
  623. if (STORM_USE_COTIRE)
  624. target_link_libraries(storm_unity rt)
  625. endif(STORM_USE_COTIRE)
  626. endif(UNIX AND NOT APPLE)
  627. #############################################################
  628. ##
  629. ## Intel Threading Building Blocks (optional)
  630. ##
  631. #############################################################
  632. if (TBB_FOUND)
  633. message(STATUS "StoRM - Found Intel TBB with interface version ${TBB_INTERFACE_VERSION}.")
  634. if (STORM_USE_INTELTBB)
  635. message(STATUS "StoRM - Linking with Intel TBB in ${TBB_LIBRARY_DIRS}.")
  636. include_directories(${TBB_INCLUDE_DIRS})
  637. target_link_libraries(storm tbb tbbmalloc)
  638. endif(STORM_USE_INTELTBB)
  639. endif(TBB_FOUND)
  640. #############################################################
  641. ##
  642. ## Threads
  643. ##
  644. #############################################################
  645. include_directories(${THREADS_INCLUDE_DIRS})
  646. target_link_libraries(storm ${CMAKE_THREAD_LIBS_INIT})
  647. if (STORM_USE_COTIRE)
  648. target_link_libraries(storm_unity ${CMAKE_THREAD_LIBS_INIT})
  649. endif(STORM_USE_COTIRE)
  650. if (MSVC)
  651. # Add the DebugHelper DLL
  652. set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} Dbghelp.lib")
  653. target_link_libraries(storm "Dbghelp.lib")
  654. endif(MSVC)
  655. #############################################################
  656. ##
  657. ## Cotire
  658. ##
  659. #############################################################
  660. message (STATUS "StoRM - Using Cotire: ${STORM_USE_COTIRE}")
  661. if (STORM_USE_COTIRE)
  662. # Include Cotire for PCH Generation
  663. set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/resources/cmake")
  664. include(cotire)
  665. cotire(storm)
  666. target_link_libraries(storm_unity ${Boost_LIBRARIES})
  667. #cotire(storm-functional-tests)
  668. #cotire(storm-performance-tests)
  669. endif()
  670. #############################################################
  671. ##
  672. ## libc++abi
  673. ##
  674. #############################################################
  675. # Link against libc++abi if requested. May be needed to build on Linux systems using clang.
  676. if (LINK_LIBCXXABI)
  677. message (STATUS "StoRM - Linking against libc++abi.")
  678. target_link_libraries(storm "c++abi")
  679. endif(LINK_LIBCXXABI)
  680. #############################################################
  681. ##
  682. ## Doxygen
  683. ##
  684. #############################################################
  685. # Add a target to generate API documentation with Doxygen
  686. if(DOXYGEN_FOUND)
  687. set(CMAKE_DOXYGEN_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc")
  688. string(REGEX REPLACE ";" " " CMAKE_DOXYGEN_INPUT_LIST "${PROJECT_SOURCE_DIR}/src")
  689. configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in" "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile" @ONLY)
  690. add_custom_target(doc ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile" DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile" COMMENT "Generating API documentation with Doxygen" VERBATIM)
  691. endif(DOXYGEN_FOUND)
  692. #############################################################
  693. ##
  694. ## memcheck targets
  695. ##
  696. #############################################################
  697. add_custom_target(memcheck valgrind --leak-check=full --show-reachable=yes ${PROJECT_BINARY_DIR}/storm -v --fix-deadlocks ${PROJECT_SOURCE_DIR}/examples/dtmc/crowds/crowds5_5.tra examples/dtmc/crowds/crowds5_5.lab DEPENDS storm)
  698. add_custom_target(memcheck-functional-tests valgrind --leak-check=full --show-reachable=yes ${PROJECT_BINARY_DIR}/storm-functional-tests -v --fix-deadlocks DEPENDS storm-functional-tests)
  699. add_custom_target(memcheck-performance-tests valgrind --leak-check=full --show-reachable=yes ${PROJECT_BINARY_DIR}/storm-performance-tests -v --fix-deadlocks DEPENDS storm-performance-tests)
  700. set(CPPLINT_ARGS --filter=-whitespace/tab,-whitespace/line_length,-legal/copyright,-readability/streams)
  701. add_custom_target(style python cpplint.py ${CPPLINT_ARGS} `find ./src/ -iname "*.h" -or -iname "*.cpp" `)
  702. INSTALL(TARGETS storm-main storm-functional-tests storm-performance-tests
  703. RUNTIME DESTINATION bin
  704. LIBRARY DESTINATION lib
  705. ARCHIVE DESTINATION lib
  706. )
  707. include(StormCPackConfig.cmake)