diff options
Diffstat (limited to 'Tests/RunCMake/CXXModules/NinjaForceResponseFile.cmake')
-rw-r--r-- | Tests/RunCMake/CXXModules/NinjaForceResponseFile.cmake | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Tests/RunCMake/CXXModules/NinjaForceResponseFile.cmake b/Tests/RunCMake/CXXModules/NinjaForceResponseFile.cmake new file mode 100644 index 0000000..bac3263 --- /dev/null +++ b/Tests/RunCMake/CXXModules/NinjaForceResponseFile.cmake @@ -0,0 +1,27 @@ +# Fake out that we have dyndep; we only need to generate, not actually build +# here. +set(CMAKE_CXX_SCANDEP_SOURCE "") + +enable_language(CXX) + +if (NOT CMAKE_GENERATOR MATCHES "Ninja") + message(FATAL_ERROR + "This test requires a 'Ninja' generator to be used.") +endif () + +set(CMAKE_NINJA_FORCE_RESPONSE_FILE 1) + +add_library(ninja-forced-response-file) +target_sources(ninja-forced-response-file + PRIVATE + FILE_SET modules TYPE CXX_MODULES + BASE_DIRS + "${CMAKE_CURRENT_SOURCE_DIR}/sources" + FILES + sources/module.cxx + sources/module-part.cxx + FILE_SET internal_partitions TYPE CXX_MODULES FILES + sources/module-internal-part.cxx) +target_compile_features(ninja-forced-response-file + PRIVATE + cxx_std_20) |