summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-01-10 14:13:54 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-10 14:38:35 (GMT)
commitb91f6f39f7be92bab1302c4587dd51423f20cf00 (patch)
tree168ccdfb376d9b3b99b916f09b54d4ab1f7d0e97 /Source
parent89cc3d432bc576d00cb12880b37ec8b348599897 (diff)
downloadCMake-b91f6f39f7be92bab1302c4587dd51423f20cf00.zip
CMake-b91f6f39f7be92bab1302c4587dd51423f20cf00.tar.gz
CMake-b91f6f39f7be92bab1302c4587dd51423f20cf00.tar.bz2
VS: Track explicitly when platform is specified in generator name
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx4
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx1
-rw-r--r--Source/cmGlobalVisualStudioGenerator.h1
4 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 7573153..a6bec4b 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -407,7 +407,7 @@ bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile* mf)
return false;
}
} else if (this->SystemName == "Android") {
- if (this->DefaultPlatformName != "Win32") {
+ if (this->PlatformInGeneratorName) {
std::ostringstream e;
e << "CMAKE_SYSTEM_NAME is 'Android' but CMAKE_GENERATOR "
<< "specifies a platform too: '" << this->GetName() << "'";
@@ -438,7 +438,7 @@ bool cmGlobalVisualStudio10Generator::InitializeWindows(cmMakefile*)
bool cmGlobalVisualStudio10Generator::InitializeWindowsCE(cmMakefile* mf)
{
- if (this->DefaultPlatformName != "Win32") {
+ if (this->PlatformInGeneratorName) {
std::ostringstream e;
e << "CMAKE_SYSTEM_NAME is 'WindowsCE' but CMAKE_GENERATOR "
<< "specifies a platform too: '" << this->GetName() << "'";
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 616328d..55284c9 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -61,7 +61,7 @@ void cmGlobalVisualStudio8Generator::AddPlatformDefinitions(cmMakefile* mf)
bool cmGlobalVisualStudio8Generator::SetGeneratorPlatform(std::string const& p,
cmMakefile* mf)
{
- if (this->DefaultPlatformName == "Win32") {
+ if (!this->PlatformInGeneratorName) {
this->GeneratorPlatform = p;
return this->cmGlobalVisualStudio7Generator::SetGeneratorPlatform("", mf);
} else {
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 4828c8a..dc8de03 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -32,6 +32,7 @@ cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator(
this->DefaultPlatformName = "Win32";
} else {
this->DefaultPlatformName = platformInGeneratorName;
+ this->PlatformInGeneratorName = true;
}
}
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index 3909a26..d44f5a5 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -178,6 +178,7 @@ protected:
std::string GeneratorPlatform;
std::string DefaultPlatformName;
+ bool PlatformInGeneratorName = false;
private:
virtual std::string GetVSMakeProgram() = 0;