summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-04-22 11:38:20 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-04-22 11:38:33 (GMT)
commitcb23f2ac8b2484c9bf1e0db78831b3ea8d54766c (patch)
tree95826235038775468ac681b1dfef81afb5a9fc1d /Source
parent8c322f9313e60af28d2deee739a88a683885e484 (diff)
parentdb02be85a0bcccb633b31f087cde96d95fd21e8f (diff)
downloadCMake-cb23f2ac8b2484c9bf1e0db78831b3ea8d54766c.zip
CMake-cb23f2ac8b2484c9bf1e0db78831b3ea8d54766c.tar.gz
CMake-cb23f2ac8b2484c9bf1e0db78831b3ea8d54766c.tar.bz2
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
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx8
-rw-r--r--Source/cmGlobalVisualStudioGenerator.h3
3 files changed, 12 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index d7630e4..c31dbf4 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -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
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 280c986..39c325c 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -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)
{
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index 039191c..cbab329 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -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;
/**