diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2012-09-09 12:02:59 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2012-09-18 06:45:01 (GMT) |
commit | f35e35b058ab89f70923e5ad6d16f6299147fdba (patch) | |
tree | a80e037837d92859178db37129c4ea53878459d6 /Source/cmDocumentVariables.cxx | |
parent | eb8b0bea6f5eb7aa4fa2de6a54fab6f70c1bcf6e (diff) | |
download | CMake-f35e35b058ab89f70923e5ad6d16f6299147fdba.zip CMake-f35e35b058ab89f70923e5ad6d16f6299147fdba.tar.gz CMake-f35e35b058ab89f70923e5ad6d16f6299147fdba.tar.bz2 |
add documentation for all MSVCxxx version variables (#12567)
Diffstat (limited to 'Source/cmDocumentVariables.cxx')
-rw-r--r-- | Source/cmDocumentVariables.cxx | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx index 94cd5c2..5e7e081 100644 --- a/Source/cmDocumentVariables.cxx +++ b/Source/cmDocumentVariables.cxx @@ -1,6 +1,8 @@ #include "cmDocumentVariables.h" #include "cmake.h" +#include <cmsys/ios/sstream> + void cmDocumentVariables::DefineVariables(cmake* cm) { // Subsection: variables defined by cmake, that give @@ -992,12 +994,33 @@ void cmDocumentVariables::DefineVariables(cmake* cm) false, "Variables That Describe the System"); - cm->DefineProperty - ("MSVC80", cmProperty::VARIABLE, - "True when using Microsoft Visual C 8.0", - "Set to true when the compiler is version 8.0 of Microsoft Visual C.", - false, - "Variables That Describe the System"); + int msvc_versions[] = { 60, 70, 71, 80, 90, 100, 110, 0 }; + for (int i = 0; msvc_versions[i] != 0; i ++) + { + const char minor = (char)('0' + (msvc_versions[i] % 10)); + cmStdString varName = "MSVC"; + cmsys_ios::ostringstream majorStr; + + majorStr << (msvc_versions[i] / 10); + varName += majorStr.str(); + if (msvc_versions[i] < 100) + { + varName += minor; + } + + cmStdString verString = majorStr.str() + "." + minor; + + cmStdString shortStr = "True when using Microsoft Visual C " + verString; + cmStdString fullStr = "Set to true when the compiler is version " + + verString + + " of Microsoft Visual C."; + cm->DefineProperty + (varName.c_str(), cmProperty::VARIABLE, + shortStr.c_str(), + fullStr.c_str(), + false, + "Variables That Describe the System"); + } cm->DefineProperty ("MSVC_IDE", cmProperty::VARIABLE, @@ -1017,6 +1040,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) " 1400 = VS 8.0\n" " 1500 = VS 9.0\n" " 1600 = VS 10.0\n" + " 1700 = VS 11.0\n" "", false, "Variables That Describe the System"); |