summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-04-21 17:41:09 (GMT)
committerBrad King <brad.king@kitware.com>2017-04-21 17:45:45 (GMT)
commit81f9c9e892e6b4ee873361b3750a87760ebe8a2d (patch)
tree1ea0ed8107657eef4362cefa603bf3aab7da615d /Source
parent294cf948dc37799e1980685afbf1fa585ad5b0fb (diff)
downloadCMake-81f9c9e892e6b4ee873361b3750a87760ebe8a2d.zip
CMake-81f9c9e892e6b4ee873361b3750a87760ebe8a2d.tar.gz
CMake-81f9c9e892e6b4ee873361b3750a87760ebe8a2d.tar.bz2
Deprecate Visual Studio 8 2005 generator
Update documentation to mark the generator deprecated. Add a warning at the end of generation plus an option to turn off the warning.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx13
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx2
2 files changed, 14 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 14ec72f..1b75a08 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -293,6 +293,19 @@ void cmGlobalVisualStudio7Generator::Generate()
if (!cmSystemTools::GetErrorOccuredFlag()) {
this->CallVisualStudioMacro(MacroReload);
}
+
+ if (this->Version == VS8 && !this->CMakeInstance->GetIsInTryCompile()) {
+ const char* cmakeWarnVS8 =
+ this->CMakeInstance->GetState()->GetCacheEntryValue("CMAKE_WARN_VS8");
+ if (!cmakeWarnVS8 || !cmSystemTools::IsOff(cmakeWarnVS8)) {
+ this->CMakeInstance->IssueMessage(
+ cmake::WARNING,
+ "The \"Visual Studio 8 2005\" generator is deprecated "
+ "and will be removed in a future version of CMake."
+ "\n"
+ "Add CMAKE_WARN_VS8=OFF to the cache to disable this warning.");
+ }
+ }
}
void cmGlobalVisualStudio7Generator::OutputSLNFile(
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 1fcb5ac..7a42b72 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -54,7 +54,7 @@ public:
void GetDocumentation(cmDocumentationEntry& entry) const CM_OVERRIDE
{
entry.Name = std::string(vs8generatorName) + " [arch]";
- entry.Brief = "Generates Visual Studio 2005 project files. "
+ entry.Brief = "Deprecated. Generates Visual Studio 2005 project files. "
"Optional [arch] can be \"Win64\".";
}