summaryrefslogtreecommitdiff
path: root/Source/cmGlobalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-02-08 11:49:27 -0500
committerBrad King <brad.king@kitware.com>2023-02-08 11:49:27 -0500
commitd7f440c5dbe787ccf96da490ad813a897c146498 (patch)
treef6ff1215509899d6d17dbca52eb23cad65a37b32 /Source/cmGlobalVisualStudio7Generator.cxx
parent507dcaf5639c8a3e0ae4aeb2792b6926861aebd3 (diff)
downloadcmake-d7f440c5dbe787ccf96da490ad813a897c146498.tar.gz
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.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index d483135342..5de3a55939 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;