|
|
@@ -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;
|