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.

389 lines
18 KiB

  1. cmake_minimum_required (VERSION 2.8.6)
  2. # Set project name
  3. project (storm CXX C)
  4. # Set the version number
  5. set (STORM_CPP_VERSION_MAJOR 1)
  6. set (STORM_CPP_VERSION_MINOR 0)
  7. # Set all Eigen references the version in the repository
  8. set(EIGEN3_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/resources/3rdparty/eigen)
  9. message(STATUS "EIGEN3_INCLUDE_DIR is ${EIGEN3_INCLUDE_DIR}")
  10. # Set all Eigen references the version in the repository
  11. set(GMMXX_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/resources/3rdparty/gmm-4.2/include)
  12. message(STATUS "GMMXX_INCLUDE_DIR is ${GMMXX_INCLUDE_DIR}")
  13. # Now define all available custom options
  14. option(DEBUG "Sets whether the DEBUG mode is used" ON)
  15. option(USE_POPCNT "Sets whether the popcnt instruction is going to be used." ON)
  16. option(USE_BOOST_STATIC_LIBRARIES "Sets whether the Boost libraries should be linked statically." ON)
  17. option(USE_INTELTBB "Sets whether the Intel TBB Extensions should be used." OFF)
  18. option(STORM_USE_COTIRE "Sets whether Cotire should be used (for building precompiled headers)." OFF)
  19. option(LINK_LIBCXXABI "Sets whether libc++abi should be linked." OFF)
  20. set(GUROBI_ROOT "" CACHE STRING "The root directory of Gurobi (if available).")
  21. set(ADDITIONAL_INCLUDE_DIRS "" CACHE STRING "Additional directories added to the include directories.")
  22. set(ADDITIONAL_LINK_DIRS "" CACHE STRING "Additional directories added to the link directories.")
  23. set(CUSTOM_BOOST_ROOT "" CACHE STRING "A custom path to the Boost root directory.")
  24. # If the DEBUG option was turned on, we will target a debug version and a release version otherwise
  25. if (DEBUG)
  26. set (CMAKE_BUILD_TYPE "DEBUG")
  27. message(STATUS "Building DEBUG version.")
  28. else()
  29. set (CMAKE_BUILD_TYPE "RELEASE")
  30. message(STATUS "Building RELEASE version.")
  31. endif()
  32. if ("${GUROBI_ROOT}" STREQUAL "")
  33. set(ENABLE_GUROBI OFF)
  34. else()
  35. set(ENABLE_GUROBI ON)
  36. endif()
  37. message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
  38. message(STATUS "CMAKE_BUILD_TYPE (ENV): $ENV{CMAKE_BUILD_TYPE}")
  39. # Path to the no-strict-aliasing target
  40. set(CONVERSIONHELPER_TARGET "${PROJECT_SOURCE_DIR}/src/utility/ConversionHelper.cpp")
  41. if(CMAKE_COMPILER_IS_GNUCC)
  42. message(STATUS "Using GCC")
  43. # Set standard flags for GCC
  44. set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -funroll-loops")
  45. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -pedantic")
  46. # -Werror is atm removed as this gave some problems with existing code
  47. # May be re-set later
  48. # (Thomas Heinemann, 2012-12-21)
  49. # Turn on popcnt instruction if desired (yes by default)
  50. if (USE_POPCNT)
  51. set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcnt")
  52. endif(USE_POPCNT)
  53. # Set the no-strict-aliasing target for GCC
  54. set_source_files_properties(${CONVERSIONHELPER_TARGET} PROPERTIES COMPILE_FLAGS " -fno-strict-aliasing ")
  55. elseif(MSVC)
  56. message(STATUS "Using MSVC")
  57. # required for GMM to compile, ugly error directive in their code
  58. add_definitions(/D_SCL_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS)
  59. # 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)
  60. add_definitions(/bigobj)
  61. # required by GTest and PrismGrammar::createIntegerVariable
  62. add_definitions(/D_VARIADIC_MAX=10)
  63. # MSVC does not do strict-aliasing, so no option needed
  64. else(CLANG)
  65. message(STATUS "Using CLANG")
  66. # As CLANG is not set as a variable, we need to set it in case we have not matched another compiler.
  67. set (CLANG ON)
  68. # Set standard flags for clang
  69. set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -funroll-loops -O3")
  70. if(UNIX AND NOT APPLE)
  71. set(CLANG_STDLIB libstdc++)
  72. else()
  73. set(CLANG_STDLIB libc++)
  74. # Disable Cotire
  75. set(STORM_USE_COTIRE OFF)
  76. # Set up some Xcode specific settings
  77. set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
  78. set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
  79. endif()
  80. set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=${CLANG_STDLIB} -Wall -pedantic -Wno-unused-variable -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -ftemplate-depth=1024")
  81. set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
  82. # Turn on popcnt instruction if desired (yes by default)
  83. if (USE_POPCNT)
  84. set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcnt")
  85. endif(USE_POPCNT)
  86. # Set the no-strict-aliasing target for Clang
  87. set_source_files_properties(${CONVERSIONHELPER_TARGET} PROPERTIES COMPILE_FLAGS " -fno-strict-aliasing ")
  88. endif()
  89. # Add the binary folder to the search path for include files so that we will find storm-config.h
  90. include_directories("${PROJECT_BINARY_DIR}")
  91. # Base path for test files
  92. set(STORM_CPP_TESTS_BASE_PATH ${PROJECT_SOURCE_DIR}/test)
  93. message(STATUS "STORM_CPP_TESTS_BASE_PATH is ${STORM_CPP_TESTS_BASE_PATH}")
  94. # Main Sources
  95. file(GLOB_RECURSE STORM_HEADERS ${PROJECT_SOURCE_DIR}/src/*.h)
  96. file(GLOB_RECURSE STORM_SOURCES_WITHOUT_MAIN ${PROJECT_SOURCE_DIR}/src/*/*.cpp)
  97. file(GLOB_RECURSE STORM_MAIN_FILE ${PROJECT_SOURCE_DIR}/src/storm.cpp)
  98. set(STORM_SOURCES "${STORM_SOURCES_WITHOUT_MAIN};${STORM_MAIN_FILE}")
  99. file(GLOB_RECURSE STORM_ADAPTERS_FILES ${PROJECT_SOURCE_DIR}/src/adapters/*.h ${PROJECT_SOURCE_DIR}/src/adapters/*.cpp)
  100. file(GLOB_RECURSE STORM_EXCEPTIONS_FILES ${PROJECT_SOURCE_DIR}/src/exceptions/*.h ${PROJECT_SOURCE_DIR}/src/exceptions/*.cpp)
  101. file(GLOB STORM_FORMULA_FILES ${PROJECT_SOURCE_DIR}/src/formula/*.h ${PROJECT_SOURCE_DIR}/src/formula/*.cpp)
  102. file(GLOB_RECURSE STORM_FORMULA_ABSTRACT_FILES ${PROJECT_SOURCE_DIR}/src/formula/abstract/*.h ${PROJECT_SOURCE_DIR}/src/formula/abstract/*.cpp)
  103. file(GLOB_RECURSE STORM_FORMULA_CSL_FILES ${PROJECT_SOURCE_DIR}/src/formula/Csl/*.h ${PROJECT_SOURCE_DIR}/src/formula/Csl/*.cpp)
  104. file(GLOB_RECURSE STORM_FORMULA_LTL_FILES ${PROJECT_SOURCE_DIR}/src/formula/Ltl/*.h ${PROJECT_SOURCE_DIR}/src/formula/Ltl/*.cpp)
  105. file(GLOB_RECURSE STORM_FORMULA_PRCTL_FILES ${PROJECT_SOURCE_DIR}/src/formula/Prctl/*.h ${PROJECT_SOURCE_DIR}/src/formula/Prctl/*.cpp)
  106. file(GLOB_RECURSE STORM_MODELCHECKER_FILES ${PROJECT_SOURCE_DIR}/src/modelchecker/*.h ${PROJECT_SOURCE_DIR}/src/modelchecker/*.cpp)
  107. file(GLOB_RECURSE STORM_COUNTEREXAMPLES_FILES ${PROJECT_SOURCE_DIR}/src/counterexamples/*.h ${PROJECT_SOURCE_DIR}/src/counterexamples/*.cpp)
  108. file(GLOB_RECURSE STORM_MODELS_FILES ${PROJECT_SOURCE_DIR}/src/models/*.h ${PROJECT_SOURCE_DIR}/src/models/*.cpp)
  109. file(GLOB STORM_PARSER_FILES ${PROJECT_SOURCE_DIR}/src/parser/*.h ${PROJECT_SOURCE_DIR}/src/parser/*.cpp)
  110. file(GLOB_RECURSE STORM_PARSER_PRISMPARSER_FILES ${PROJECT_SOURCE_DIR}/src/parser/prismparser/*.h ${PROJECT_SOURCE_DIR}/src/parser/prismparser/*.cpp)
  111. file(GLOB_RECURSE STORM_SETTINGS_FILES ${PROJECT_SOURCE_DIR}/src/settings/*.h ${PROJECT_SOURCE_DIR}/src/settings/*.cpp)
  112. file(GLOB_RECURSE STORM_SOLVER_FILES ${PROJECT_SOURCE_DIR}/src/solver/*.h ${PROJECT_SOURCE_DIR}/src/solver/*.cpp)
  113. file(GLOB_RECURSE STORM_STORAGE_FILES ${PROJECT_SOURCE_DIR}/src/storage/*.h ${PROJECT_SOURCE_DIR}/src/storage/*.cpp)
  114. file(GLOB_RECURSE STORM_UTILITY_FILES ${PROJECT_SOURCE_DIR}/src/utility/*.h ${PROJECT_SOURCE_DIR}/src/utility/*.cpp)
  115. file(GLOB STORM_IR_FILES ${PROJECT_SOURCE_DIR}/src/ir/*.h ${PROJECT_SOURCE_DIR}/src/ir/*.cpp)
  116. file(GLOB_RECURSE STORM_IR_EXPRESSIONS_FILES ${PROJECT_SOURCE_DIR}/src/ir/expressions/*.h ${PROJECT_SOURCE_DIR}/src/ir/expressions/*.cpp)
  117. # Test Sources
  118. # Note that the tests also need the source files, except for the main file
  119. file(GLOB_RECURSE STORM_FUNCTIONAL_TEST_FILES ${STORM_CPP_TESTS_BASE_PATH}/functional/*.h ${STORM_CPP_TESTS_BASE_PATH}/functional/*.cpp)
  120. file(GLOB_RECURSE STORM_PERFORMANCE_TEST_FILES ${STORM_CPP_TESTS_BASE_PATH}/performance/*.h ${STORM_CPP_TESTS_BASE_PATH}/performance/*.cpp)
  121. # Group the headers and sources
  122. source_group(main FILES ${STORM_MAIN_FILE})
  123. source_group(adapters FILES ${STORM_ADAPTERS_FILES})
  124. source_group(exceptions FILES ${STORM_EXCEPTIONS_FILES})
  125. source_group(formula FILES ${STORM_FORMULA_FILES})
  126. source_group(formula\\abstract FILES ${STORM_FORMULA_ABSTRACT_FILES})
  127. source_group(formula\\csl FILES ${STORM_FORMULA_CSL_FILES})
  128. source_group(formula\\ltl FILES ${STORM_FORMULA_LTL_FILES})
  129. source_group(formula\\prctl FILES ${STORM_FORMULA_PRCTL_FILES})
  130. source_group(modelchecker FILES ${STORM_MODELCHECKER_FILES})
  131. source_group(counterexamples FILES ${STORM_COUNTEREXAMPLES_FILES})
  132. source_group(models FILES ${STORM_MODELS_FILES})
  133. source_group(parser FILES ${STORM_PARSER_FILES})
  134. source_group(parser\\prismparser FILES ${STORM_PARSER_PRISMPARSER_FILES})
  135. source_group(settings FILES ${STORM_SETTINGS_FILES})
  136. source_group(solver FILES ${STORM_SOLVER_FILES})
  137. source_group(storage FILES ${STORM_STORAGE_FILES})
  138. source_group(utility FILES ${STORM_UTILITY_FILES})
  139. source_group(ir FILES ${STORM_IR_FILES})
  140. source_group(ir\\expressions FILES ${STORM_IR_EXPRESSIONS_FILES})
  141. source_group(functional-test FILES ${STORM_FUNCTIONAL_TEST_FILES})
  142. source_group(performance-test FILES ${STORM_PERFORMANCE_TEST_FILES})
  143. # Add base folder for better inclusion paths
  144. include_directories("${PROJECT_SOURCE_DIR}")
  145. include_directories("${PROJECT_SOURCE_DIR}/src")
  146. # Preset pathes for Intel TBB to internal copy in /resources/3rdParty/tbb41_20130314_mergedWindowsLinuxMacOSX
  147. set(TBB_INSTALL_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/tbb41_20130314_merged-win-lin-mac/")
  148. if(MSVC)
  149. set(ENV{TBB_ARCH_PLATFORM} "intel64/vc11")
  150. elseif(CMAKE_COMPILER_IS_GNUCC)
  151. set(ENV{TBB_ARCH_PLATFORM} "intel64/gcc4.4")
  152. else(CLANG)
  153. set(ENV{TBB_ARCH_PLATFORM} "intel64/clang3.2")
  154. endif()
  155. # Add the resources/cmake folder to Module Search Path for FindTBB.cmake
  156. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/resources/cmake/")
  157. # Set required external packages
  158. find_package(Threads REQUIRED)
  159. find_package(Doxygen REQUIRED)
  160. set(Boost_USE_STATIC_LIBS ON)
  161. set(Boost_USE_MULTITHREADED ON)
  162. set(Boost_USE_STATIC_RUNTIME OFF)
  163. # If a custom boost root directory was specified, we set the corresponding hint for the script to find it.
  164. if(CUSTOM_BOOST_ROOT)
  165. set(BOOST_ROOT "${CUSTOM_BOOST_ROOT}")
  166. endif(CUSTOM_BOOST_ROOT)
  167. find_package(Boost REQUIRED COMPONENTS program_options)
  168. find_package(TBB)
  169. if(Boost_FOUND)
  170. if ((NOT Boost_LIBRARY_DIRS) OR ("${Boost_LIBRARY_DIRS}" STREQUAL ""))
  171. set(Boost_LIBRARY_DIRS "${Boost_INCLUDE_DIRS}/stage/lib")
  172. endif ()
  173. message(STATUS "BOOST_INCLUDE_DIRS is ${Boost_INCLUDE_DIRS}")
  174. message(STATUS "BOOST_LIBRARY_DIRS is ${Boost_LIBRARY_DIRS}")
  175. include_directories(${Boost_INCLUDE_DIRS})
  176. link_directories(${Boost_LIBRARY_DIRS})
  177. endif(Boost_FOUND)
  178. # Intels Thread Building Blocks
  179. if (TBB_FOUND)
  180. message(STATUS "Found TBB with Interface Version ${TBB_INTERFACE_VERSION}")
  181. if(USE_INTELTBB)
  182. add_definitions(-DGMM_USE_TBB)
  183. endif()
  184. include_directories(${TBB_INCLUDE_DIRS})
  185. link_directories(${TBB_LIBRARY_DIRS})
  186. endif(TBB_FOUND)
  187. # Add Eigen to the included directories
  188. include_directories(${EIGEN3_INCLUDE_DIR})
  189. # Add GMMXX to the included directories
  190. include_directories(${GMMXX_INCLUDE_DIR})
  191. # Add custom additional include or link directories
  192. if (ADDITIONAL_INCLUDE_DIRS)
  193. message(STATUS "Using additional include directories ${ADDITIONAL_INCLUDE_DIRS}")
  194. include_directories(${ADDITIONAL_INCLUDE_DIRS})
  195. endif(ADDITIONAL_INCLUDE_DIRS)
  196. if (ADDITIONAL_LINK_DIRS)
  197. message(STATUS "Using additional link directories ${ADDITIONAL_LINK_DIRS}")
  198. link_directories(${ADDITIONAL_LINK_DIRS})
  199. endif(ADDITIONAL_LINK_DIRS)
  200. # Add the executables
  201. # Must be created *after* Boost was added because of LINK_DIRECTORIES
  202. add_executable(storm ${STORM_SOURCES} ${STORM_HEADERS})
  203. add_executable(storm-functional-tests ${STORM_FUNCTIONAL_TEST_FILES} ${STORM_SOURCES_WITHOUT_MAIN} ${STORM_HEADERS})
  204. add_executable(storm-performance-tests ${STORM_PERFORMANCE_TEST_FILES} ${STORM_SOURCES_WITHOUT_MAIN} ${STORM_HEADERS})
  205. # Add target link deps for Boost program options
  206. target_link_libraries(storm ${Boost_LIBRARIES})
  207. target_link_libraries(storm-functional-tests ${Boost_LIBRARIES})
  208. target_link_libraries(storm-performance-tests ${Boost_LIBRARIES})
  209. #############################################################
  210. ##
  211. ## CUDD
  212. ##
  213. #############################################################
  214. add_subdirectory("${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0")
  215. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/cudd")
  216. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/epd")
  217. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/mtr")
  218. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/nanotrav")
  219. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/obj")
  220. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/st")
  221. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/cudd-2.5.0/src/util")
  222. target_link_libraries(storm cudd)
  223. target_link_libraries(storm-functional-tests cudd)
  224. target_link_libraries(storm-performance-tests cudd)
  225. #############################################################
  226. ##
  227. ## LTL2DSTAR
  228. ##
  229. #############################################################
  230. add_subdirectory("${PROJECT_SOURCE_DIR}/resources/3rdparty/ltl2dstar-0.5.1")
  231. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/ltl2dstar-0.5.1/src")
  232. target_link_libraries(storm ltl2dstar)
  233. target_link_libraries(storm-functional-tests ltl2dstar)
  234. target_link_libraries(storm-performance-tests ltl2dstar)
  235. #############################################################
  236. ##
  237. ## Google Test gtest
  238. ##
  239. #############################################################
  240. set(gtest_force_shared_crt ON)
  241. add_subdirectory("${PROJECT_SOURCE_DIR}/resources/3rdparty/gtest-1.7.0")
  242. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/gtest-1.7.0/include")
  243. enable_testing()
  244. target_link_libraries(storm-functional-tests gtest)
  245. target_link_libraries(storm-performance-tests gtest)
  246. add_test(NAME storm-functional-tests COMMAND storm-functional-tests)
  247. add_test(NAME storm-performance-tests COMMAND storm-performance-tests)
  248. #############################################################
  249. ##
  250. ## Log4CPlus
  251. ##
  252. #############################################################
  253. set(BUILD_SHARED_LIBS OFF CACHE BOOL "If TRUE, log4cplus is built as a shared library, otherwise as a static library")
  254. set(LOG4CPLUS_BUILD_TESTING NO)
  255. set(LOG4CPLUS_USE_UNICODE OFF)
  256. add_subdirectory("${PROJECT_SOURCE_DIR}/resources/3rdparty/log4cplus-1.1.2-rc2")
  257. include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/log4cplus-1.1.2-rc2/include")
  258. target_link_libraries(storm log4cplusS)
  259. target_link_libraries(storm-functional-tests log4cplusS)
  260. target_link_libraries(storm-performance-tests log4cplusS)
  261. if (UNIX AND NOT APPLE)
  262. target_link_libraries(storm rt)
  263. if (STORM_USE_COTIRE)
  264. target_link_libraries(storm_unity rt)
  265. endif(STORM_USE_COTIRE)
  266. target_link_libraries(storm-functional-tests rt)
  267. target_link_libraries(storm-performance-tests rt)
  268. endif(UNIX AND NOT APPLE)
  269. if (MSVC)
  270. # Add the DebugHelper DLL
  271. set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} Dbghelp.lib")
  272. target_link_libraries(storm "Dbghelp.lib")
  273. target_link_libraries(storm-functional-tests "Dbghelp.lib")
  274. target_link_libraries(storm-performance-tests "Dbghelp.lib")
  275. endif(MSVC)
  276. if (USE_INTELTBB)
  277. target_link_libraries(storm tbb tbbmalloc)
  278. target_link_libraries(storm-functional-tests tbb tbbmalloc)
  279. target_link_libraries(storm-performance-tests tbb tbbmalloc)
  280. endif(USE_INTELTBB)
  281. # Print Cotire Usage Status
  282. message (STATUS "Using Cotire: ${STORM_USE_COTIRE}")
  283. if (STORM_USE_COTIRE)
  284. # Include Cotire for PCH Generation
  285. set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/resources/cmake")
  286. include(cotire)
  287. cotire(storm)
  288. target_link_libraries(storm_unity ${Boost_LIBRARIES})
  289. #cotire(storm-functional-tests)
  290. #cotire(storm-performance-tests)
  291. endif()
  292. if (ENABLE_GUROBI)
  293. message (STATUS "Linking in Gurobi.")
  294. include_directories(${GUROBI_ROOT}/include)
  295. link_directories(${GUROBI_ROOT}/lib)
  296. target_link_libraries(storm "gurobi55")
  297. target_link_libraries(storm-functional-tests "gurobi55")
  298. target_link_libraries(storm-performance-tests "gurobi55")
  299. add_definitions(-DHAVE_GUROBI)
  300. endif(ENABLE_GUROBI)
  301. # Link against libc++abi if requested. May be needed to build on Linux systems using clang.
  302. if (LINK_LIBCXXABI)
  303. message (STATUS "Linking against libc++abi.")
  304. target_link_libraries(storm "c++abi")
  305. target_link_libraries(storm-functional-tests "c++abi")
  306. target_link_libraries(storm-performance-tests "c++abi")
  307. endif(LINK_LIBCXXABI)
  308. # Add a target to generate API documentation with Doxygen
  309. if(DOXYGEN_FOUND)
  310. set(CMAKE_DOXYGEN_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc")
  311. string(REGEX REPLACE ";" " " CMAKE_DOXYGEN_INPUT_LIST "${PROJECT_SOURCE_DIR}/src")
  312. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
  313. add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile COMMENT "Generating API documentation with Doxygen" VERBATIM)
  314. endif(DOXYGEN_FOUND)
  315. if (THREADS_FOUND)
  316. include_directories(${THREADS_INCLUDE_DIRS})
  317. target_link_libraries(storm ${CMAKE_THREAD_LIBS_INIT})
  318. if (STORM_USE_COTIRE)
  319. target_link_libraries(storm_unity ${CMAKE_THREAD_LIBS_INIT})
  320. endif(STORM_USE_COTIRE)
  321. target_link_libraries(storm-functional-tests ${CMAKE_THREAD_LIBS_INIT})
  322. target_link_libraries(storm-performance-tests ${CMAKE_THREAD_LIBS_INIT})
  323. endif(THREADS_FOUND)
  324. # Configure a header file to pass some of the CMake settings to the source code
  325. configure_file (
  326. "${PROJECT_SOURCE_DIR}/storm-config.h.in"
  327. "${PROJECT_BINARY_DIR}/storm-config.h"
  328. )
  329. 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)
  330. 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)
  331. 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)
  332. set (CPPLINT_ARGS --filter=-whitespace/tab,-whitespace/line_length,-legal/copyright,-readability/streams)
  333. add_custom_target(style python cpplint.py ${CPPLINT_ARGS} `find ./src/ -iname "*.h" -or -iname "*.cpp"`)