BUG: revert doc changes since VS7 cannot compile them, will implement them in a different manner

This commit is contained in:
Ken Martin 2007-10-09 14:35:25 -04:00
parent 18ce24c748
commit 35e13b11f3
15 changed files with 212 additions and 215 deletions

View File

@ -33,30 +33,30 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationName[] = static const cmDocumentationEntry cmDocumentationName[] =
{ {
{"", {0,
" cpack - Packaging driver provided by CMake.", ""}, " cpack - Packaging driver provided by CMake.", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationUsage[] = static const cmDocumentationEntry cmDocumentationUsage[] =
{ {
{"", {0,
" cpack -G <generator> [options]", " cpack -G <generator> [options]",
""}, 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationDescription[] = static const cmDocumentationEntry cmDocumentationDescription[] =
{ {
{"", {0,
"The \"cpack\" executable is the CMake packaging program. " "The \"cpack\" executable is the CMake packaging program. "
"CMake-generated build trees created for projects that use " "CMake-generated build trees created for projects that use "
"the INSTALL_* commands have packaging support. " "the INSTALL_* commands have packaging support. "
"This program will generate the package.", ""}, "This program will generate the package.", 0},
CMAKE_STANDARD_INTRODUCTION, CMAKE_STANDARD_INTRODUCTION,
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -75,15 +75,15 @@ static const cmDocumentationEntry cmDocumentationOptions[] =
{"--config <config file>", "Specify the config file.", {"--config <config file>", "Specify the config file.",
"Specify the config file to use to create the package. By default " "Specify the config file to use to create the package. By default "
"CPackConfig.cmake in the current directory will be used." }, "CPackConfig.cmake in the current directory will be used." },
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationSeeAlso[] = static const cmDocumentationEntry cmDocumentationSeeAlso[] =
{ {
{"", "cmake", ""}, {0, "cmake", 0},
{"", "ccmake", ""}, {0, "ccmake", 0},
{"", "", ""} {0, 0, 0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -464,7 +464,7 @@ int main (int argc, char *argv[])
e.full = ""; e.full = "";
v.push_back(e); v.push_back(e);
} }
cmDocumentationEntry empty = {"","",""}; cmDocumentationEntry empty = {0,0,0};
v.push_back(empty); v.push_back(empty);
doc.SetGeneratorsSection(&v[0]); doc.SetGeneratorsSection(&v[0]);

View File

@ -12,31 +12,31 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationName[] = static const cmDocumentationEntry cmDocumentationName[] =
{ {
{"", {0,
" CMakeSetup - CMake Windows GUI.", ""}, " CMakeSetup - CMake Windows GUI.", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationUsage[] = static const cmDocumentationEntry cmDocumentationUsage[] =
{ {
{"", {0,
" CMakeSetup [options]\n" " CMakeSetup [options]\n"
" CMakeSetup [options] <path-to-source>\n" " CMakeSetup [options] <path-to-source>\n"
" CMakeSetup [options] <path-to-existing-build>", ""}, " CMakeSetup [options] <path-to-existing-build>", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationDescription[] = static const cmDocumentationEntry cmDocumentationDescription[] =
{ {
{"", {0,
"The \"CMakeSetup\" executable is the CMake Windows GUI. Project " "The \"CMakeSetup\" executable is the CMake Windows GUI. Project "
"configuration settings may be specified interactively. " "configuration settings may be specified interactively. "
"Brief instructions are provided at the bottom of the " "Brief instructions are provided at the bottom of the "
"window when the program is running.", ""}, "window when the program is running.", 0},
CMAKE_STANDARD_INTRODUCTION, CMAKE_STANDARD_INTRODUCTION,
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -47,7 +47,7 @@ static const cmDocumentationEntry cmDocumentationOptions[] =
"advanced. Most users will not need to change the advanced options. " "advanced. Most users will not need to change the advanced options. "
"The CMakeSetup GUI contains a checkbox to enable/disable display of " "The CMakeSetup GUI contains a checkbox to enable/disable display of "
"advanced options. This command line flag changes its default setting."}, "advanced options. This command line flag changes its default setting."},
{"","",""} {0,0,0}
}; };
#ifdef _DEBUG #ifdef _DEBUG

View File

@ -21,7 +21,7 @@
#include <cmsys/Directory.hxx> #include <cmsys/Directory.hxx>
const cmDocumentationEntry cmDocumentation::cmSection::EmptySection ={"","",""}; const cmDocumentationEntry cmDocumentation::cmSection::EmptySection ={0,0,0};
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationStandardOptions[] = static const cmDocumentationEntry cmDocumentationStandardOptions[] =
@ -43,165 +43,165 @@ static const cmDocumentationEntry cmDocumentationStandardOptions[] =
"If a file is specified, the help is written into it."}, "If a file is specified, the help is written into it."},
{"--version [file]", "Show program name/version banner and exit.", {"--version [file]", "Show program name/version banner and exit.",
"If a file is specified, the version is written into it."}, "If a file is specified, the version is written into it."},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmModulesDocumentationDescription[] = static const cmDocumentationEntry cmModulesDocumentationDescription[] =
{ {
{"", {0,
" CMake Modules - Modules coming with CMake, the Cross-Platform Makefile " " CMake Modules - Modules coming with CMake, the Cross-Platform Makefile "
"Generator.", ""}, "Generator.", 0},
// CMAKE_DOCUMENTATION_OVERVIEW, // CMAKE_DOCUMENTATION_OVERVIEW,
{"", {0,
"This is the documentation for the modules and scripts coming with CMake. " "This is the documentation for the modules and scripts coming with CMake. "
"Using these modules you can check the computer system for " "Using these modules you can check the computer system for "
"installed software packages, features of the compiler and the " "installed software packages, features of the compiler and the "
"existance of headers to name just a few.", ""}, "existance of headers to name just a few.", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmCustomModulesDocumentationDescription[] = static const cmDocumentationEntry cmCustomModulesDocumentationDescription[] =
{ {
{"", {0,
" Custom CMake Modules - Additional Modules for CMake.", ""}, " Custom CMake Modules - Additional Modules for CMake.", 0},
// CMAKE_DOCUMENTATION_OVERVIEW, // CMAKE_DOCUMENTATION_OVERVIEW,
{"", {0,
"This is the documentation for additional modules and scripts for CMake. " "This is the documentation for additional modules and scripts for CMake. "
"Using these modules you can check the computer system for " "Using these modules you can check the computer system for "
"installed software packages, features of the compiler and the " "installed software packages, features of the compiler and the "
"existance of headers to name just a few.", ""}, "existance of headers to name just a few.", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmPropertiesDocumentationDescription[] = static const cmDocumentationEntry cmPropertiesDocumentationDescription[] =
{ {
{"", {0,
" CMake Properties - Properties supported by CMake, " " CMake Properties - Properties supported by CMake, "
"the Cross-Platform Makefile Generator.", ""}, "the Cross-Platform Makefile Generator.", 0},
// CMAKE_DOCUMENTATION_OVERVIEW, // CMAKE_DOCUMENTATION_OVERVIEW,
{"", {0,
"This is the documentation for the properties supported by CMake. " "This is the documentation for the properties supported by CMake. "
"Properties can have different scopes. They can either be assigned to a " "Properties can have different scopes. They can either be assigned to a "
"source file, a directory, a target or globally to CMake. By modifying the " "source file, a directory, a target or globally to CMake. By modifying the "
"values of properties the behaviour of the buildsystem can be customized.", "values of properties the behaviour of the buildsystem can be customized.",
""}, 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmCompatCommandsDocumentationDescription[] = static const cmDocumentationEntry cmCompatCommandsDocumentationDescription[] =
{ {
{"", {0,
" CMake Compatibility Listfile Commands - " " CMake Compatibility Listfile Commands - "
"Obsolete commands supported by CMake for compatibility.", ""}, "Obsolete commands supported by CMake for compatibility.", 0},
// CMAKE_DOCUMENTATION_OVERVIEW, // CMAKE_DOCUMENTATION_OVERVIEW,
{"", {0,
"This is the documentation for now obsolete listfile commands from previous " "This is the documentation for now obsolete listfile commands from previous "
"CMake versions, which are still supported for compatibility reasons. You " "CMake versions, which are still supported for compatibility reasons. You "
"should instead use the newer, faster and shinier new commands. ;-)", ""}, "should instead use the newer, faster and shinier new commands. ;-)", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationCommandsHeader[] = static const cmDocumentationEntry cmDocumentationCommandsHeader[] =
{ {
{"", {0,
"The following commands are available in CMakeLists.txt code:", ""}, "The following commands are available in CMakeLists.txt code:", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationGlobalPropertiesHeader[] = static const cmDocumentationEntry cmDocumentationGlobalPropertiesHeader[] =
{ {
{"", {0,
"The following global properties are available in CMakeLists.txt code:", ""}, "The following global properties are available in CMakeLists.txt code:", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationDirectoryPropertiesHeader[] = static const cmDocumentationEntry cmDocumentationDirectoryPropertiesHeader[] =
{ {
{"" {0
,"The following directory properties are available in CMakeLists.txt code:" ,"The following directory properties are available in CMakeLists.txt code:"
,""}, ,0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationTargetPropertiesHeader[] = static const cmDocumentationEntry cmDocumentationTargetPropertiesHeader[] =
{ {
{"", {0,
"The following target properties are available in CMakeLists.txt code:", ""}, "The following target properties are available in CMakeLists.txt code:", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationTestPropertiesHeader[] = static const cmDocumentationEntry cmDocumentationTestPropertiesHeader[] =
{ {
{"" {0
,"The following properties for tests are available in CMakeLists.txt code:" ,"The following properties for tests are available in CMakeLists.txt code:"
,""}, ,0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationSourceFilePropertiesHeader[] = static const cmDocumentationEntry cmDocumentationSourceFilePropertiesHeader[] =
{ {
{"" {0
,"The following source file properties are available in CMakeLists.txt code:" ,"The following source file properties are available in CMakeLists.txt code:"
, ""}, , 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationVariablePropertiesHeader[] = static const cmDocumentationEntry cmDocumentationVariablePropertiesHeader[] =
{ {
{"", "The following variables are available in CMakeLists.txt code:", ""}, {0, "The following variables are available in CMakeLists.txt code:", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry static const cmDocumentationEntry
cmDocumentationCachedVariablePropertiesHeader[] = cmDocumentationCachedVariablePropertiesHeader[] =
{ {
{"","The following cache variables are available in CMakeLists.txt code:", ""}, {0,"The following cache variables are available in CMakeLists.txt code:", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationModulesHeader[] = static const cmDocumentationEntry cmDocumentationModulesHeader[] =
{ {
{"", {0,
"The following modules are provided with CMake. " "The following modules are provided with CMake. "
"They can be used with INCLUDE(ModuleName).", ""}, "They can be used with INCLUDE(ModuleName).", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationCustomModulesHeader[] = static const cmDocumentationEntry cmDocumentationCustomModulesHeader[] =
{ {
{"", {0,
"The following modules are also available for CMake. " "The following modules are also available for CMake. "
"They can be used with INCLUDE(ModuleName).", ""}, "They can be used with INCLUDE(ModuleName).", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationGeneratorsHeader[] = static const cmDocumentationEntry cmDocumentationGeneratorsHeader[] =
{ {
{"", {0,
"The following generators are available on this platform:", ""}, "The following generators are available on this platform:", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationStandardSeeAlso[] = static const cmDocumentationEntry cmDocumentationStandardSeeAlso[] =
{ {
{"", {0,
"The following resources are available to get help using CMake:", ""}, "The following resources are available to get help using CMake:", 0},
{"Home Page", {"Home Page",
"http://www.cmake.org", "http://www.cmake.org",
"The primary starting point for learning about CMake."}, "The primary starting point for learning about CMake."},
@ -218,51 +218,51 @@ static const cmDocumentationEntry cmDocumentationStandardSeeAlso[] =
"The list is member-post-only but one may sign up on the CMake web page. " "The list is member-post-only but one may sign up on the CMake web page. "
"Please first read the full documentation at " "Please first read the full documentation at "
"http://www.cmake.org before posting questions to the list."}, "http://www.cmake.org before posting questions to the list."},
{"", {0,
"Summary of helpful links:\n" "Summary of helpful links:\n"
" Home: http://www.cmake.org\n" " Home: http://www.cmake.org\n"
" Docs: http://www.cmake.org/HTML/Documentation.html\n" " Docs: http://www.cmake.org/HTML/Documentation.html\n"
" Mail: http://www.cmake.org/HTML/MailingLists.html\n" " Mail: http://www.cmake.org/HTML/MailingLists.html\n"
" FAQ: http://www.cmake.org/Wiki/CMake_FAQ\n" " FAQ: http://www.cmake.org/Wiki/CMake_FAQ\n"
, ""}, , 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
const cmDocumentationEntry cmDocumentationAuthor[] = const cmDocumentationEntry cmDocumentationAuthor[] =
{ {
{"", {0,
"This manual page was generated by the \"--help-man\" option.", ""}, "This manual page was generated by the \"--help-man\" option.", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
const cmDocumentationEntry cmDocumentationCopyright[] = const cmDocumentationEntry cmDocumentationCopyright[] =
{ {
{"", {0,
"Copyright (c) 2002 Kitware, Inc., Insight Consortium. " "Copyright (c) 2002 Kitware, Inc., Insight Consortium. "
"All rights reserved.", ""}, "All rights reserved.", 0},
{"", {0,
"Redistribution and use in source and binary forms, with or without " "Redistribution and use in source and binary forms, with or without "
"modification, are permitted provided that the following conditions are " "modification, are permitted provided that the following conditions are "
"met:", ""}, "met:", 0},
{"", {"",
"Redistributions of source code must retain the above copyright notice, " "Redistributions of source code must retain the above copyright notice, "
"this list of conditions and the following disclaimer.", ""}, "this list of conditions and the following disclaimer.", 0},
{"", {"",
"Redistributions in binary form must reproduce the above copyright " "Redistributions in binary form must reproduce the above copyright "
"notice, this list of conditions and the following disclaimer in the " "notice, this list of conditions and the following disclaimer in the "
"documentation and/or other materials provided with the distribution.", "documentation and/or other materials provided with the distribution.",
""}, 0},
{"", {"",
"The names of Kitware, Inc., the Insight Consortium, or the names of " "The names of Kitware, Inc., the Insight Consortium, or the names of "
"any consortium members, or of any contributors, may not be used to " "any consortium members, or of any contributors, may not be used to "
"endorse or promote products derived from this software without " "endorse or promote products derived from this software without "
"specific prior written permission.", ""}, "specific prior written permission.", 0},
{"", {"",
"Modified source versions must be plainly marked as such, and must " "Modified source versions must be plainly marked as such, and must "
"not be misrepresented as being the original software.", ""}, "not be misrepresented as being the original software.", 0},
{"", {0,
"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS " "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "
"``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT " "``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "
"LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR " "LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR "
@ -273,8 +273,8 @@ const cmDocumentationEntry cmDocumentationCopyright[] =
"PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF " "PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF "
"LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING " "LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING "
"NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS " "NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS "
"SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", ""}, "SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", 0},
{"", "", ""} {0, 0, 0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -332,18 +332,18 @@ cmDocumentation::~cmDocumentation()
bool cmDocumentation::PrintCopyright(std::ostream& os) bool cmDocumentation::PrintCopyright(std::ostream& os)
{ {
for(const cmDocumentationEntry* op = cmDocumentationCopyright; for(const cmDocumentationEntry* op = cmDocumentationCopyright;
op->brief.size(); ++op) op->brief; ++op)
{ {
if(op->name.size()) if(op->name)
{ {
os << " * "; os << " * ";
this->TextFormatter.SetIndent(" "); this->TextFormatter.SetIndent(" ");
this->TextFormatter.PrintColumn(os, op->brief.c_str()); this->TextFormatter.PrintColumn(os, op->brief);
} }
else else
{ {
this->TextFormatter.SetIndent(""); this->TextFormatter.SetIndent("");
this->TextFormatter.PrintColumn(os, op->brief.c_str()); this->TextFormatter.PrintColumn(os, op->brief);
} }
os << "\n"; os << "\n";
} }
@ -441,7 +441,7 @@ bool cmDocumentation::CreateModulesSection()
{ {
this->ModulesSection.Append(cmDocumentationModulesHeader[0]); this->ModulesSection.Append(cmDocumentationModulesHeader[0]);
this->CreateModuleDocsForDir(dir, this->ModulesSection); this->CreateModuleDocsForDir(dir, this->ModulesSection);
cmDocumentationEntry e = { "", "", "" }; cmDocumentationEntry e = { 0, 0, 0 };
this->ModulesSection.Append(e); this->ModulesSection.Append(e);
} }
return true; return true;
@ -475,7 +475,7 @@ bool cmDocumentation::CreateCustomModulesSection()
if(sectionHasHeader) if(sectionHasHeader)
{ {
cmDocumentationEntry e = { "", "", "" }; cmDocumentationEntry e = { 0, 0, 0 };
this->CustomModulesSection.Append(e); this->CustomModulesSection.Append(e);
} }
return true; return true;
@ -927,20 +927,20 @@ void cmDocumentation::SetSeeAlsoList(const cmDocumentationEntry* also)
{ {
this->SeeAlsoSection.Clear(); this->SeeAlsoSection.Clear();
this->SeeAlsoString = ".B "; this->SeeAlsoString = ".B ";
for(const cmDocumentationEntry* i = also; i->brief.size(); ++i) for(const cmDocumentationEntry* i = also; i->brief; ++i)
{ {
this->SeeAlsoString += i->brief; this->SeeAlsoString += i->brief;
this->SeeAlsoString += (i+1)->brief.size() ? "(1), ":"(1)"; this->SeeAlsoString += (i+1)->brief? "(1), ":"(1)";
} }
cmDocumentationEntry e = {"", "", ""}; cmDocumentationEntry e = {0, 0, 0};
e.brief = this->SeeAlsoString.c_str(); e.brief = this->SeeAlsoString.c_str();
this->SeeAlsoSection.Append(e); this->SeeAlsoSection.Append(e);
for(const cmDocumentationEntry* i = cmDocumentationStandardSeeAlso; for(const cmDocumentationEntry* i = cmDocumentationStandardSeeAlso;
i->brief.size(); ++i) i->brief; ++i)
{ {
this->SeeAlsoSection.Append(*i); this->SeeAlsoSection.Append(*i);
} }
e.brief = ""; e.brief = 0;
this->SeeAlsoSection.Append(e); this->SeeAlsoSection.Append(e);
} }
@ -958,9 +958,9 @@ bool cmDocumentation::PrintDocumentationSingle(std::ostream& os)
return false; return false;
} }
for(const cmDocumentationEntry* entry = this->CommandsSection.GetEntries(); for(const cmDocumentationEntry* entry = this->CommandsSection.GetEntries();
entry->brief.size(); ++entry) entry->brief; ++entry)
{ {
if(entry->name.size() && this->CurrentArgument == entry->name) if(entry->name && this->CurrentArgument == entry->name)
{ {
this->PrintDocumentationCommand(os, entry); this->PrintDocumentationCommand(os, entry);
return true; return true;
@ -968,10 +968,10 @@ bool cmDocumentation::PrintDocumentationSingle(std::ostream& os)
} }
for(const cmDocumentationEntry* for(const cmDocumentationEntry*
entry = this->CompatCommandsSection.GetEntries(); entry = this->CompatCommandsSection.GetEntries();
entry->brief.size(); entry->brief;
++entry) ++entry)
{ {
if(entry->name.size() && this->CurrentArgument == entry->name) if(entry->name && this->CurrentArgument == entry->name)
{ {
this->PrintDocumentationCommand(os, entry); this->PrintDocumentationCommand(os, entry);
return true; return true;
@ -1061,10 +1061,9 @@ bool cmDocumentation::PrintDocumentationSingleProperty(std::ostream& os)
++sectionIt) ++sectionIt)
{ {
for(const cmDocumentationEntry* for(const cmDocumentationEntry*
entry = sectionIt->second->GetEntries(); entry->brief.size(); entry = sectionIt->second->GetEntries(); entry->brief; ++entry)
++entry)
{ {
if(entry->name.size() && this->CurrentArgument == entry->name) if(entry->name && this->CurrentArgument == entry->name)
{ {
this->PrintDocumentationCommand(os, entry); this->PrintDocumentationCommand(os, entry);
return true; return true;
@ -1087,9 +1086,9 @@ bool cmDocumentation::PrintDocumentationList(std::ostream& os)
return false; return false;
} }
for(const cmDocumentationEntry* entry = this->CommandsSection.GetEntries(); for(const cmDocumentationEntry* entry = this->CommandsSection.GetEntries();
entry->brief.size(); ++entry) entry->brief; ++entry)
{ {
if(entry->name.size()) if(entry->name)
{ {
os << entry->name << std::endl; os << entry->name << std::endl;
} }
@ -1097,10 +1096,10 @@ bool cmDocumentation::PrintDocumentationList(std::ostream& os)
os << "\nCompatibility commands:" << std::endl; os << "\nCompatibility commands:" << std::endl;
for(const cmDocumentationEntry* for(const cmDocumentationEntry*
entry = this->CompatCommandsSection.GetEntries(); entry = this->CompatCommandsSection.GetEntries();
entry->brief.size(); entry->brief;
++entry) ++entry)
{ {
if(entry->name.size()) if(entry->name)
{ {
os << entry->name << std::endl; os << entry->name << std::endl;
} }
@ -1118,10 +1117,10 @@ bool cmDocumentation::PrintPropertyList(std::ostream& os)
} }
for(const cmDocumentationEntry* for(const cmDocumentationEntry*
entry = this->GlobalPropertiesSection.GetEntries(); entry = this->GlobalPropertiesSection.GetEntries();
entry->brief.size(); entry->brief;
++entry) ++entry)
{ {
if(entry->name.size()) if(entry->name)
{ {
os << entry->name << std::endl; os << entry->name << std::endl;
} }
@ -1133,10 +1132,9 @@ bool cmDocumentation::PrintPropertyList(std::ostream& os)
++sectionIt) ++sectionIt)
{ {
for(const cmDocumentationEntry* for(const cmDocumentationEntry*
entry = sectionIt->second->GetEntries(); entry = sectionIt->second->GetEntries(); entry->brief; ++entry)
entry->brief.size(); ++entry)
{ {
if(entry->name.size()) if(entry->name)
{ {
os << entry->name << std::endl; os << entry->name << std::endl;
} }
@ -1157,9 +1155,9 @@ bool cmDocumentation::PrintModuleList(std::ostream& os)
return false; return false;
} }
for(const cmDocumentationEntry* entry = this->ModulesSection.GetEntries(); for(const cmDocumentationEntry* entry = this->ModulesSection.GetEntries();
entry->brief.size(); ++entry) entry->brief; ++entry)
{ {
if(entry->name.size()) if(entry->name)
{ {
os << entry->name << std::endl; os << entry->name << std::endl;
} }
@ -1169,10 +1167,9 @@ bool cmDocumentation::PrintModuleList(std::ostream& os)
{ {
os << "\nCUSTOM MODULES\n" << std::endl; os << "\nCUSTOM MODULES\n" << std::endl;
for(const cmDocumentationEntry* for(const cmDocumentationEntry*
entry = this->CustomModulesSection.GetEntries(); entry = this->CustomModulesSection.GetEntries(); entry->brief; ++entry)
entry->brief.size(); ++entry)
{ {
if(entry->name.size()) if(entry->name)
{ {
os << entry->name << std::endl; os << entry->name << std::endl;
} }
@ -1256,7 +1253,7 @@ void cmDocumentation::PrintDocumentationCommand(std::ostream& os,
cmDocumentationEntry singleCommandSection[3] = cmDocumentationEntry singleCommandSection[3] =
{ {
{entry->name, entry->brief, entry->full}, {entry->name, entry->brief, entry->full},
{"","",""} {0,0,0}
}; };
this->ClearSections(); this->ClearSections();
this->AddSection(0, &singleCommandSection[0]); this->AddSection(0, &singleCommandSection[0]);
@ -1410,26 +1407,26 @@ void cmDocumentation::cmSection::Set(const cmDocumentationEntry* header,
this->Entries.erase(this->Entries.begin(), this->Entries.end()); this->Entries.erase(this->Entries.begin(), this->Entries.end());
if(header) if(header)
{ {
for(const cmDocumentationEntry* op = header; op->brief.size(); ++op) for(const cmDocumentationEntry* op = header; op->brief; ++op)
{ {
this->Entries.push_back(*op); this->Entries.push_back(*op);
} }
} }
if(section) if(section)
{ {
for(const cmDocumentationEntry* op = section; op->brief.size(); ++op) for(const cmDocumentationEntry* op = section; op->brief; ++op)
{ {
this->Entries.push_back(*op); this->Entries.push_back(*op);
} }
} }
if(footer) if(footer)
{ {
for(const cmDocumentationEntry* op = footer; op->brief.size(); ++op) for(const cmDocumentationEntry* op = footer; op->brief; ++op)
{ {
this->Entries.push_back(*op); this->Entries.push_back(*op);
} }
} }
cmDocumentationEntry empty = {"","",""}; cmDocumentationEntry empty = {0,0,0};
this->Entries.push_back(empty); this->Entries.push_back(empty);
} }

View File

@ -33,13 +33,13 @@ static void cmDocumentationPrintHTMLChar(std::ostream& os, char c)
// Use an escape sequence if necessary. // Use an escape sequence if necessary.
static cmDocumentationEntry escapes[] = static cmDocumentationEntry escapes[] =
{ {
{"<", "&lt;", ""}, {"<", "&lt;", 0},
{">", "&gt;", ""}, {">", "&gt;", 0},
{"&", "&amp;", ""}, {"&", "&amp;", 0},
{"\n", "<br>", ""}, {"\n", "<br>", 0},
{"","",""} {0,0,0}
}; };
for(const cmDocumentationEntry* op = escapes; op->name.size(); ++op) for(const cmDocumentationEntry* op = escapes; op->name; ++op)
{ {
if(op->name[0] == c) if(op->name[0] == c)
{ {
@ -97,25 +97,25 @@ void cmDocumentationFormatterHTML::PrintSection(std::ostream& os,
os << "<h2>" << name << "</h2>\n"; os << "<h2>" << name << "</h2>\n";
} }
if(!section) { return; } if(!section) { return; }
for(const cmDocumentationEntry* op = section; op->brief.size();) for(const cmDocumentationEntry* op = section; op->brief;)
{ {
if(op->name.size()) if(op->name)
{ {
os << "<ul>\n"; os << "<ul>\n";
for(;op->name.size();++op) for(;op->name;++op)
{ {
os << " <li>\n"; os << " <li>\n";
if(op->name[0]) if(op->name[0])
{ {
os << " <b><code>"; os << " <b><code>";
this->PrintHTMLEscapes(os, op->name.c_str()); this->PrintHTMLEscapes(os, op->name);
os << "</code></b>: "; os << "</code></b>: ";
} }
this->PrintHTMLEscapes(os, op->brief.c_str()); this->PrintHTMLEscapes(os, op->brief);
if(op->full.size()) if(op->full)
{ {
os << "<br>\n "; os << "<br>\n ";
this->PrintFormatted(os, op->full.c_str()); this->PrintFormatted(os, op->full);
} }
os << "\n"; os << "\n";
os << " </li>\n"; os << " </li>\n";
@ -124,7 +124,7 @@ void cmDocumentationFormatterHTML::PrintSection(std::ostream& os,
} }
else else
{ {
this->PrintFormatted(os, op->brief.c_str()); this->PrintFormatted(os, op->brief);
os << "\n"; os << "\n";
++op; ++op;
} }

View File

@ -35,19 +35,19 @@ void cmDocumentationFormatterMan::PrintSection(std::ostream& os,
os << ".SH " << name << "\n"; os << ".SH " << name << "\n";
} }
if(!section) { return; } if(!section) { return; }
for(const cmDocumentationEntry* op = section; op->brief.size(); ++op) for(const cmDocumentationEntry* op = section; op->brief; ++op)
{ {
if(op->name.size()) if(op->name)
{ {
os << ".TP\n" os << ".TP\n"
<< ".B " << (op->name[0]?op->name:"*") << "\n"; << ".B " << (op->name[0]?op->name:"*") << "\n";
this->PrintFormatted(os, op->brief.c_str()); this->PrintFormatted(os, op->brief);
this->PrintFormatted(os, op->full.c_str()); this->PrintFormatted(os, op->full);
} }
else else
{ {
os << ".PP\n"; os << ".PP\n";
this->PrintFormatted(os, op->brief.c_str()); this->PrintFormatted(os, op->brief);
} }
} }
} }

View File

@ -36,26 +36,26 @@ void cmDocumentationFormatterText::PrintSection(std::ostream& os,
os << name << "\n\n"; os << name << "\n\n";
} }
if(!section) { return; } if(!section) { return; }
for(const cmDocumentationEntry* op = section; op->brief.size(); ++op) for(const cmDocumentationEntry* op = section; op->brief; ++op)
{ {
if(op->name.size()) if(op->name)
{ {
if(op->name[0]) if(op->name[0])
{ {
os << " " << op->name << "\n"; os << " " << op->name << "\n";
} }
this->TextIndent = " "; this->TextIndent = " ";
this->PrintFormatted(os, op->brief.c_str()); this->PrintFormatted(os, op->brief);
if(op->full.size()) if(op->full)
{ {
os << "\n"; os << "\n";
this->PrintFormatted(os, op->full.c_str()); this->PrintFormatted(os, op->full);
} }
} }
else else
{ {
this->TextIndent = ""; this->TextIndent = "";
this->PrintFormatted(os, op->brief.c_str()); this->PrintFormatted(os, op->brief);
} }
os << "\n"; os << "\n";
} }

View File

@ -31,31 +31,31 @@ void cmDocumentationFormatterUsage::PrintSection(std::ostream& os,
os << name << "\n"; os << name << "\n";
} }
if(!section) { return; } if(!section) { return; }
for(const cmDocumentationEntry* op = section; op->brief.size(); ++op) for(const cmDocumentationEntry* op = section; op->brief; ++op)
{ {
if(op->name.size()) if(op->name)
{ {
os << " " << op->name; os << " " << op->name;
this->TextIndent = " "; this->TextIndent = " ";
int align = static_cast<int>(strlen(this->TextIndent))-4; int align = static_cast<int>(strlen(this->TextIndent))-4;
for(int i = static_cast<int>(op->name.size()); i < align; ++i) for(int i = static_cast<int>(strlen(op->name)); i < align; ++i)
{ {
os << " "; os << " ";
} }
if ( op->name.size() > strlen(this->TextIndent)-4 ) if ( strlen(op->name) > strlen(this->TextIndent)-4 )
{ {
os << "\n"; os << "\n";
os.write(this->TextIndent, strlen(this->TextIndent)-2); os.write(this->TextIndent, strlen(this->TextIndent)-2);
} }
os << "= "; os << "= ";
this->PrintColumn(os, op->brief.c_str()); this->PrintColumn(os, op->brief);
os << "\n"; os << "\n";
} }
else else
{ {
os << "\n"; os << "\n";
this->TextIndent = ""; this->TextIndent = "";
this->PrintFormatted(os, op->brief.c_str()); this->PrintFormatted(os, op->brief);
} }
} }
os << "\n"; os << "\n";

View File

@ -25,35 +25,35 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationName[] = static const cmDocumentationEntry cmDocumentationName[] =
{ {
{"", {0,
" DumpDocumentation - Dump documentation for CMake.", ""}, " DumpDocumentation - Dump documentation for CMake.", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationUsage[] = static const cmDocumentationEntry cmDocumentationUsage[] =
{ {
{"", {0,
" DumpDocumentation [filename]", ""}, " DumpDocumentation [filename]", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationDescription[] = static const cmDocumentationEntry cmDocumentationDescription[] =
{ {
{"", {0,
"The \"DumpDocumentation\" executable is only available in the build " "The \"DumpDocumentation\" executable is only available in the build "
"tree. It is used for testing, coverage, and documentation.", ""}, "tree. It is used for testing, coverage, and documentation.", 0},
CMAKE_STANDARD_INTRODUCTION, CMAKE_STANDARD_INTRODUCTION,
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationOptions[] = static const cmDocumentationEntry cmDocumentationOptions[] =
{ {
{"--all-for-coverage", {"--all-for-coverage",
"Dump all documentation to stdout. For testing.", ""}, "Dump all documentation to stdout. For testing.", 0},
{"","",""} {0,0,0}
}; };

View File

@ -22,8 +22,8 @@ cmDocumentationEntry cmPropertyDefinition::GetDocumentation() const
cmDocumentationEntry e; cmDocumentationEntry e;
e.name = this->Name.c_str(); e.name = this->Name.c_str();
e.brief = e.brief =
this->ShortDescription.size() ? this->ShortDescription.c_str() : ""; this->ShortDescription.size() ? this->ShortDescription.c_str() : 0;
e.full = this->FullDescription.size() ? this->FullDescription.c_str() : ""; e.full = this->FullDescription.size() ? this->FullDescription.c_str() : 0;
return e; return e;
} }

View File

@ -45,7 +45,7 @@ void cmPropertyDefinitionMap
j != this->end(); ++j) j != this->end(); ++j)
{ {
cmDocumentationEntry e = j->second.GetDocumentation(); cmDocumentationEntry e = j->second.GetDocumentation();
if (e.brief.size()) if (e.brief)
{ {
v.push_back(e); v.push_back(e);
} }

View File

@ -316,9 +316,9 @@ extern void operator << (std::ostream&, const cmOStringStream&);
/** Standard documentation entry for cmDocumentation's formatting. */ /** Standard documentation entry for cmDocumentation's formatting. */
struct cmDocumentationEntry struct cmDocumentationEntry
{ {
std::string name; const char* name;
std::string brief; const char* brief;
std::string full; const char* full;
}; };
/** Data structure to represent a single command line. */ /** Data structure to represent a single command line. */

View File

@ -2262,7 +2262,7 @@ void cmake::GetCommandDocumentation(std::vector<cmDocumentationEntry>& v,
}; };
v.push_back(e); v.push_back(e);
} }
cmDocumentationEntry empty = {"","",""}; cmDocumentationEntry empty = {0,0,0};
v.push_back(empty); v.push_back(empty);
} }
@ -2271,7 +2271,7 @@ void cmake::GetPropertiesDocumentation(std::vector<cmDocumentationEntry>& v,
{ {
// get the properties for cmake // get the properties for cmake
this->PropertyDefinitions[type].GetPropertiesDocumentation(v); this->PropertyDefinitions[type].GetPropertiesDocumentation(v);
cmDocumentationEntry empty = {"","",""}; cmDocumentationEntry empty = {0,0,0};
v.push_back(empty); v.push_back(empty);
} }
@ -2296,7 +2296,7 @@ void cmake::GetGeneratorDocumentation(std::vector<cmDocumentationEntry>& v)
delete generator; delete generator;
v.push_back(e); v.push_back(e);
} }
cmDocumentationEntry empty = {"","",""}; cmDocumentationEntry empty = {0,0,0};
v.push_back(empty); v.push_back(empty);
} }

View File

@ -428,11 +428,11 @@ private:
"section."} "section."}
#define CMAKE_STANDARD_INTRODUCTION \ #define CMAKE_STANDARD_INTRODUCTION \
{"", \ {0, \
"CMake is a cross-platform build system generator. Projects " \ "CMake is a cross-platform build system generator. Projects " \
"specify their build process with platform-independent CMake listfiles " \ "specify their build process with platform-independent CMake listfiles " \
"included in each directory of a source tree with the name " \ "included in each directory of a source tree with the name " \
"CMakeLists.txt. " \ "CMakeLists.txt. " \
"Users build a project by using CMake to generate a build system " \ "Users build a project by using CMake to generate a build system " \
"for a native tool on their platform.", ""} "for a native tool on their platform.", 0}
#endif #endif

View File

@ -34,31 +34,31 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationName[] = static const cmDocumentationEntry cmDocumentationName[] =
{ {
{"", {0,
" cmake - Cross-Platform Makefile Generator.", ""}, " cmake - Cross-Platform Makefile Generator.", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationUsage[] = static const cmDocumentationEntry cmDocumentationUsage[] =
{ {
{"", {0,
" cmake [options] <path-to-source>\n" " cmake [options] <path-to-source>\n"
" cmake [options] <path-to-existing-build>", ""}, " cmake [options] <path-to-existing-build>", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationDescription[] = static const cmDocumentationEntry cmDocumentationDescription[] =
{ {
{"", {0,
"The \"cmake\" executable is the CMake command-line interface. It may " "The \"cmake\" executable is the CMake command-line interface. It may "
"be used to configure projects in scripts. Project configuration " "be used to configure projects in scripts. Project configuration "
"settings " "settings "
"may be specified on the command line with the -D option. The -i option " "may be specified on the command line with the -D option. The -i option "
"will cause cmake to interactively prompt for such settings.", ""}, "will cause cmake to interactively prompt for such settings.", 0},
CMAKE_STANDARD_INTRODUCTION, CMAKE_STANDARD_INTRODUCTION,
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -162,25 +162,25 @@ static const cmDocumentationEntry cmDocumentationOptions[] =
"If a file is specified, the documentation is written into and the output " "If a file is specified, the documentation is written into and the output "
"format is determined depending on the filename suffix. Supported are man " "format is determined depending on the filename suffix. Supported are man "
"page, HTML and plain text."}, "page, HTML and plain text."},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationSeeAlso[] = static const cmDocumentationEntry cmDocumentationSeeAlso[] =
{ {
{"", "ccmake", ""}, {0, "ccmake", 0},
{"", "ctest", ""}, {0, "ctest", 0},
{"", "", ""} {0, 0, 0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationNOTE[] = static const cmDocumentationEntry cmDocumentationNOTE[] =
{ {
{"", {0,
"CMake no longer configures a project when run with no arguments. " "CMake no longer configures a project when run with no arguments. "
"In order to configure the project in the current directory, run\n" "In order to configure the project in the current directory, run\n"
" cmake .", ""}, " cmake .", 0},
{"","",""} {0,0,0}
}; };
#endif #endif

View File

@ -25,28 +25,28 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationName[] = static const cmDocumentationEntry cmDocumentationName[] =
{ {
{"", {0,
" ctest - Testing driver provided by CMake.", ""}, " ctest - Testing driver provided by CMake.", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationUsage[] = static const cmDocumentationEntry cmDocumentationUsage[] =
{ {
{"", {0,
" ctest [options]", ""}, " ctest [options]", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationDescription[] = static const cmDocumentationEntry cmDocumentationDescription[] =
{ {
{"", {0,
"The \"ctest\" executable is the CMake test driver program. " "The \"ctest\" executable is the CMake test driver program. "
"CMake-generated build trees created for projects that use " "CMake-generated build trees created for projects that use "
"the ENABLE_TESTING and ADD_TEST commands have testing support. " "the ENABLE_TESTING and ADD_TEST commands have testing support. "
"This program will run the tests and report results.", ""}, "This program will run the tests and report results.", 0},
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -194,15 +194,15 @@ static const cmDocumentationEntry cmDocumentationOptions[] =
"This option allows performing the same CTest action (such as test) " "This option allows performing the same CTest action (such as test) "
"multiple times and submit all stages to the same dashboard (Dart2 " "multiple times and submit all stages to the same dashboard (Dart2 "
"required). Each execution requires different index." }, "required). Each execution requires different index." },
{"","",""} {0,0,0}
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationSeeAlso[] = static const cmDocumentationEntry cmDocumentationSeeAlso[] =
{ {
{"", "cmake", ""}, {0, "cmake", 0},
{"", "ccmake", ""}, {0, "ccmake", 0},
{"", "", ""} {0, 0, 0}
}; };
// this is a test driver program for cmCTest. // this is a test driver program for cmCTest.