mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
Unity build: Add XCode support
This commit is contained in:
@@ -2839,6 +2839,7 @@ bool cmGlobalXCodeGenerator::CreateGroups(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
generator->AddUnityBuild(gtgt, "");
|
||||||
generator->AddPchDependencies(gtgt, "");
|
generator->AddPchDependencies(gtgt, "");
|
||||||
|
|
||||||
auto addSourceToGroup = [this, mf, gtgt,
|
auto addSourceToGroup = [this, mf, gtgt,
|
||||||
|
|||||||
@@ -2266,7 +2266,11 @@ void cmLocalGenerator::AddUnityBuild(cmGeneratorTarget* target,
|
|||||||
for (; begin != end; ++begin) {
|
for (; begin != end; ++begin) {
|
||||||
cmSourceFile* sf = filtered_sources[begin];
|
cmSourceFile* sf = filtered_sources[begin];
|
||||||
|
|
||||||
if (!this->GetGlobalGenerator()->IsMultiConfig()) {
|
// Only in Visual Studio generator we keep the source files
|
||||||
|
// for explicit processing. For the rest the source files will
|
||||||
|
// not be included in the project.
|
||||||
|
if (!this->GetGlobalGenerator()->IsMultiConfig() ||
|
||||||
|
this->GetGlobalGenerator()->IsXcode()) {
|
||||||
sf->SetProperty("HEADER_FILE_ONLY", "ON");
|
sf->SetProperty("HEADER_FILE_ONLY", "ON");
|
||||||
}
|
}
|
||||||
sf->SetProperty("UNITY_SOURCE_FILE", filename.c_str());
|
sf->SetProperty("UNITY_SOURCE_FILE", filename.c_str());
|
||||||
|
|||||||
Reference in New Issue
Block a user