Browse Source

source groups fixed

tempestpy_adaptions
Sebastian Junges 8 years ago
parent
commit
6852af8158
  1. 10
      resources/cmake/macros/RegisterSourceGroup.cmake
  2. 5
      src/CMakeLists.txt
  3. 5
      src/storm-pgcl/CMakeLists.txt
  4. 4
      src/storm/CMakeLists.txt
  5. 5
      src/test/CMakeLists.txt

10
resources/cmake/macros/RegisterSourceGroup.cmake

@ -1,12 +1,16 @@
macro(register_source_groups_from_filestructure list_of_files)
macro(register_source_groups_from_filestructure list_of_files remove_prefix)
foreach(FILE ${list_of_files})
get_filename_component(PARENT_DIR "${FILE}" PATH)
# skip src or include and changes /'s to \\'s
string(REPLACE ${PROJECT_SOURCE_DIR} "" PARENT_DIR "${PARENT_DIR}")
string(REGEX REPLACE "(\\./)?(src|include)/?" "" GROUP "${PARENT_DIR}")
string(REPLACE "/" "\\" GROUP "${GROUP}")
string(REGEX REPLACE "${remove_prefix}/?" "" GROUP "${GROUP}")
#string(REGEX REPLACE "/storm?/" "" GROUP ${GROUP})
#STRING(SUBSTRING "${GROUP}" 1 -1 GROUP)
string(REPLACE "/" "\\" GROUP "${GROUP}")
message(${GROUP}: ${FILE})
# group into "Source Files" and "Header Files"
# if ("${FILE}" MATCHES ".*\\.cpp")
# set(GROUP "Source Files\\${GROUP}")

5
src/CMakeLists.txt

@ -5,8 +5,3 @@ add_subdirectory(storm-pgcl-cli)
add_subdirectory(test)
file(GLOB_RECURSE ALL_FILES ${PROJECT_SOURCE_DIR}/src/*.h ${PROJECT_SOURCE_DIR}/src/*.cpp)
register_source_groups_from_filestructure("${ALL_FILES}")

5
src/storm-pgcl/CMakeLists.txt

@ -1,3 +1,8 @@
file(GLOB_RECURSE ALL_FILES ${PROJECT_SOURCE_DIR}/src/storm-pgcl/*.h ${PROJECT_SOURCE_DIR}/src/storm-pgcl/*.cpp)
register_source_groups_from_filestructure("${ALL_FILES}" storm-pgcl)
file(GLOB_RECURSE STORM_PGCL_SOURCES ${PROJECT_SOURCE_DIR}/src/storm-pgcl/*/*.cpp)
file(GLOB_RECURSE STORM_PGCL_HEADERS ${PROJECT_SOURCE_DIR}/src/storm-pgcl/*/*.h)

4
src/storm/CMakeLists.txt

@ -1,3 +1,7 @@
file(GLOB_RECURSE ALL_FILES ${PROJECT_SOURCE_DIR}/src/storm/*.h ${PROJECT_SOURCE_DIR}/src/storm/*.cpp)
register_source_groups_from_filestructure("${ALL_FILES}" storm)
#############################################################
##
## Source file aggregation and clustering

5
src/test/CMakeLists.txt

@ -1,3 +1,8 @@
file(GLOB_RECURSE ALL_FILES ${PROJECT_SOURCE_DIR}/src/test/*.h ${PROJECT_SOURCE_DIR}/src/test/*.cpp)
register_source_groups_from_filestructure("${ALL_FILES}" test)
# Test Sources
# Note that the tests also need the source files, except for the main file
include_directories(${GTEST_INCLUDE_DIR})

Loading…
Cancel
Save