summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2019-12-07 15:01:06 +0100
committerCristian Adam <cristian.adam@gmail.com>2019-12-07 15:44:31 +0100
commit5ae07e7166c6cb7eada2a2d171d216039d977058 (patch)
treef6b4f32c15d1aae24a8b8a2fd6ec105287cf64dd
parentf742f7ac1f213531da07e56582b533114fe4b864 (diff)
downloadcmake-5ae07e7166c6cb7eada2a2d171d216039d977058.tar.gz
Unity: Generic source file handling for all generators
-rw-r--r--Source/cmLocalGenerator.cxx7
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx2
2 files changed, 2 insertions, 7 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 923d2a5df3..b211c34078 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2519,12 +2519,7 @@ void cmLocalGenerator::AddUnityBuild(cmGeneratorTarget* target)
for (; begin != end; ++begin) {
cmSourceFile* sf = filtered_sources[begin];
- // Only in Visual Studio generator we keep the source files
- // for explicit processing.
- if (!this->GetGlobalGenerator()->IsMultiConfig() ||
- this->GetGlobalGenerator()->IsXcode()) {
- target->AddSourceFileToUnityBatch(sf->ResolveFullPath());
- }
+ target->AddSourceFileToUnityBatch(sf->ResolveFullPath());
sf->SetProperty("UNITY_SOURCE_FILE", filename.c_str());
if (beforeInclude) {
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 94b6495271..5c0b881f63 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2141,7 +2141,6 @@ void cmVisualStudio10TargetGenerator::WriteAllSources(Elem& e0)
this->WriteExtraSource(e1, si.Source);
break;
case cmGeneratorTarget::SourceKindHeader:
- case cmGeneratorTarget::SourceKindUnityBatched:
this->WriteHeaderSource(e1, si.Source);
break;
case cmGeneratorTarget::SourceKindIDL:
@@ -2153,6 +2152,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources(Elem& e0)
case cmGeneratorTarget::SourceKindModuleDefinition:
tool = "None";
break;
+ case cmGeneratorTarget::SourceKindUnityBatched:
case cmGeneratorTarget::SourceKindObjectSource: {
const std::string& lang = si.Source->GetLanguage();
if (lang == "C" || lang == "CXX") {