mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-20 14:10:27 -06:00
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.
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user