diff options
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 7bf3c3a..ff76762 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -303,6 +303,26 @@ void cmGlobalVisualStudio7Generator::Generate() this->CallVisualStudioMacro(MacroReload, GetSLNFile(this->LocalGenerators[0].get())); } + + if (this->Version == VSVersion::VS11 && + !this->CMakeInstance->GetIsInTryCompile()) { + std::string cmakeWarnVS11; + if (cmValue cached = this->CMakeInstance->GetState()->GetCacheEntryValue( + "CMAKE_WARN_VS11")) { + this->CMakeInstance->MarkCliAsUsed("CMAKE_WARN_VS11"); + cmakeWarnVS11 = *cached; + } else { + cmSystemTools::GetEnv("CMAKE_WARN_VS11", cmakeWarnVS11); + } + if (cmakeWarnVS11.empty() || !cmIsOff(cmakeWarnVS11)) { + this->CMakeInstance->IssueMessage( + MessageType::WARNING, + "The \"Visual Studio 11 2012\" generator is deprecated " + "and will be removed in a future version of CMake." + "\n" + "Add CMAKE_WARN_VS11=OFF to the cache to disable this warning."); + } + } } void cmGlobalVisualStudio7Generator::OutputSLNFile( |