diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2019-07-13 10:07:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-08-28 15:47:50 (GMT) |
commit | 28be170fbc97a29be6383fb4afe5f62c6983fb2c (patch) | |
tree | 66f2b73e9c2a02d368660fc28424000beae881ee /Source/cmGlobalXCodeGenerator.cxx | |
parent | b8626261e95e0f99c9227d619671822f9a60ef1a (diff) | |
download | CMake-28be170fbc97a29be6383fb4afe5f62c6983fb2c.zip CMake-28be170fbc97a29be6383fb4afe5f62c6983fb2c.tar.gz CMake-28be170fbc97a29be6383fb4afe5f62c6983fb2c.tar.bz2 |
Precompile headers: Add support for Xcode generator
Co-Author: Daniel Pfeifer <daniel@pfeifer-mail.de>
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index a204fe0..427ab44 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2374,6 +2374,16 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, buildSettings->AddAttribute("DYLIB_COMPATIBILITY_VERSION", this->CreateString(vso.str())); } + + // Precompile Headers + std::string pchHeader = gtgt->GetPchHeader(configName, llang); + if (!pchHeader.empty()) { + buildSettings->AddAttribute("GCC_PREFIX_HEADER", + this->CreateString(pchHeader)); + buildSettings->AddAttribute("GCC_PRECOMPILE_PREFIX_HEADER", + this->CreateString("YES")); + } + // put this last so it can override existing settings // Convert "XCODE_ATTRIBUTE_*" properties directly. { @@ -2829,6 +2839,8 @@ bool cmGlobalXCodeGenerator::CreateGroups( continue; } + generator->AddPchDependencies(gtgt, ""); + auto addSourceToGroup = [this, mf, gtgt, &sourceGroups](std::string const& source) { cmSourceGroup* sourceGroup = mf->FindSourceGroup(source, sourceGroups); |