diff --git a/src/storm/CMakeLists.txt b/src/storm/CMakeLists.txt index dcd1bb9f9..de0a9bd8d 100644 --- a/src/storm/CMakeLists.txt +++ b/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) register_source_groups_from_filestructure("${ALL_FILES}" storm)