From ea289314ef473d6bcdc1ca858aac6cdb15ecf56a Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 11 Nov 2021 07:07:02 -0500 Subject: 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. --- Source/cmVisualStudio10TargetGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index a7822b2..cd4326f 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/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 // builds, thus we exclude the files already part of unity sources. if (!si.Source->GetPropertyAsBool("SKIP_UNITY_BUILD_INCLUSION")) { - exclude_configs = si.Configs; + exclude_configs = all_configs; } } } -- cgit v0.12