summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2024-02-20 17:31:37 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2024-02-20 17:32:48 (GMT)
commitf0df692d21029326112bb91e236f2c4e9a6526a2 (patch)
tree3a04306c2267dae9eda5cf8cea8684d878e83b09
parent583641ac92b83f91341e701c057ec5e6da8eb8fc (diff)
downloadCMake-f0df692d21029326112bb91e236f2c4e9a6526a2.zip
CMake-f0df692d21029326112bb91e236f2c4e9a6526a2.tar.gz
CMake-f0df692d21029326112bb91e236f2c4e9a6526a2.tar.bz2
Tests/CXXModules: test `cxx_std_20` coming from a dependency
Closes: #25569
-rw-r--r--Tests/RunCMake/CXXModules/examples/export-transitive-targets-build/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CXXModules/examples/export-transitive-targets-install/CMakeLists.txt2
2 files changed, 2 insertions, 2 deletions
diff --git a/Tests/RunCMake/CXXModules/examples/export-transitive-targets-build/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-transitive-targets-build/CMakeLists.txt
index 99ec585..435f949 100644
--- a/Tests/RunCMake/CXXModules/examples/export-transitive-targets-build/CMakeLists.txt
+++ b/Tests/RunCMake/CXXModules/examples/export-transitive-targets-build/CMakeLists.txt
@@ -6,6 +6,7 @@ include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake")
add_library(usage_reqs INTERFACE
include/include.h
includes/includes.h)
+target_compile_features(usage_reqs INTERFACE cxx_std_20)
target_compile_definitions(usage_reqs
INTERFACE
FROM_USAGE_REQS)
@@ -32,7 +33,6 @@ target_sources(export_transitive_targets
importable.cxx
subdir/importable.cxx
)
-target_compile_features(export_transitive_targets PUBLIC cxx_std_20)
target_link_libraries(export_transitive_targets PRIVATE usage_reqs)
add_library(no_modules STATIC no_modules.cxx)
diff --git a/Tests/RunCMake/CXXModules/examples/export-transitive-targets-install/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-transitive-targets-install/CMakeLists.txt
index dd1eb01..f413f02 100644
--- a/Tests/RunCMake/CXXModules/examples/export-transitive-targets-install/CMakeLists.txt
+++ b/Tests/RunCMake/CXXModules/examples/export-transitive-targets-install/CMakeLists.txt
@@ -6,6 +6,7 @@ include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake")
add_library(usage_reqs INTERFACE
include/include.h
includes/includes.h)
+target_compile_features(usage_reqs INTERFACE cxx_std_20)
target_compile_definitions(usage_reqs
INTERFACE
FROM_USAGE_REQS)
@@ -33,7 +34,6 @@ target_sources(export_transitive_targets
importable.cxx
subdir/importable.cxx
)
-target_compile_features(export_transitive_targets PUBLIC cxx_std_20)
target_link_libraries(export_transitive_targets PRIVATE usage_reqs)
add_library(no_modules STATIC no_modules.cxx)