-remove trailing whitespace

Alex
This commit is contained in:
Alex Neundorf 2012-06-21 23:02:55 +02:00
parent 30305b989e
commit e6a935f39b
3 changed files with 39 additions and 39 deletions

View File

@ -33,7 +33,7 @@ class cmDocumentation: public cmDocumentationEnums
{
public:
cmDocumentation();
~cmDocumentation();
/**
@ -51,18 +51,18 @@ public:
typedef std::list<documentedModuleSectionPair_t> documentedModulesList_t;
// High-level interface for standard documents:
/**
* Check command line arguments for documentation options. Returns
* true if documentation options are found, and false otherwise.
* When true is returned, PrintRequestedDocumentation should be
* called. exitOpt can be used for things like cmake -E, so that
* called. exitOpt can be used for things like cmake -E, so that
* all arguments after the -E are ignored and not searched for
* help arguments.
*/
bool CheckOptions(int argc, const char* const* argv,
bool CheckOptions(int argc, const char* const* argv,
const char* exitOpt =0);
/**
* Print help requested on the command line. Call after
* CheckOptions returns true. Returns true on success, and false
@ -70,12 +70,12 @@ public:
* command line cannot be written.
*/
bool PrintRequestedDocumentation(std::ostream& os);
/** Print help of the given type. */
bool PrintDocumentation(Type ht, std::ostream& os, const char* docname=0);
void SetShowGenerators(bool showGen) { this->ShowGenerators = showGen; }
/** Set the program name for standard document generation. */
void SetName(const char* name);
@ -109,7 +109,7 @@ public:
* sections will be generated.
*/
void Print(Form f, std::ostream& os);
/**
* Print documentation in the current form. All previously added
* sections will be generated.
@ -125,14 +125,14 @@ public:
void SetSeeAlsoList(const char *data[][3]);
/** Clear all previously added sections of help. */
void ClearSections();
void ClearSections();
/** Set cmake root so we can find installed files */
void SetCMakeRoot(const char* root) { this->CMakeRoot = root;}
/** Set CMAKE_MODULE_PATH so we can find additional cmake modules */
void SetCMakeModulePath(const char* path) { this->CMakeModulePath = path;}
static Form GetFormFromFilename(const std::string& filename);
/** Add common (to all tools) documentation section(s) */
@ -193,10 +193,10 @@ private:
void SetForm(Form f);
void SetDocName(const char* docname);
bool CreateSingleModule(const char* fname,
bool CreateSingleModule(const char* fname,
const char* moduleName,
cmDocumentationSection &sec);
void CreateModuleDocsForDir(cmsys::Directory& dir,
void CreateModuleDocsForDir(cmsys::Directory& dir,
cmDocumentationSection &moduleSection);
bool CreateModulesSection();
bool CreateCustomModulesSection();
@ -236,7 +236,7 @@ private:
std::string NameString;
std::string DocName;
std::map<std::string,cmDocumentationSection*> AllSections;
std::string SeeAlsoString;
std::string CMakeRoot;
std::string CMakeModulePath;

View File

@ -32,9 +32,9 @@ void cmDocumentationFormatterMan
os << ".SH " << name << "\n";
}
const std::vector<cmDocumentationEntry> &entries =
const std::vector<cmDocumentationEntry> &entries =
section.GetEntries();
for(std::vector<cmDocumentationEntry>::const_iterator op = entries.begin();
for(std::vector<cmDocumentationEntry>::const_iterator op = entries.begin();
op != entries.end(); ++op)
{
if(op->Name.size())
@ -58,7 +58,7 @@ void cmDocumentationFormatterMan::EscapeText(std::string& man_text)
cmSystemTools::ReplaceString(man_text, "-", "\\-");
}
void cmDocumentationFormatterMan::PrintPreformatted(std::ostream& os,
void cmDocumentationFormatterMan::PrintPreformatted(std::ostream& os,
const char* text)
{
std::string man_text = text;
@ -69,7 +69,7 @@ void cmDocumentationFormatterMan::PrintPreformatted(std::ostream& os,
os << ".fi\n\n";
}
void cmDocumentationFormatterMan::PrintParagraph(std::ostream& os,
void cmDocumentationFormatterMan::PrintParagraph(std::ostream& os,
const char* text)
{
std::string man_text = text;

View File

@ -9,8 +9,8 @@
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
// include these first, otherwise there will be problems on Windows
// with GetCurrentDirectory() being redefined
// include these first, otherwise there will be problems on Windows
// with GetCurrentDirectory() being redefined
#ifdef CMAKE_BUILD_WITH_CMAKE
#include "cmDynamicLoader.h"
#include "cmDocumentation.h"
@ -183,7 +183,7 @@ static const char * cmDocumentationOptions[][3] =
"If a file is specified, the documentation is written into and the output "
"format is determined depending on the filename suffix. Supported are man "
"page, HTML, DocBook and plain text."},
{"--help-policy cmp [file]",
{"--help-policy cmp [file]",
"Print help for a single policy and exit.",
"Full documentation specific to the given policy is displayed."
"If a file is specified, the documentation is written into and the output "
@ -194,7 +194,7 @@ static const char * cmDocumentationOptions[][3] =
"If a file is specified, the documentation is written into and the output "
"format is determined depending on the filename suffix. Supported are man "
"page, HTML, DocBook and plain text."},
{"--help-property prop [file]",
{"--help-property prop [file]",
"Print help for a single property and exit.",
"Full documentation specific to the given property is displayed."
"If a file is specified, the documentation is written into and the output "
@ -212,7 +212,7 @@ static const char * cmDocumentationOptions[][3] =
"If a file is specified, the documentation is written into and the output "
"format is determined depending on the filename suffix. Supported are man "
"page, HTML, DocBook and plain text."},
{"--help-variable var [file]",
{"--help-variable var [file]",
"Print help for a single variable and exit.",
"Full documentation specific to the given variable is displayed."
"If a file is specified, the documentation is written into and the output "
@ -296,13 +296,13 @@ static std::string cmakemainGetStack(void *clientdata)
return msg;
}
static void cmakemainErrorCallback(const char* m, const char*, bool&,
static void cmakemainErrorCallback(const char* m, const char*, bool&,
void *clientdata)
{
std::cerr << m << cmakemainGetStack(clientdata) << std::endl << std::flush;
}
static void cmakemainProgressCallback(const char *m, float prog,
static void cmakemainProgressCallback(const char *m, float prog,
void* clientdata)
{
cmMakefile* mf = cmakemainGetMakefile(clientdata);
@ -348,7 +348,7 @@ int do_cmake(int ac, char** av)
if ( cmSystemTools::GetCurrentWorkingDirectory().size() == 0 )
{
std::cerr << "Current working directory cannot be established."
std::cerr << "Current working directory cannot be established."
<< std::endl;
nocwd = 1;
}
@ -357,13 +357,13 @@ int do_cmake(int ac, char** av)
cmDocumentation doc;
doc.addCMakeStandardDocSections();
if(doc.CheckOptions(ac, av, "-E") || nocwd)
{
{
// Construct and print requested documentation.
cmake hcm;
hcm.AddCMakePaths();
doc.SetCMakeRoot(hcm.GetCacheDefinition("CMAKE_ROOT"));
// the command line args are processed here so that you can do
// the command line args are processed here so that you can do
// -DCMAKE_MODULE_PATH=/some/path and have this value accessible here
std::vector<std::string> args;
for(int i =0; i < ac; ++i)
@ -401,7 +401,7 @@ int do_cmake(int ac, char** av)
doc.SetSections(propDocs);
cmDocumentationEntry e;
e.Brief =
e.Brief =
"variables defined by cmake, that give information about the project, "
"and cmake";
doc.PrependSection("Variables that Provide Information",e);
@ -426,13 +426,13 @@ int do_cmake(int ac, char** av)
#else
if ( nocwd || ac == 1 )
{
std::cout <<
std::cout <<
"Bootstrap CMake should not be used outside CMake build process."
<< std::endl;
return 0;
}
#endif
bool wiz = false;
bool sysinfo = false;
bool command = false;
@ -453,7 +453,7 @@ int do_cmake(int ac, char** av)
sysinfo = true;
}
// if command has already been set, then
// do not eat the -E
// do not eat the -E
else if (!command && strcmp(av[i], "-E") == 0)
{
command = true;
@ -500,7 +500,7 @@ int do_cmake(int ac, char** av)
workingMode = cmake::FIND_PACKAGE_MODE;
args.push_back(av[i]);
}
else
else
{
args.push_back(av[i]);
}
@ -513,15 +513,15 @@ int do_cmake(int ac, char** av)
if (wiz)
{
cmakewizard wizard;
return wizard.RunWizard(args);
return wizard.RunWizard(args);
}
if (sysinfo)
{
cmake cm;
int ret = cm.GetSystemInformation(args);
return ret;
return ret;
}
cmake cm;
cmake cm;
cmSystemTools::SetErrorCallback(cmakemainErrorCallback, (void *)&cm);
cm.SetProgressCallback(cmakemainProgressCallback, (void *)&cm);
cm.SetWorkingMode(workingMode);
@ -529,7 +529,7 @@ int do_cmake(int ac, char** av)
int res = cm.Run(args, view_only);
if ( list_cached || list_all_cached )
{
cmCacheManager::CacheIterator it =
cmCacheManager::CacheIterator it =
cm.GetCacheManager()->GetCacheIterator();
std::cout << "-- Cache values" << std::endl;
for ( it.Begin(); !it.IsAtEnd(); it.Next() )
@ -545,8 +545,8 @@ int do_cmake(int ac, char** av)
{
std::cout << "// " << it.GetProperty("HELPSTRING") << std::endl;
}
std::cout << it.GetName() << ":" <<
cmCacheManager::TypeToString(it.GetType())
std::cout << it.GetName() << ":" <<
cmCacheManager::TypeToString(it.GetType())
<< "=" << it.GetValue() << std::endl;
if ( list_help )
{