diff options
author | Brad King <brad.king@kitware.com> | 2021-07-29 15:49:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-07-29 18:15:01 (GMT) |
commit | 22dab6eb96438b8563079c44d00c520df5b04a6e (patch) | |
tree | 89da2b615d0fba53f87c73c264a8a3f6eac3021f /Source/cmGlobalVisualStudio7Generator.cxx | |
parent | 9251205512c49bbdda5d82f48126dc5b8e79d70f (diff) | |
download | CMake-22dab6eb96438b8563079c44d00c520df5b04a6e.zip CMake-22dab6eb96438b8563079c44d00c520df5b04a6e.tar.gz CMake-22dab6eb96438b8563079c44d00c520df5b04a6e.tar.bz2 |
Deprecate Visual Studio 10 2010 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/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index f8aa172..34dba1e 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -296,6 +296,25 @@ void cmGlobalVisualStudio7Generator::Generate() this->CallVisualStudioMacro(MacroReload, GetSLNFile(this->LocalGenerators[0].get())); } + + if (this->Version == VS10 && !this->CMakeInstance->GetIsInTryCompile()) { + std::string cmakeWarnVS10; + if (cmProp cached = this->CMakeInstance->GetState()->GetCacheEntryValue( + "CMAKE_WARN_VS10")) { + this->CMakeInstance->MarkCliAsUsed("CMAKE_WARN_VS10"); + cmakeWarnVS10 = *cached; + } else { + cmSystemTools::GetEnv("CMAKE_WARN_VS10", cmakeWarnVS10); + } + if (cmakeWarnVS10.empty() || !cmIsOff(cmakeWarnVS10)) { + this->CMakeInstance->IssueMessage( + MessageType::WARNING, + "The \"Visual Studio 10 2010\" generator is deprecated " + "and will be removed in a future version of CMake." + "\n" + "Add CMAKE_WARN_VS10=OFF to the cache to disable this warning."); + } + } } void cmGlobalVisualStudio7Generator::OutputSLNFile( |