summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/PrecompileHeaders
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-10-31 16:11:18 (GMT)
committerBrad King <brad.king@kitware.com>2022-10-31 16:19:06 (GMT)
commit183b9a9eca8bdf7684a6c281c677c58f3c0a66fd (patch)
tree88e3880abfdc0c41bacd56634905653ed5cd47dc /Tests/RunCMake/PrecompileHeaders
parent4d13f472a2ebd09f6f7f3be466e5d000bbeb6908 (diff)
downloadCMake-183b9a9eca8bdf7684a6c281c677c58f3c0a66fd.zip
CMake-183b9a9eca8bdf7684a6c281c677c58f3c0a66fd.tar.gz
CMake-183b9a9eca8bdf7684a6c281c677c58f3c0a66fd.tar.bz2
CMP0141: Fix PCH REUSE_FROM under policy NEW behavior
Under the CMP0141 NEW behavior added by commit 0e96a20478 (MSVC: Add abstraction for debug information format, 2022-08-25, v3.25.0-rc1~142^2~1), the `-Zi` and `-ZI` flags do not appear in `CMAKE_<LANG>_FLAGS_<CONFIG>` anymore. Teach the PCH REUSE_FROM implementation to recognize the `EditAndContinue` and `ProgramDatabase` debug information formats through the policy's new abstraction. Fixes: #24106
Diffstat (limited to 'Tests/RunCMake/PrecompileHeaders')
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchReuseFrom-CMP0141-NEW.cmake2
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchReuseFrom-CMP0141-OLD.cmake2
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchReuseFrom-common.cmake (renamed from Tests/RunCMake/PrecompileHeaders/PchReuseFrom.cmake)0
-rw-r--r--Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake3
4 files changed, 6 insertions, 1 deletions
diff --git a/Tests/RunCMake/PrecompileHeaders/PchReuseFrom-CMP0141-NEW.cmake b/Tests/RunCMake/PrecompileHeaders/PchReuseFrom-CMP0141-NEW.cmake
new file mode 100644
index 0000000..daf7a38
--- /dev/null
+++ b/Tests/RunCMake/PrecompileHeaders/PchReuseFrom-CMP0141-NEW.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0141 NEW)
+include(PchReuseFrom-common.cmake)
diff --git a/Tests/RunCMake/PrecompileHeaders/PchReuseFrom-CMP0141-OLD.cmake b/Tests/RunCMake/PrecompileHeaders/PchReuseFrom-CMP0141-OLD.cmake
new file mode 100644
index 0000000..9586887
--- /dev/null
+++ b/Tests/RunCMake/PrecompileHeaders/PchReuseFrom-CMP0141-OLD.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0141 OLD)
+include(PchReuseFrom-common.cmake)
diff --git a/Tests/RunCMake/PrecompileHeaders/PchReuseFrom.cmake b/Tests/RunCMake/PrecompileHeaders/PchReuseFrom-common.cmake
index 8d5e945..8d5e945 100644
--- a/Tests/RunCMake/PrecompileHeaders/PchReuseFrom.cmake
+++ b/Tests/RunCMake/PrecompileHeaders/PchReuseFrom-common.cmake
diff --git a/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
index fd41e2f..687fc0e 100644
--- a/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
+++ b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
@@ -15,7 +15,8 @@ run_test(PchInterface)
run_cmake(PchPrologueEpilogue)
run_test(SkipPrecompileHeaders)
run_test(CXXnotC)
-run_test(PchReuseFrom)
+run_test(PchReuseFrom-CMP0141-OLD)
+run_test(PchReuseFrom-CMP0141-NEW)
run_test(PchReuseFromPrefixed)
run_test(PchReuseFromSubdir)
run_cmake(PchMultilanguage)