Browse Source

Cmake: Detection for the old in-source "storm-version.cpp" file. The file will now be deleted (if found) to prevent build issues for people that upgraded from older storm versions.

tempestpy_adaptions
TimQu 4 years ago
parent
commit
17a1d02757
  1. 12
      src/storm/CMakeLists.txt

12
src/storm/CMakeLists.txt

@ -1,3 +1,15 @@
# Storm versions before 1.6.0 generated an in-source .cpp file containing version information.
# When users upgrade from such a version, the generated file will still be there.
# We now delete this file to prevent building issues as there is no corresponding .h file (anymore).
if ((EXISTS "${PROJECT_SOURCE_DIR}/src/storm/utility/storm-version.cpp"))
file(READ "${PROJECT_SOURCE_DIR}/src/storm/utility/storm-version.cpp" STORM_OLD_VERSION_FILE)
string(FIND "${STORM_OLD_VERSION_FILE}" "// AUTO GENERATED -- DO NOT CHANGE" STORM_OLD_VERSION_FILE_DETECTED)
if (STORM_OLD_VERSION_FILE_DETECTED EQUAL 0)
message(WARNING "Storm - The file ${PROJECT_SOURCE_DIR}/src/storm/utility/storm-version.cpp was probably generated by an old Storm version and will be deleted now.")
file(REMOVE "${PROJECT_SOURCE_DIR}/src/storm/utility/storm-version.cpp")
endif(STORM_OLD_VERSION_FILE_DETECTED EQUAL 0)
endif()
file(GLOB_RECURSE ALL_FILES ${PROJECT_SOURCE_DIR}/src/storm/*.h ${PROJECT_SOURCE_DIR}/src/storm/*.cpp) 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) register_source_groups_from_filestructure("${ALL_FILES}" storm)

Loading…
Cancel
Save