diff options
author | Mikko Lehtonen <scoopr@iki.fi> | 2024-01-26 12:01:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-01-30 17:50:40 (GMT) |
commit | 77c4d2f9a213f0c6bda0fb78238d621ecbb3676d (patch) | |
tree | fa0ac15d92900532e45684a49fd69fd153606d0e /Tests/SwiftMixPCH/CMain.c | |
parent | 3cd2c59ecf7104d0b3d6bf5609bf96959bdcdfb0 (diff) | |
download | CMake-77c4d2f9a213f0c6bda0fb78238d621ecbb3676d.zip CMake-77c4d2f9a213f0c6bda0fb78238d621ecbb3676d.tar.gz CMake-77c4d2f9a213f0c6bda0fb78238d621ecbb3676d.tar.bz2 |
Xcode: Fix PCH support with Swift & C++
Previously, when a mixed language target ends up with `Swift` as the
`LINKER_LANGUAGE`, the PCH file was not set for the target at all.
Fixes: #21224
Diffstat (limited to 'Tests/SwiftMixPCH/CMain.c')
-rw-r--r-- | Tests/SwiftMixPCH/CMain.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/SwiftMixPCH/CMain.c b/Tests/SwiftMixPCH/CMain.c new file mode 100644 index 0000000..4cd78e6 --- /dev/null +++ b/Tests/SwiftMixPCH/CMain.c @@ -0,0 +1,9 @@ +#ifndef PCH_VALUE +# error "PCH_VALUE not defined" +#endif + +int main(void) +{ + const int value = PCH_VALUE; + return value == 42 ? 0 : 1; +} |