summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/PrecompileHeaders/PchMultilanguage.cmake
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2019-10-03 19:53:42 (GMT)
committerCristian Adam <cristian.adam@gmail.com>2019-10-03 20:58:55 (GMT)
commit1144a4fa47d467ac3bd2f70ed2dffd04734d53a7 (patch)
tree06ccd93a750afc2e28de0d888653f6db93c0e74e /Tests/RunCMake/PrecompileHeaders/PchMultilanguage.cmake
parent3247506662684003e19d9552ab5ce70643808f4d (diff)
downloadCMake-1144a4fa47d467ac3bd2f70ed2dffd04734d53a7.zip
CMake-1144a4fa47d467ac3bd2f70ed2dffd04734d53a7.tar.gz
CMake-1144a4fa47d467ac3bd2f70ed2dffd04734d53a7.tar.bz2
PCH: Add multi-language PCH generation support
If the target has C files, it will get a C PCH file. The same for C++ files. The linker language is no longer used to determine which language to use for PCH. Fixes: #19790
Diffstat (limited to 'Tests/RunCMake/PrecompileHeaders/PchMultilanguage.cmake')
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchMultilanguage.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/PrecompileHeaders/PchMultilanguage.cmake b/Tests/RunCMake/PrecompileHeaders/PchMultilanguage.cmake
new file mode 100644
index 0000000..4face95
--- /dev/null
+++ b/Tests/RunCMake/PrecompileHeaders/PchMultilanguage.cmake
@@ -0,0 +1,9 @@
+cmake_minimum_required(VERSION 3.15)
+project(PchMultilanguage C CXX)
+
+add_executable(foobar
+ foo.c
+ main.cpp
+)
+target_include_directories(foobar PUBLIC include)
+target_precompile_headers(foobar PRIVATE "<stddef.h>")