summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-11-01 17:47:57 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-11-01 17:48:14 (GMT)
commit59c3ce4c838c0ff8614f0091033183c336f874d6 (patch)
tree5f10e551d340214d330d814ee64400f99f50739c /Tests
parent8b95e3ff434948541fcbaeaa03e1137eda846abe (diff)
parent1f507580a13b2883a016cab2f18cf3d6f868d269 (diff)
downloadCMake-59c3ce4c838c0ff8614f0091033183c336f874d6.zip
CMake-59c3ce4c838c0ff8614f0091033183c336f874d6.tar.gz
CMake-59c3ce4c838c0ff8614f0091033183c336f874d6.tar.bz2
Merge topic 'cxxmodules-cmp0155-graceful-fallback-without-scanner' into release-3.28
1f507580a1 cmGlobalGenerator: give context about module queries 889aa0354a CMP0155: ignore scanning for sources if no scanner is available Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !8925
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CXXModules/CMP0155-NEW-result.txt1
-rw-r--r--Tests/RunCMake/CXXModules/CMP0155-NEW-stderr.txt10
-rw-r--r--Tests/RunCMake/CXXModules/CMP0155-NEW-with-rule.cmake11
-rw-r--r--Tests/RunCMake/CXXModules/CMP0155-NEW.cmake4
-rw-r--r--Tests/RunCMake/CXXModules/RunCMakeTest.cmake1
5 files changed, 14 insertions, 13 deletions
diff --git a/Tests/RunCMake/CXXModules/CMP0155-NEW-result.txt b/Tests/RunCMake/CXXModules/CMP0155-NEW-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/CXXModules/CMP0155-NEW-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/CXXModules/CMP0155-NEW-stderr.txt b/Tests/RunCMake/CXXModules/CMP0155-NEW-stderr.txt
deleted file mode 100644
index 0843d0b..0000000
--- a/Tests/RunCMake/CXXModules/CMP0155-NEW-stderr.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-(CMake Error in CMakeLists.txt:
- The target named "cmp0155-new" has C\+\+ sources that may use modules, but
- the compiler does not provide a way to discover the import graph
- dependencies\. See the cmake-cxxmodules\(7\) manual and the
- CMAKE_CXX_SCAN_FOR_MODULES variable\.
-|CMake Error in CMakeLists.txt:
- The target named "cmp0155-new" has C\+\+ sources that may use modules, but
- modules are not supported by this generator\. See the cmake-cxxmodules\(7\)
- manual and the CMAKE_CXX_SCAN_FOR_MODULES variable\.
-)
diff --git a/Tests/RunCMake/CXXModules/CMP0155-NEW-with-rule.cmake b/Tests/RunCMake/CXXModules/CMP0155-NEW-with-rule.cmake
new file mode 100644
index 0000000..9eda4df
--- /dev/null
+++ b/Tests/RunCMake/CXXModules/CMP0155-NEW-with-rule.cmake
@@ -0,0 +1,11 @@
+enable_language(CXX)
+set(CMAKE_CXX_SCANDEP_SOURCE "echo")
+
+cmake_policy(SET CMP0155 NEW)
+
+add_executable(cmp0155-new-with-rule
+ sources/module-use.cxx)
+set_target_properties(cmp0155-new-with-rule
+ PROPERTIES
+ CXX_STANDARD 20
+ CXX_STANDARD_REQUIRED ON)
diff --git a/Tests/RunCMake/CXXModules/CMP0155-NEW.cmake b/Tests/RunCMake/CXXModules/CMP0155-NEW.cmake
index bea858b..d68775a 100644
--- a/Tests/RunCMake/CXXModules/CMP0155-NEW.cmake
+++ b/Tests/RunCMake/CXXModules/CMP0155-NEW.cmake
@@ -3,8 +3,8 @@ unset(CMAKE_CXX_SCANDEP_SOURCE)
cmake_policy(SET CMP0155 NEW)
-add_executable(cmp0155-new
- sources/module-use.cxx)
+add_library(cmp0155-new
+ sources/cxx-anchor.cxx)
set_target_properties(cmp0155-new
PROPERTIES
CXX_STANDARD 20
diff --git a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake
index c1c42c4..781c708 100644
--- a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake
@@ -23,6 +23,7 @@ if ("cxx_std_20" IN_LIST CMAKE_CXX_COMPILE_FEATURES)
run_cmake(NoScanningVariable)
run_cmake(CMP0155-OLD)
run_cmake(CMP0155-NEW)
+ run_cmake(CMP0155-NEW-with-rule)
endif ()
if (RunCMake_GENERATOR MATCHES "Ninja")