summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-11-12 14:51:05 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-11-12 14:51:16 (GMT)
commit5b46bc319435f429e3e616246e5e39b06f0e7fd0 (patch)
tree9cdfdc9b88e2a50270fba541b988442e47794cc7 /Source/cmLocalGenerator.cxx
parent45f8b10e0c12b3e17315851afd1bcd178225ce6a (diff)
parent9a5418320ea40d61a63fd47e5ac133c3ff780062 (diff)
downloadCMake-5b46bc319435f429e3e616246e5e39b06f0e7fd0.zip
CMake-5b46bc319435f429e3e616246e5e39b06f0e7fd0.tar.gz
CMake-5b46bc319435f429e3e616246e5e39b06f0e7fd0.tar.bz2
Merge topic 'unity-HEADER_FILE_ONLY'
9a5418320e Unity: Don't include sources with HEADER_FILE_ONLY property set Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4023
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 2697c65..81cd099 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2441,6 +2441,7 @@ void cmLocalGenerator::AddUnityBuild(cmGeneratorTarget* target)
std::back_inserter(filtered_sources), [&](cmSourceFile* sf) {
return sf->GetLanguage() == lang &&
!sf->GetPropertyAsBool("SKIP_UNITY_BUILD_INCLUSION") &&
+ !sf->GetPropertyAsBool("HEADER_FILE_ONLY") &&
!sf->GetProperty("COMPILE_OPTIONS") &&
!sf->GetProperty("COMPILE_DEFINITIONS") &&
!sf->GetProperty("COMPILE_FLAGS") &&
@@ -2474,11 +2475,10 @@ void cmLocalGenerator::AddUnityBuild(cmGeneratorTarget* target)
cmSourceFile* sf = filtered_sources[begin];
// 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.
+ // for explicit processing.
if (!this->GetGlobalGenerator()->IsMultiConfig() ||
this->GetGlobalGenerator()->IsXcode()) {
- sf->SetProperty("HEADER_FILE_ONLY", "ON");
+ target->AddSourceFileToUnityBatch(sf->ResolveFullPath());
}
sf->SetProperty("UNITY_SOURCE_FILE", filename.c_str());