diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d0bf368aecd85a5eb493286ae51c038a5d25f13..964e4be69f03514f39dbdbd0f14214db088758bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -316,8 +316,9 @@ if(BUILD_CODE) configure_file( "${PROJECT_SOURCE_DIR}/cpp/turtle_config.hpp.in" - "${PROJECT_SOURCE_DIR}/cpp/turtle_config.hpp" + "${PROJECT_BINARY_DIR}/include/turtle_config.hpp" @ONLY) + include_directories(${PROJECT_BINARY_DIR}/include) add_subdirectory(cpp) @@ -334,6 +335,10 @@ if(BUILD_CODE) EXPORT TurTLETargets FILE_SET HEADERS DESTINATION include/TurTLE) + install( + FILES "${PROJECT_BINARY_DIR}/include/turtle_config.hpp" + PERMISSIONS OWNER_READ GROUP_READ WORLD_READ + DESTINATION include/TurTLE) install( EXPORT TurTLETargets FILE TurTLEConfig.cmake diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 25d39ce899f89bc5bb5eee575914a01d2e82f510..374cb3b02f85b15fc1aa06beb2af818e5e785117 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -200,7 +200,6 @@ set(hpp_for_lib ${CMAKE_CURRENT_LIST_DIR}/scope_timer.hpp ${CMAKE_CURRENT_LIST_DIR}/shared_array.hpp ${CMAKE_CURRENT_LIST_DIR}/spectrum_function.hpp - ${CMAKE_CURRENT_LIST_DIR}/turtle_config.hpp ${CMAKE_CURRENT_LIST_DIR}/turtle_timer.hpp ${CMAKE_CURRENT_LIST_DIR}/vorticity_equation.hpp) diff --git a/cpp/turtle_config.hpp.in b/cpp/turtle_config.hpp.in index eddf61bb68ed288c3976b88af02b1819e7ab7fb5..70d8f94d07620d33e4d2a6265642578fec3a82fd 100644 --- a/cpp/turtle_config.hpp.in +++ b/cpp/turtle_config.hpp.in @@ -22,6 +22,10 @@ **********************************************************************/ +// **Note**: the file `turtle_config.hpp` is generated by CMake from the file +// `cpp/turtle_config.hpp.in`. Editing `turtle_config.hpp` directly will +// generally not work as expected. + #ifndef TURTLE_CONFIG_HPP #define TURTLE_CONFIG_HPP