diff options
author | Brad King <brad.king@kitware.com> | 2021-09-14 13:47:45 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-09-14 13:48:00 (GMT) |
commit | 69c0a5daf98958ba6ad4311781ec72fe8b9bfb0a (patch) | |
tree | df52b3e1a2631b70f0d602a4348414d3a607e9bf /Source/cmGeneratorTarget.cxx | |
parent | 8f67d42671942aebfe345a574c563f59efe931d0 (diff) | |
parent | bbcdac4e5d53de12013c6af6395b28e4816f7823 (diff) | |
download | CMake-69c0a5daf98958ba6ad4311781ec72fe8b9bfb0a.zip CMake-69c0a5daf98958ba6ad4311781ec72fe8b9bfb0a.tar.gz CMake-69c0a5daf98958ba6ad4311781ec72fe8b9bfb0a.tar.bz2 |
Merge topic 'pch-xcode-multiple-languages'
bbcdac4e5d PCH: Fix all-language precompile header support in Xcode
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6435
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 648708a..4bad7ab 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -4087,7 +4087,7 @@ std::string cmGeneratorTarget::GetPchHeader(const std::string& config, if (this->GetGlobalGenerator()->IsXcode()) { file << "#ifndef CMAKE_SKIP_PRECOMPILE_HEADERS\n"; } - if (language == "CXX") { + if (language == "CXX" && !this->GetGlobalGenerator()->IsXcode()) { file << "#ifdef __cplusplus\n"; } for (auto const& header_bt : headers) { @@ -4105,7 +4105,7 @@ std::string cmGeneratorTarget::GetPchHeader(const std::string& config, firstHeaderOnDisk = header_bt.Value; } } - if (language == "CXX") { + if (language == "CXX" && !this->GetGlobalGenerator()->IsXcode()) { file << "#endif // __cplusplus\n"; } if (this->GetGlobalGenerator()->IsXcode()) { |