diff options
author | Brad King <brad.king@kitware.com> | 2021-02-19 16:25:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-02-19 16:25:29 (GMT) |
commit | 9945b3b5655a8cefc0a0fb43bdb1948b6ab5bc32 (patch) | |
tree | 4ac87f23608c47d9036ef850cd8023e4d05747ea /Tests/RunCMake/PrecompileHeaders/no_pch.c | |
parent | d9fd32b3b347327adb146284b543ec8e97cae6bd (diff) | |
download | CMake-9945b3b5655a8cefc0a0fb43bdb1948b6ab5bc32.zip CMake-9945b3b5655a8cefc0a0fb43bdb1948b6ab5bc32.tar.gz CMake-9945b3b5655a8cefc0a0fb43bdb1948b6ab5bc32.tar.bz2 |
VS: Restore support for PCH in CXX but not C within once target
Fix logic from commit 9df1f33c9a (VisualStudio: move PCH rules to
projects when possible., 2020-10-15, v3.20.0-rc1~638^2) to explicitly
disable PCH on sources that should not use the target-wide PCH rules.
Fixes: #21827
Diffstat (limited to 'Tests/RunCMake/PrecompileHeaders/no_pch.c')
-rw-r--r-- | Tests/RunCMake/PrecompileHeaders/no_pch.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/PrecompileHeaders/no_pch.c b/Tests/RunCMake/PrecompileHeaders/no_pch.c new file mode 100644 index 0000000..8d22580 --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/no_pch.c @@ -0,0 +1,7 @@ +#ifdef CXX_PCH +# error "CXX PCH included in C source." +#endif +int no_pch(void) +{ + return 0; +} |