Browse Source

VS: Fix pre-VS15.8 unity build exclusion of per-config sources

In a unity build, the original source files need to be excluded from
the build.  Prior to VS 15.8, this is done via `ExcludeFromBuild`,
which is the same mechanism used to implement per-config sources.
Fix a conflict in the implementation of the two features so that
unity-batched sources are excluded from all configurations rather
than just those in which they would otherwise have been included.
Brad King 4 years ago
parent
commit
ea289314ef
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/cmVisualStudio10TargetGenerator.cxx

+ 1 - 1
Source/cmVisualStudio10TargetGenerator.cxx

@@ -2351,7 +2351,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources(Elem& e0)
           // Visual Studio versions prior to 2017 15.8 do not know about unity
           // Visual Studio versions prior to 2017 15.8 do not know about unity
           // builds, thus we exclude the files already part of unity sources.
           // builds, thus we exclude the files already part of unity sources.
           if (!si.Source->GetPropertyAsBool("SKIP_UNITY_BUILD_INCLUSION")) {
           if (!si.Source->GetPropertyAsBool("SKIP_UNITY_BUILD_INCLUSION")) {
-            exclude_configs = si.Configs;
+            exclude_configs = all_configs;
           }
           }
         }
         }
       }
       }