add documentation for all MSVCxxx version variables (#12567)

This commit is contained in:
Rolf Eike Beer 2012-09-09 14:02:59 +02:00
parent eb8b0bea6f
commit f35e35b058
1 changed files with 30 additions and 6 deletions

View File

@ -1,6 +1,8 @@
#include "cmDocumentVariables.h" #include "cmDocumentVariables.h"
#include "cmake.h" #include "cmake.h"
#include <cmsys/ios/sstream>
void cmDocumentVariables::DefineVariables(cmake* cm) void cmDocumentVariables::DefineVariables(cmake* cm)
{ {
// Subsection: variables defined by cmake, that give // Subsection: variables defined by cmake, that give
@ -992,12 +994,33 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
false, false,
"Variables That Describe the System"); "Variables That Describe the System");
cm->DefineProperty int msvc_versions[] = { 60, 70, 71, 80, 90, 100, 110, 0 };
("MSVC80", cmProperty::VARIABLE, for (int i = 0; msvc_versions[i] != 0; i ++)
"True when using Microsoft Visual C 8.0", {
"Set to true when the compiler is version 8.0 of Microsoft Visual C.", const char minor = (char)('0' + (msvc_versions[i] % 10));
false, cmStdString varName = "MSVC";
"Variables That Describe the System"); 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 cm->DefineProperty
("MSVC_IDE", cmProperty::VARIABLE, ("MSVC_IDE", cmProperty::VARIABLE,
@ -1017,6 +1040,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
" 1400 = VS 8.0\n" " 1400 = VS 8.0\n"
" 1500 = VS 9.0\n" " 1500 = VS 9.0\n"
" 1600 = VS 10.0\n" " 1600 = VS 10.0\n"
" 1700 = VS 11.0\n"
"", "",
false, false,
"Variables That Describe the System"); "Variables That Describe the System");