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 /Source | |
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 'Source')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index c6bb3df..98d77c6 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3067,7 +3067,8 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, } // Precompile Headers - std::string pchHeader = gtgt->GetPchHeader(configName, llang); + std::string pchHeader = + gtgt->GetPchHeader(configName, langForPreprocessorDefinitions); if (!pchHeader.empty()) { buildSettings->AddAttribute("GCC_PREFIX_HEADER", this->CreateString(pchHeader)); |