Merge topic 'vs-default-platform'

db02be85a0 VS: Provide the default platform name to project code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3246
This commit is contained in:
Brad King
2019-04-22 11:38:20 +00:00
committed by Kitware Robot
10 changed files with 40 additions and 3 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ void cmGlobalVisualStudio7Generator::EnableLanguage(
}
// Create list of configurations requested by user's cache, if any.
this->cmGlobalGenerator::EnableLanguage(lang, mf, optional);
this->cmGlobalVisualStudioGenerator::EnableLanguage(lang, mf, optional);
// if this environment variable is set, then copy it to
// a static cache entry. It will be used by
+8
View File
@@ -53,6 +53,14 @@ void cmGlobalVisualStudioGenerator::SetVersion(VSVersion v)
this->Version = v;
}
void cmGlobalVisualStudioGenerator::EnableLanguage(
std::vector<std::string> const& lang, cmMakefile* mf, bool optional)
{
mf->AddDefinition("CMAKE_VS_PLATFORM_NAME_DEFAULT",
this->DefaultPlatformName.c_str());
this->cmGlobalGenerator::EnableLanguage(lang, mf, optional);
}
bool cmGlobalVisualStudioGenerator::SetGeneratorPlatform(std::string const& p,
cmMakefile* mf)
{
+3
View File
@@ -50,6 +50,9 @@ public:
/** Is the installed VS an Express edition? */
bool IsExpressEdition() const { return this->ExpressEdition; }
void EnableLanguage(std::vector<std::string> const& languages, cmMakefile*,
bool optional) override;
bool SetGeneratorPlatform(std::string const& p, cmMakefile* mf) override;
/**