ENH: improve coverage
This commit is contained in:
parent
a4f40c31f1
commit
538ff79e2f
@ -805,8 +805,12 @@ int cmMakefile::DumpDocumentationToFile(std::ostream& f)
|
|||||||
const char *name;
|
const char *name;
|
||||||
const char *terse;
|
const char *terse;
|
||||||
const char *full;
|
const char *full;
|
||||||
|
char tmp[1024];
|
||||||
f << "<html><ul>\n";
|
sprintf(tmp,"Version %d.%d", cmMakefile::GetMajorVersion(),
|
||||||
|
cmMakefile::GetMinorVersion());
|
||||||
|
f << "<html>\n";
|
||||||
|
f << "<h1>Documentation for commands of CMake " << tmp << "</h1>\n";
|
||||||
|
f << "<ul>\n";
|
||||||
for(RegisteredCommandsMap::iterator j = m_Commands.begin();
|
for(RegisteredCommandsMap::iterator j = m_Commands.begin();
|
||||||
j != m_Commands.end(); ++j)
|
j != m_Commands.end(); ++j)
|
||||||
{
|
{
|
||||||
|
@ -404,38 +404,6 @@ void cmSystemTools::CleanUpWindowsSlashes(std::string& path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int cmSystemTools::Grep(const char* dir, const char* file,
|
|
||||||
const char* expression)
|
|
||||||
{
|
|
||||||
std::string path = dir;
|
|
||||||
path += "/";
|
|
||||||
path += file;
|
|
||||||
std::ifstream fin(path.c_str());
|
|
||||||
char buffer[2056];
|
|
||||||
int count = 0;
|
|
||||||
cmRegularExpression reg(expression);
|
|
||||||
while(fin)
|
|
||||||
{
|
|
||||||
fin.getline(buffer, sizeof(buffer));
|
|
||||||
count += reg.find(buffer);
|
|
||||||
}
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void cmSystemTools::ConvertCygwinPath(std::string& pathname)
|
|
||||||
{
|
|
||||||
if(pathname.find("/cygdrive/") != std::string::npos)
|
|
||||||
{
|
|
||||||
std::string cygStuff = pathname.substr(0, 11);
|
|
||||||
std::string replace;
|
|
||||||
replace += cygStuff.at(10);
|
|
||||||
replace += ":";
|
|
||||||
cmSystemTools::ReplaceString(pathname, cygStuff.c_str(), replace.c_str());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool cmSystemTools::ParseFunction(std::ifstream& fin,
|
bool cmSystemTools::ParseFunction(std::ifstream& fin,
|
||||||
std::string& name,
|
std::string& name,
|
||||||
std::vector<std::string>& arguments)
|
std::vector<std::string>& arguments)
|
||||||
|
@ -104,18 +104,6 @@ public:
|
|||||||
///! Return true if a file exists in the current directory.
|
///! Return true if a file exists in the current directory.
|
||||||
static bool FileExists(const char* filename);
|
static bool FileExists(const char* filename);
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the number of times the given expression occurs in the file
|
|
||||||
* specified by the concatenation of dir/file.
|
|
||||||
*/
|
|
||||||
static int Grep(const char* dir, const char* file, const char* expression);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert a path containing a cygwin drive specifier to its natural
|
|
||||||
* equivalent.
|
|
||||||
*/
|
|
||||||
static void ConvertCygwinPath(std::string& pathname);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read a CMake command (or function) from an input file. This
|
* Read a CMake command (or function) from an input file. This
|
||||||
* returns the name of the function and a list of its
|
* returns the name of the function and a list of its
|
||||||
|
Loading…
x
Reference in New Issue
Block a user