diff options
author | Brad King <brad.king@kitware.com> | 2023-02-08 16:49:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-02-08 16:49:27 (GMT) |
commit | d7f440c5dbe787ccf96da490ad813a897c146498 (patch) | |
tree | f6ff1215509899d6d17dbca52eb23cad65a37b32 /Source/cmGlobalVisualStudio7Generator.cxx | |
parent | 507dcaf5639c8a3e0ae4aeb2792b6926861aebd3 (diff) | |
download | CMake-d7f440c5dbe787ccf96da490ad813a897c146498.zip CMake-d7f440c5dbe787ccf96da490ad813a897c146498.tar.gz CMake-d7f440c5dbe787ccf96da490ad813a897c146498.tar.bz2 |
Deprecate Visual Studio 9 2008 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 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index d483135..5de3a55 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -309,6 +309,26 @@ void cmGlobalVisualStudio7Generator::Generate() GetSLNFile(this->LocalGenerators[0].get())); } + if (this->Version == VSVersion::VS9 && + !this->CMakeInstance->GetIsInTryCompile()) { + std::string cmakeWarnVS9; + if (cmValue cached = this->CMakeInstance->GetState()->GetCacheEntryValue( + "CMAKE_WARN_VS9")) { + this->CMakeInstance->MarkCliAsUsed("CMAKE_WARN_VS9"); + cmakeWarnVS9 = *cached; + } else { + cmSystemTools::GetEnv("CMAKE_WARN_VS9", cmakeWarnVS9); + } + if (cmakeWarnVS9.empty() || !cmIsOff(cmakeWarnVS9)) { + this->CMakeInstance->IssueMessage( + MessageType::WARNING, + "The \"Visual Studio 9 2008\" generator is deprecated " + "and will be removed in a future version of CMake." + "\n" + "Add CMAKE_WARN_VS9=OFF to the cache to disable this warning."); + } + } + if (this->Version == VSVersion::VS11 && !this->CMakeInstance->GetIsInTryCompile()) { std::string cmakeWarnVS11; |