summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-02-02 13:13:22 (GMT)
committerBrad King <brad.king@kitware.com>2024-02-02 13:14:21 (GMT)
commit004c3c3986b0df2272ae2c00a634159425b576ae (patch)
treeda9b8c66be7a2490db3c1ba4e9ef1515e01b2367
parent7fc2a83fe6a0dceb4fabfd6aac99a5cb2fa09ec5 (diff)
downloadCMake-004c3c3986b0df2272ae2c00a634159425b576ae.zip
CMake-004c3c3986b0df2272ae2c00a634159425b576ae.tar.gz
CMake-004c3c3986b0df2272ae2c00a634159425b576ae.tar.bz2
Tests: Add case covering PCH in a unity build
Issue: #25650
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchInterfaceUnity-check.cmake1
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchInterfaceUnity.cmake2
-rw-r--r--Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake1
3 files changed, 4 insertions, 0 deletions
diff --git a/Tests/RunCMake/PrecompileHeaders/PchInterfaceUnity-check.cmake b/Tests/RunCMake/PrecompileHeaders/PchInterfaceUnity-check.cmake
new file mode 100644
index 0000000..c17aaa0
--- /dev/null
+++ b/Tests/RunCMake/PrecompileHeaders/PchInterfaceUnity-check.cmake
@@ -0,0 +1 @@
+include(${CMAKE_CURRENT_LIST_DIR}/PchInterface-check.cmake)
diff --git a/Tests/RunCMake/PrecompileHeaders/PchInterfaceUnity.cmake b/Tests/RunCMake/PrecompileHeaders/PchInterfaceUnity.cmake
new file mode 100644
index 0000000..59c2523
--- /dev/null
+++ b/Tests/RunCMake/PrecompileHeaders/PchInterfaceUnity.cmake
@@ -0,0 +1,2 @@
+set(CMAKE_UNITY_BUILD 1)
+include(PchInterface.cmake)
diff --git a/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
index b163369..c8a5c15 100644
--- a/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
+++ b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake
@@ -12,6 +12,7 @@ endfunction()
run_cmake(DisabledPch)
run_cmake(PchDebugGenex)
run_test(PchInterface)
+run_test(PchInterfaceUnity)
run_cmake(PchPrologueEpilogue)
run_test(SkipPrecompileHeaders)
run_test(CXXnotC)