summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-02-05 13:33:40 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-02-05 13:33:50 (GMT)
commit4b1a6a472210d1a0794e9889762e8ef25ed561df (patch)
treebcbd10c4adb69fa8c36901b0d6aca69a73c4012f /Source/cmVisualStudio10TargetGenerator.cxx
parent24d57c2257d7834e5309e80590d3882b29aa8df8 (diff)
parent9135954e2fe607c08e065601c52958652e11b684 (diff)
downloadCMake-4b1a6a472210d1a0794e9889762e8ef25ed561df.zip
CMake-4b1a6a472210d1a0794e9889762e8ef25ed561df.tar.gz
CMake-4b1a6a472210d1a0794e9889762e8ef25ed561df.tar.bz2
Merge topic 'vs-version-for-unity' into release-3.16
9135954e2f VS: Do not use native unity builds on VS 2017 versions less than 15.8 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4324
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index df9e7db..5857477 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2091,9 +2091,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources(Elem& e0)
const bool haveUnityBuild =
this->GeneratorTarget->GetPropertyAsBool("UNITY_BUILD");
- if (haveUnityBuild &&
- this->GlobalGenerator->GetVersion() >=
- cmGlobalVisualStudioGenerator::VS15) {
+ if (haveUnityBuild && this->GlobalGenerator->GetSupportsUnityBuilds()) {
Elem e1(e0, "PropertyGroup");
e1.Element("EnableUnitySupport", "true");
}
@@ -2199,9 +2197,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources(Elem& e0)
this->WriteSource(e2, si.Source);
bool useNativeUnityBuild = false;
- if (haveUnityBuild &&
- this->GlobalGenerator->GetVersion() >=
- cmGlobalVisualStudioGenerator::VS15) {
+ if (haveUnityBuild && this->GlobalGenerator->GetSupportsUnityBuilds()) {
// Magic value taken from cmGlobalVisualStudioVersionedGenerator.cxx
static const std::string vs15 = "141";
std::string toolset =
@@ -2228,7 +2224,7 @@ void cmVisualStudio10TargetGenerator::WriteAllSources(Elem& e0)
si.Source->GetProperty("UNITY_SOURCE_FILE"));
e2.Attribute("UnityFilesDirectory", unityDir);
} else {
- // Visual Studio versions prior to 2017 do not know about unity
+ // Visual Studio versions prior to 2017 15.8 do not know about unity
// builds, thus we exclude the files alredy part of unity sources.
if (!si.Source->GetPropertyAsBool("SKIP_UNITY_BUILD_INCLUSION")) {
exclude_configs = si.Configs;