Matthias Volk 8 years ago
parent
commit
4e0ce41ee3
  1. 11
      resources/3rdparty/CMakeLists.txt
  2. 7
      src/storm/CMakeLists.txt
  3. 8
      src/test/CMakeLists.txt
  4. 0
      src/test/storm-test-config.h.in

11
resources/3rdparty/CMakeLists.txt

@ -103,6 +103,15 @@ include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/exprtk")
message (STATUS "Storm - Including Sparsepp.")
include_directories("${PROJECT_SOURCE_DIR}/resources/3rdparty/sparsepp")
# Add sparsepp.h to the headers that are copied to the include directory in thebuild directory.
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp/sparsepp.h
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/resources/3rdparty/sparsepp/sparsepp.h ${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp/sparsepp.h
DEPENDS ${PROJECT_SOURCE_DIR}/resources/3rdparty/sparsepp/sparsepp.h
)
list(APPEND STORM_RESOURCES_HEADERS "${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp/sparsepp.h")
#############################################################
##
## ModernJSON
@ -596,3 +605,5 @@ if(ENABLE_CUDA)
list(APPEND STORM_LINK_LIBRARIES ${STORM_CUDA_LIB_NAME})
include_directories("${PROJECT_SOURCE_DIR}/cuda/kernels/")
endif()
add_custom_target(copy_resources_headers DEPENDS ${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp/sparsepp.h ${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp/sparsepp.h)

7
src/storm/CMakeLists.txt

@ -59,7 +59,7 @@ add_executable(storm-gspn-main ${STORM_GSPN_MAIN_SOURCES} ${STORM_MAIN_HEADERS})
target_link_libraries(storm-gspn-main storm) # Adding headers for xcode
set_target_properties(storm-gspn-main PROPERTIES OUTPUT_NAME "storm-gspn")
# Install headers to include directory.
# Install storm headers to include directory.
foreach(HEADER ${STORM_LIB_HEADERS})
string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/src/?" "" RELATIVE_HEADER_PATH ${HEADER})
string(REGEX MATCH "(.*)[/\\]" RELATIVE_DIRECTORY ${RELATIVE_HEADER_PATH})
@ -72,6 +72,7 @@ foreach(HEADER ${STORM_LIB_HEADERS})
)
list(APPEND STORM_OUTPUT_HEADERS "${CMAKE_BINARY_DIR}/include/${RELATIVE_DIRECTORY}${HEADER_FILENAME}")
endforeach()
add_custom_target(copy_headers DEPENDS ${STORM_OUTPUT_HEADERS} ${STORM_LIB_HEADERS})
add_dependencies(storm copy_headers)
add_custom_target(copy_storm_headers DEPENDS ${STORM_OUTPUT_HEADERS} ${STORM_LIB_HEADERS})
add_dependencies(storm copy_storm_headers)
add_dependencies(storm copy_resources_headers)

8
src/test/CMakeLists.txt

@ -8,20 +8,16 @@ register_source_groups_from_filestructure("${ALL_FILES}" test)
include_directories(${GTEST_INCLUDE_DIR})
configure_file (
"${PROJECT_SOURCE_DIR}/src/test/storm-test-config.h.in"
"${PROJECT_BINARY_DIR}/src/test/storm-config.h"
)
foreach (testsuite adapter builder logic modelchecker parser permissiveschedulers solver storage transformer utility)
file(GLOB_RECURSE TEST_${testsuite}_FILES ${STORM_CPP_TESTS_BASE_PATH}/${testsuite}/*.h ${STORM_CPP_TESTS_BASE_PATH}/${testsuite}/*.cpp)
add_executable (test-${testsuite} ${TEST_${testsuite}_FILES})
add_executable (test-${testsuite} ${TEST_${testsuite}_FILES} ${PROJECT_SOURCE_DIR}/src/test/storm-test.cpp)
target_link_libraries(test-${testsuite} storm)
target_link_libraries(test-${testsuite} ${STORM_TEST_LINK_LIBRARIES})
add_dependencies(test-${testsuite} test-resources)
add_test(run-test-${testsuite} test-${testsuite})
endforeach ()

0
src/test/storm-test-config.h.in

Loading…
Cancel
Save