diff options
author | Brad King <brad.king@kitware.com> | 2023-06-24 18:37:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-06-26 16:41:18 (GMT) |
commit | 75b573a628d4296b237601d2a9cb4c0a05903f96 (patch) | |
tree | 78fcbfd433000147384888cccec59876d2c01d1a /Source/cmGlobalVisualStudio7Generator.cxx | |
parent | 61bb728c0c874b85620289fd233bd0deb741a27c (diff) | |
download | CMake-75b573a628d4296b237601d2a9cb4c0a05903f96.zip CMake-75b573a628d4296b237601d2a9cb4c0a05903f96.tar.gz CMake-75b573a628d4296b237601d2a9cb4c0a05903f96.tar.bz2 |
Deprecate Visual Studio 12 2013 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 62c0b5b..203bb09 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -329,6 +329,26 @@ void cmGlobalVisualStudio7Generator::Generate() "Add CMAKE_WARN_VS9=OFF to the cache to disable this warning."); } } + + if (this->Version == VSVersion::VS12 && + !this->CMakeInstance->GetIsInTryCompile()) { + std::string cmakeWarnVS12; + if (cmValue cached = this->CMakeInstance->GetState()->GetCacheEntryValue( + "CMAKE_WARN_VS12")) { + this->CMakeInstance->MarkCliAsUsed("CMAKE_WARN_VS12"); + cmakeWarnVS12 = *cached; + } else { + cmSystemTools::GetEnv("CMAKE_WARN_VS12", cmakeWarnVS12); + } + if (cmakeWarnVS12.empty() || !cmIsOff(cmakeWarnVS12)) { + this->CMakeInstance->IssueMessage( + MessageType::WARNING, + "The \"Visual Studio 12 2013\" generator is deprecated " + "and will be removed in a future version of CMake." + "\n" + "Add CMAKE_WARN_VS12=OFF to the cache to disable this warning."); + } + } } void cmGlobalVisualStudio7Generator::OutputSLNFile( |