diff options
author | Brad King <brad.king@kitware.com> | 2023-08-10 12:56:00 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-08-10 12:56:29 (GMT) |
commit | f16bbea383327b75c9fb710aa4feabcee3686bbf (patch) | |
tree | 9a9efef33818121a06ee839c9a1413c4bc2ab858 /Tests/RunCMake | |
parent | c373e35284038f4615b4b72e3e89d5fe01434414 (diff) | |
parent | 1e9ec93f482ef022b538d5d9f419d26cd8ecfa6d (diff) | |
download | CMake-f16bbea383327b75c9fb710aa4feabcee3686bbf.zip CMake-f16bbea383327b75c9fb710aa4feabcee3686bbf.tar.gz CMake-f16bbea383327b75c9fb710aa4feabcee3686bbf.tar.bz2 |
Merge topic 'test-cxxmodules-generated-fix'
1e9ec93f48 Tests/RunCMake/CXXModules: actually generate the source at build time
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8693
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/CXXModules/examples/generated-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CXXModules/examples/generated/CMakeLists.txt | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/Tests/RunCMake/CXXModules/examples/generated-stderr.txt b/Tests/RunCMake/CXXModules/examples/generated-stderr.txt index 1dd9876..06160ce 100644 --- a/Tests/RunCMake/CXXModules/examples/generated-stderr.txt +++ b/Tests/RunCMake/CXXModules/examples/generated-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMakeLists.txt:12 \(target_sources\): +CMake Warning \(dev\) at CMakeLists.txt:16 \(target_sources\): CMake's C\+\+ module support is experimental. It is meant only for experimentation and feedback to CMake developers. This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CXXModules/examples/generated/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/generated/CMakeLists.txt index 73f7ff7..9a8da3d 100644 --- a/Tests/RunCMake/CXXModules/examples/generated/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/generated/CMakeLists.txt @@ -3,10 +3,14 @@ project(cxx_modules_generated CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") -configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/importable.cxx.in" - "${CMAKE_CURRENT_BINARY_DIR}/importable.cxx" - COPYONLY) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/importable.cxx" + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/importable.cxx.in" + COMMAND "${CMAKE_COMMAND}" + -E copy_if_different + "${CMAKE_CURRENT_SOURCE_DIR}/importable.cxx.in" + "${CMAKE_CURRENT_BINARY_DIR}/importable.cxx" + COMMENT "Copying 'importable.cxx'") add_executable(generated) target_sources(generated |