mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-19 02:17:27 +08:00
cmGlobalVisualStudio8Generator: Refactor SetGeneratorPlatform
Re-organize the method to make room for additional `CMAKE_GENERATOR_PLATFORM` processing.
This commit is contained in:
@@ -67,12 +67,19 @@ void cmGlobalVisualStudio8Generator::AddPlatformDefinitions(cmMakefile* mf)
|
|||||||
bool cmGlobalVisualStudio8Generator::SetGeneratorPlatform(std::string const& p,
|
bool cmGlobalVisualStudio8Generator::SetGeneratorPlatform(std::string const& p,
|
||||||
cmMakefile* mf)
|
cmMakefile* mf)
|
||||||
{
|
{
|
||||||
if (!this->PlatformInGeneratorName) {
|
if (this->PlatformInGeneratorName) {
|
||||||
this->GeneratorPlatform = p;
|
// This is an old-style generator name that contains the platform name.
|
||||||
return this->cmGlobalVisualStudio7Generator::SetGeneratorPlatform("", mf);
|
// No explicit platform specification is supported, so pass it through
|
||||||
} else {
|
// to our base class implementation, which errors on non-empty platforms.
|
||||||
return this->cmGlobalVisualStudio7Generator::SetGeneratorPlatform(p, mf);
|
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()
|
std::string cmGlobalVisualStudio8Generator::GetGenerateStampList()
|
||||||
|
Reference in New Issue
Block a user