diff options
author | Brad King <brad.king@kitware.com> | 2016-04-28 14:09:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-04-28 14:09:20 (GMT) |
commit | ce82e0a53f4064693c14ce97a5efb3e38efc3fa7 (patch) | |
tree | 247b2aa46caffa67183959851d77c009a36335f8 /Source | |
parent | 6a501b6519850c0dd2bcc687cd8da6fc6c9459d5 (diff) | |
download | CMake-ce82e0a53f4064693c14ce97a5efb3e38efc3fa7.zip CMake-ce82e0a53f4064693c14ce97a5efb3e38efc3fa7.tar.gz CMake-ce82e0a53f4064693c14ce97a5efb3e38efc3fa7.tar.bz2 |
Deprecate Visual Studio 7 .NET 2003 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/cmGlobalVisualStudio71Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index 7b51fdf..dd1f2e4 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -325,5 +325,5 @@ void cmGlobalVisualStudio71Generator ::GetDocumentation(cmDocumentationEntry& entry) { entry.Name = cmGlobalVisualStudio71Generator::GetActualName(); - entry.Brief = "Generates Visual Studio .NET 2003 project files."; + entry.Brief = "Deprecated. Generates Visual Studio .NET 2003 project files."; } diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index c1c8c77..ba498ef 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -335,6 +335,23 @@ void cmGlobalVisualStudio7Generator::Generate() { this->CallVisualStudioMacro(MacroReload); } + + if (this->Version == VS71 && + !this->CMakeInstance->GetIsInTryCompile()) + { + const char* cmakeWarnVS71 = + this->CMakeInstance->GetState()->GetCacheEntryValue("CMAKE_WARN_VS71"); + if (!cmakeWarnVS71 || !cmSystemTools::IsOff(cmakeWarnVS71)) + { + this->CMakeInstance->IssueMessage( + cmake::WARNING, + "The \"Visual Studio 7 .NET 2003\" generator is deprecated " + "and will be removed in a future version of CMake." + "\n" + "Add CMAKE_WARN_VS71=OFF to the cache to disable this warning." + ); + } + } } void cmGlobalVisualStudio7Generator |