diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-04-08 17:57:16 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-07-06 14:15:23 (GMT) |
commit | d3e2e61bcdb74899e7ee987c745ded8e7597fb62 (patch) | |
tree | 65cf7695be7cf5778b2bb8181376453a9f438078 /Tests/RunCMake/CXXModules/NinjaDependInfoFileSet.cmake | |
parent | ffd40c6b6e46b46c5742f8a815413ed82793fe7b (diff) | |
download | CMake-d3e2e61bcdb74899e7ee987c745ded8e7597fb62.zip CMake-d3e2e61bcdb74899e7ee987c745ded8e7597fb62.tar.gz CMake-d3e2e61bcdb74899e7ee987c745ded8e7597fb62.tar.bz2 |
cmNinjaTargetGenerator: write out fileset information for the collator
The collator will use this to generate property settings for the
imported targets in the build and install export sets.
Diffstat (limited to 'Tests/RunCMake/CXXModules/NinjaDependInfoFileSet.cmake')
-rw-r--r-- | Tests/RunCMake/CXXModules/NinjaDependInfoFileSet.cmake | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet.cmake b/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet.cmake new file mode 100644 index 0000000..74e729e --- /dev/null +++ b/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet.cmake @@ -0,0 +1,59 @@ +# Fake out that we have dyndep; we only need to generate, not actually build +# here. +set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) +set(CMAKE_EXPERIMENTAL_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 () + +add_library(ninja-file-sets-public) +target_sources(ninja-file-sets-public + PRIVATE + sources/module-impl.cxx + sources/module-internal-part-impl.cxx + sources/module-part-impl.cxx + sources/module-use.cxx + PUBLIC + 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-file-sets-public + PRIVATE + cxx_std_20) + +install(TARGETS ninja-file-sets-public + FILE_SET modules + DESTINATION "lib/cxx" + COMPONENT "modules" + FILE_SET internal_partitions + DESTINATION "lib/cxx/internals" + COMPONENT "modules-internal") + +add_library(ninja-file-sets-private) +target_sources(ninja-file-sets-private + PRIVATE + sources/module-impl.cxx + sources/module-internal-part-impl.cxx + sources/module-part-impl.cxx + sources/module-use.cxx + 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-file-sets-private + PRIVATE + cxx_std_20) |