diff options
author | Brad King <brad.king@kitware.com> | 2021-11-03 15:58:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-11-03 19:06:25 (GMT) |
commit | 78782cc7dc9f4efa2e3a19c174dca0129d99af2e (patch) | |
tree | 51f5ca44b4dec6afc63d1e902637dcb60173fff2 /Source | |
parent | 1cf99f66c79e6806aa6774f24918a2a15c385725 (diff) | |
download | CMake-78782cc7dc9f4efa2e3a19c174dca0129d99af2e.zip CMake-78782cc7dc9f4efa2e3a19c174dca0129d99af2e.tar.gz CMake-78782cc7dc9f4efa2e3a19c174dca0129d99af2e.tar.bz2 |
cmGlobalVisualStudio8Generator: Refactor SetGeneratorPlatform
Re-organize the method to make room for additional
`CMAKE_GENERATOR_PLATFORM` processing.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalVisualStudio8Generator.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 092e5b9..439d13e 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -67,12 +67,19 @@ void cmGlobalVisualStudio8Generator::AddPlatformDefinitions(cmMakefile* mf) bool cmGlobalVisualStudio8Generator::SetGeneratorPlatform(std::string const& p, cmMakefile* mf) { - if (!this->PlatformInGeneratorName) { - this->GeneratorPlatform = p; - return this->cmGlobalVisualStudio7Generator::SetGeneratorPlatform("", mf); - } else { + if (this->PlatformInGeneratorName) { + // This is an old-style generator name that contains the platform name. + // No explicit platform specification is supported, so pass it through + // to our base class implementation, which errors on non-empty platforms. return this->cmGlobalVisualStudio7Generator::SetGeneratorPlatform(p, mf); } + + this->GeneratorPlatform = p; + + // The generator name does not contain the platform name, and so supports + // explicit platform specification. We handled that above, so pass an + // empty platform name to our base class implementation so it does not error. + return this->cmGlobalVisualStudio7Generator::SetGeneratorPlatform("", mf); } std::string cmGlobalVisualStudio8Generator::GetGenerateStampList() |