Merge topic 'string-param'
273257222e
Source: change parameters to std::string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3340
This commit is contained in:
commit
0bf5348329
@ -82,11 +82,11 @@ bool cmExecProgramCommand::InitialPass(std::vector<std::string> const& args,
|
|||||||
bool result = true;
|
bool result = true;
|
||||||
if (args.size() - count == 2) {
|
if (args.size() - count == 2) {
|
||||||
cmSystemTools::MakeDirectory(args[1]);
|
cmSystemTools::MakeDirectory(args[1]);
|
||||||
result = cmExecProgramCommand::RunCommand(command.c_str(), output, retVal,
|
result = cmExecProgramCommand::RunCommand(command, output, retVal,
|
||||||
args[1].c_str(), verbose);
|
args[1].c_str(), verbose);
|
||||||
} else {
|
} else {
|
||||||
result = cmExecProgramCommand::RunCommand(command.c_str(), output, retVal,
|
result = cmExecProgramCommand::RunCommand(command, output, retVal, nullptr,
|
||||||
nullptr, verbose);
|
verbose);
|
||||||
}
|
}
|
||||||
if (!result) {
|
if (!result) {
|
||||||
retVal = -1;
|
retVal = -1;
|
||||||
@ -115,7 +115,7 @@ bool cmExecProgramCommand::InitialPass(std::vector<std::string> const& args,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmExecProgramCommand::RunCommand(const char* command, std::string& output,
|
bool cmExecProgramCommand::RunCommand(std::string command, std::string& output,
|
||||||
int& retVal, const char* dir,
|
int& retVal, const char* dir,
|
||||||
bool verbose, Encoding encoding)
|
bool verbose, Encoding encoding)
|
||||||
{
|
{
|
||||||
@ -128,12 +128,11 @@ bool cmExecProgramCommand::RunCommand(const char* command, std::string& output,
|
|||||||
// try to find the program, and if the program can not be
|
// try to find the program, and if the program can not be
|
||||||
// found use system to run the command as it must be a built in
|
// found use system to run the command as it must be a built in
|
||||||
// shell command like echo or dir
|
// shell command like echo or dir
|
||||||
int count = 0;
|
if (!command.empty() && command[0] == '\"') {
|
||||||
std::string shortCmd;
|
|
||||||
if (command[0] == '\"') {
|
|
||||||
// count the number of quotes
|
// count the number of quotes
|
||||||
for (const char* s = command; *s != 0; ++s) {
|
int count = 0;
|
||||||
if (*s == '\"') {
|
for (char c : command) {
|
||||||
|
if (c == '\"') {
|
||||||
count++;
|
count++;
|
||||||
if (count > 2) {
|
if (count > 2) {
|
||||||
break;
|
break;
|
||||||
@ -147,20 +146,21 @@ bool cmExecProgramCommand::RunCommand(const char* command, std::string& output,
|
|||||||
if (count > 2) {
|
if (count > 2) {
|
||||||
cmsys::RegularExpression quoted("^\"([^\"]*)\"[ \t](.*)");
|
cmsys::RegularExpression quoted("^\"([^\"]*)\"[ \t](.*)");
|
||||||
if (quoted.find(command)) {
|
if (quoted.find(command)) {
|
||||||
|
std::string shortCmd;
|
||||||
std::string cmd = quoted.match(1);
|
std::string cmd = quoted.match(1);
|
||||||
std::string args = quoted.match(2);
|
std::string args = quoted.match(2);
|
||||||
if (!cmSystemTools::FileExists(cmd)) {
|
if (!cmSystemTools::FileExists(cmd)) {
|
||||||
shortCmd = cmd;
|
shortCmd = cmd;
|
||||||
} else if (!cmSystemTools::GetShortPath(cmd.c_str(), shortCmd)) {
|
} else if (!cmSystemTools::GetShortPath(cmd, shortCmd)) {
|
||||||
cmSystemTools::Error("GetShortPath failed for " + cmd);
|
cmSystemTools::Error("GetShortPath failed for " + cmd);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
shortCmd += " ";
|
shortCmd += " ";
|
||||||
shortCmd += args;
|
shortCmd += args;
|
||||||
|
|
||||||
command = shortCmd.c_str();
|
command = shortCmd;
|
||||||
} else {
|
} else {
|
||||||
cmSystemTools::Error("Could not parse command line with quotes ",
|
cmSystemTools::Error("Could not parse command line with quotes " +
|
||||||
command);
|
command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -182,7 +182,7 @@ bool cmExecProgramCommand::RunCommand(const char* command, std::string& output,
|
|||||||
cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1);
|
cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1);
|
||||||
}
|
}
|
||||||
cmsysProcess_SetOption(cp, cmsysProcess_Option_Verbatim, 1);
|
cmsysProcess_SetOption(cp, cmsysProcess_Option_Verbatim, 1);
|
||||||
const char* cmd[] = { command, 0 };
|
const char* cmd[] = { command.c_str(), nullptr };
|
||||||
cmsysProcess_SetCommand(cp, cmd);
|
cmsysProcess_SetCommand(cp, cmd);
|
||||||
#else
|
#else
|
||||||
std::string commandInDir;
|
std::string commandInDir;
|
||||||
@ -197,7 +197,7 @@ bool cmExecProgramCommand::RunCommand(const char* command, std::string& output,
|
|||||||
# ifndef __VMS
|
# ifndef __VMS
|
||||||
commandInDir += " 2>&1";
|
commandInDir += " 2>&1";
|
||||||
# endif
|
# endif
|
||||||
command = commandInDir.c_str();
|
command = commandInDir;
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
cmSystemTools::Stdout("running ");
|
cmSystemTools::Stdout("running ");
|
||||||
cmSystemTools::Stdout(command);
|
cmSystemTools::Stdout(command);
|
||||||
@ -205,7 +205,7 @@ bool cmExecProgramCommand::RunCommand(const char* command, std::string& output,
|
|||||||
}
|
}
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
const char* cmd[] = { "/bin/sh", "-c", command, nullptr };
|
const char* cmd[] = { "/bin/sh", "-c", command.c_str(), nullptr };
|
||||||
cmsysProcess_SetCommand(cp, cmd);
|
cmsysProcess_SetCommand(cp, cmd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ public:
|
|||||||
cmExecutionStatus& status) override;
|
cmExecutionStatus& status) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static bool RunCommand(const char* command, std::string& output, int& retVal,
|
static bool RunCommand(std::string command, std::string& output, int& retVal,
|
||||||
const char* directory = nullptr, bool verbose = true,
|
const char* directory = nullptr, bool verbose = true,
|
||||||
Encoding encoding = cmProcessOutput::Auto);
|
Encoding encoding = cmProcessOutput::Auto);
|
||||||
};
|
};
|
||||||
|
@ -558,8 +558,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
|||||||
std::string binaryFileName = this->Makefile->GetCurrentBinaryDirectory();
|
std::string binaryFileName = this->Makefile->GetCurrentBinaryDirectory();
|
||||||
binaryFileName += "/CMakeFiles";
|
binaryFileName += "/CMakeFiles";
|
||||||
binaryFileName += "/FileCommandStringsBinaryFile";
|
binaryFileName += "/FileCommandStringsBinaryFile";
|
||||||
if (cmHexFileConverter::TryConvert(fileName.c_str(),
|
if (cmHexFileConverter::TryConvert(fileName, binaryFileName)) {
|
||||||
binaryFileName.c_str())) {
|
|
||||||
fileName = binaryFileName;
|
fileName = binaryFileName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -170,8 +170,9 @@ cmGraphVizWriter::cmGraphVizWriter(const cmGlobalGenerator* globalGenerator)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmGraphVizWriter::ReadSettings(const char* settingsFileName,
|
void cmGraphVizWriter::ReadSettings(
|
||||||
const char* fallbackSettingsFileName)
|
const std::string& settingsFileName,
|
||||||
|
const std::string& fallbackSettingsFileName)
|
||||||
{
|
{
|
||||||
cmake cm(cmake::RoleScript, cmState::Unknown);
|
cmake cm(cmake::RoleScript, cmState::Unknown);
|
||||||
cm.SetHomeDirectory("");
|
cm.SetHomeDirectory("");
|
||||||
@ -181,8 +182,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName,
|
|||||||
cmMakefile mf(&ggi, cm.GetCurrentSnapshot());
|
cmMakefile mf(&ggi, cm.GetCurrentSnapshot());
|
||||||
std::unique_ptr<cmLocalGenerator> lg(ggi.CreateLocalGenerator(&mf));
|
std::unique_ptr<cmLocalGenerator> lg(ggi.CreateLocalGenerator(&mf));
|
||||||
|
|
||||||
const char* inFileName = settingsFileName;
|
std::string inFileName = settingsFileName;
|
||||||
|
|
||||||
if (!cmSystemTools::FileExists(inFileName)) {
|
if (!cmSystemTools::FileExists(inFileName)) {
|
||||||
inFileName = fallbackSettingsFileName;
|
inFileName = fallbackSettingsFileName;
|
||||||
if (!cmSystemTools::FileExists(inFileName)) {
|
if (!cmSystemTools::FileExists(inFileName)) {
|
||||||
@ -191,7 +191,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!mf.ReadListFile(inFileName)) {
|
if (!mf.ReadListFile(inFileName)) {
|
||||||
cmSystemTools::Error("Problem opening GraphViz options file: ",
|
cmSystemTools::Error("Problem opening GraphViz options file: " +
|
||||||
inFileName);
|
inFileName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -249,7 +249,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName,
|
|||||||
|
|
||||||
// Iterate over all targets and write for each one a graph which shows
|
// Iterate over all targets and write for each one a graph which shows
|
||||||
// which other targets depend on it.
|
// which other targets depend on it.
|
||||||
void cmGraphVizWriter::WriteTargetDependersFiles(const char* fileName)
|
void cmGraphVizWriter::WriteTargetDependersFiles(const std::string& fileName)
|
||||||
{
|
{
|
||||||
if (!this->GenerateDependers) {
|
if (!this->GenerateDependers) {
|
||||||
return;
|
return;
|
||||||
@ -291,7 +291,7 @@ void cmGraphVizWriter::WriteTargetDependersFiles(const char* fileName)
|
|||||||
|
|
||||||
// Iterate over all targets and write for each one a graph which shows
|
// Iterate over all targets and write for each one a graph which shows
|
||||||
// on which targets it depends.
|
// on which targets it depends.
|
||||||
void cmGraphVizWriter::WritePerTargetFiles(const char* fileName)
|
void cmGraphVizWriter::WritePerTargetFiles(const std::string& fileName)
|
||||||
{
|
{
|
||||||
if (!this->GeneratePerTarget) {
|
if (!this->GeneratePerTarget) {
|
||||||
return;
|
return;
|
||||||
@ -327,7 +327,7 @@ void cmGraphVizWriter::WritePerTargetFiles(const char* fileName)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmGraphVizWriter::WriteGlobalFile(const char* fileName)
|
void cmGraphVizWriter::WriteGlobalFile(const std::string& fileName)
|
||||||
{
|
{
|
||||||
this->CollectTargetsAndLibs();
|
this->CollectTargetsAndLibs();
|
||||||
|
|
||||||
@ -392,7 +392,7 @@ void cmGraphVizWriter::WriteConnections(
|
|||||||
GlobalGenerator);
|
GlobalGenerator);
|
||||||
|
|
||||||
for (auto const& llit : ll) {
|
for (auto const& llit : ll) {
|
||||||
const char* libName = llit.first.c_str();
|
const std::string& libName = llit.first;
|
||||||
std::map<std::string, std::string>::const_iterator libNameIt =
|
std::map<std::string, std::string>::const_iterator libNameIt =
|
||||||
this->TargetNamesNodes.find(libName);
|
this->TargetNamesNodes.find(libName);
|
||||||
|
|
||||||
@ -519,7 +519,7 @@ int cmGraphVizWriter::CollectAllTargets()
|
|||||||
for (cmLocalGenerator* lg : this->LocalGenerators) {
|
for (cmLocalGenerator* lg : this->LocalGenerators) {
|
||||||
const std::vector<cmGeneratorTarget*>& targets = lg->GetGeneratorTargets();
|
const std::vector<cmGeneratorTarget*>& targets = lg->GetGeneratorTargets();
|
||||||
for (cmGeneratorTarget* target : targets) {
|
for (cmGeneratorTarget* target : targets) {
|
||||||
const char* realTargetName = target->GetName().c_str();
|
const std::string& realTargetName = target->GetName();
|
||||||
if (this->IgnoreThisTarget(realTargetName)) {
|
if (this->IgnoreThisTarget(realTargetName)) {
|
||||||
// Skip ignored targets
|
// Skip ignored targets
|
||||||
continue;
|
continue;
|
||||||
@ -541,7 +541,7 @@ int cmGraphVizWriter::CollectAllExternalLibs(int cnt)
|
|||||||
for (cmLocalGenerator* lg : this->LocalGenerators) {
|
for (cmLocalGenerator* lg : this->LocalGenerators) {
|
||||||
const std::vector<cmGeneratorTarget*>& targets = lg->GetGeneratorTargets();
|
const std::vector<cmGeneratorTarget*>& targets = lg->GetGeneratorTargets();
|
||||||
for (cmGeneratorTarget* target : targets) {
|
for (cmGeneratorTarget* target : targets) {
|
||||||
const char* realTargetName = target->GetName().c_str();
|
const std::string& realTargetName = target->GetName();
|
||||||
if (this->IgnoreThisTarget(realTargetName)) {
|
if (this->IgnoreThisTarget(realTargetName)) {
|
||||||
// Skip ignored targets
|
// Skip ignored targets
|
||||||
continue;
|
continue;
|
||||||
@ -549,7 +549,7 @@ int cmGraphVizWriter::CollectAllExternalLibs(int cnt)
|
|||||||
const cmTarget::LinkLibraryVectorType* ll =
|
const cmTarget::LinkLibraryVectorType* ll =
|
||||||
&(target->Target->GetOriginalLinkLibraries());
|
&(target->Target->GetOriginalLinkLibraries());
|
||||||
for (auto const& llit : *ll) {
|
for (auto const& llit : *ll) {
|
||||||
const char* libName = llit.first.c_str();
|
std::string libName = llit.first;
|
||||||
if (this->IgnoreThisTarget(libName)) {
|
if (this->IgnoreThisTarget(libName)) {
|
||||||
// Skip ignored targets
|
// Skip ignored targets
|
||||||
continue;
|
continue;
|
||||||
@ -558,7 +558,7 @@ int cmGraphVizWriter::CollectAllExternalLibs(int cnt)
|
|||||||
if (GlobalGenerator->IsAlias(libName)) {
|
if (GlobalGenerator->IsAlias(libName)) {
|
||||||
const auto tgt = GlobalGenerator->FindTarget(libName);
|
const auto tgt = GlobalGenerator->FindTarget(libName);
|
||||||
if (tgt) {
|
if (tgt) {
|
||||||
libName = tgt->GetName().c_str();
|
libName = tgt->GetName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,13 +25,13 @@ class cmGraphVizWriter
|
|||||||
public:
|
public:
|
||||||
cmGraphVizWriter(const cmGlobalGenerator* globalGenerator);
|
cmGraphVizWriter(const cmGlobalGenerator* globalGenerator);
|
||||||
|
|
||||||
void ReadSettings(const char* settingsFileName,
|
void ReadSettings(const std::string& settingsFileName,
|
||||||
const char* fallbackSettingsFileName);
|
const std::string& fallbackSettingsFileName);
|
||||||
|
|
||||||
void WritePerTargetFiles(const char* fileName);
|
void WritePerTargetFiles(const std::string& fileName);
|
||||||
void WriteTargetDependersFiles(const char* fileName);
|
void WriteTargetDependersFiles(const std::string& fileName);
|
||||||
|
|
||||||
void WriteGlobalFile(const char* fileName);
|
void WriteGlobalFile(const std::string& fileName);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void CollectTargetsAndLibs();
|
void CollectTargetsAndLibs();
|
||||||
|
@ -128,7 +128,7 @@ static bool ConvertIntelHexLine(const char* buf, FILE* outFile)
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmHexFileConverter::FileType cmHexFileConverter::DetermineFileType(
|
cmHexFileConverter::FileType cmHexFileConverter::DetermineFileType(
|
||||||
const char* inFileName)
|
const std::string& inFileName)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
FILE* inFile = cmsys::SystemTools::Fopen(inFileName, "rb");
|
FILE* inFile = cmsys::SystemTools::Fopen(inFileName, "rb");
|
||||||
@ -170,8 +170,8 @@ cmHexFileConverter::FileType cmHexFileConverter::DetermineFileType(
|
|||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmHexFileConverter::TryConvert(const char* inFileName,
|
bool cmHexFileConverter::TryConvert(const std::string& inFileName,
|
||||||
const char* outFileName)
|
const std::string& outFileName)
|
||||||
{
|
{
|
||||||
FileType type = DetermineFileType(inFileName);
|
FileType type = DetermineFileType(inFileName);
|
||||||
if (type == Binary) {
|
if (type == Binary) {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#define cmHexFileConverter_h
|
#define cmHexFileConverter_h
|
||||||
|
|
||||||
#include "cmConfigure.h" // IWYU pragma: keep
|
#include "cmConfigure.h" // IWYU pragma: keep
|
||||||
|
#include <string>
|
||||||
|
|
||||||
/** \class cmHexFileConverter
|
/** \class cmHexFileConverter
|
||||||
* \brief Can detects Intel Hex and Motorola S-record files and convert them
|
* \brief Can detects Intel Hex and Motorola S-record files and convert them
|
||||||
@ -19,8 +20,9 @@ public:
|
|||||||
IntelHex,
|
IntelHex,
|
||||||
MotorolaSrec
|
MotorolaSrec
|
||||||
};
|
};
|
||||||
static FileType DetermineFileType(const char* inFileName);
|
static FileType DetermineFileType(const std::string& inFileName);
|
||||||
static bool TryConvert(const char* inFileName, const char* outFileName);
|
static bool TryConvert(const std::string& inFileName,
|
||||||
|
const std::string& outFileName);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -30,7 +30,7 @@ bool cmUseMangledMesaCommand::InitialPass(std::vector<std::string> const& args,
|
|||||||
this->SetError(e);
|
this->SetError(e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const char* destDir = args[1].c_str();
|
const std::string& destDir = args[1];
|
||||||
std::vector<std::string> files;
|
std::vector<std::string> files;
|
||||||
cmSystemTools::Glob(inputDir, "\\.h$", files);
|
cmSystemTools::Glob(inputDir, "\\.h$", files);
|
||||||
if (files.empty()) {
|
if (files.empty()) {
|
||||||
@ -42,14 +42,14 @@ bool cmUseMangledMesaCommand::InitialPass(std::vector<std::string> const& args,
|
|||||||
std::string path = inputDir;
|
std::string path = inputDir;
|
||||||
path += "/";
|
path += "/";
|
||||||
path += f;
|
path += f;
|
||||||
this->CopyAndFullPathMesaHeader(path.c_str(), destDir);
|
this->CopyAndFullPathMesaHeader(path, destDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmUseMangledMesaCommand::CopyAndFullPathMesaHeader(const char* source,
|
void cmUseMangledMesaCommand::CopyAndFullPathMesaHeader(
|
||||||
const char* outdir)
|
const std::string& source, const std::string& outdir)
|
||||||
{
|
{
|
||||||
std::string dir, file;
|
std::string dir, file;
|
||||||
cmSystemTools::SplitProgramPath(source, dir, file);
|
cmSystemTools::SplitProgramPath(source, dir, file);
|
||||||
@ -65,9 +65,9 @@ void cmUseMangledMesaCommand::CopyAndFullPathMesaHeader(const char* source,
|
|||||||
cmSystemTools::ReportLastSystemError("");
|
cmSystemTools::ReportLastSystemError("");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cmsys::ifstream fin(source);
|
cmsys::ifstream fin(source.c_str());
|
||||||
if (!fin) {
|
if (!fin) {
|
||||||
cmSystemTools::Error("Could not open file for read in copy operation",
|
cmSystemTools::Error("Could not open file for read in copy operation" +
|
||||||
source);
|
source);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,8 @@ public:
|
|||||||
cmExecutionStatus& status) override;
|
cmExecutionStatus& status) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void CopyAndFullPathMesaHeader(const char* source, const char* outdir);
|
void CopyAndFullPathMesaHeader(const std::string& source,
|
||||||
|
const std::string& outdir);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -812,7 +812,7 @@ void cmake::SetArgs(const std::vector<std::string>& args)
|
|||||||
}
|
}
|
||||||
// no option assume it is the path to the source or an existing build
|
// no option assume it is the path to the source or an existing build
|
||||||
else {
|
else {
|
||||||
this->SetDirectoriesFromFile(arg.c_str());
|
this->SetDirectoriesFromFile(arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -855,7 +855,7 @@ cmake::LogLevel cmake::StringToLogLevel(const std::string& levelStr)
|
|||||||
return (it != levels.cend()) ? it->second : LogLevel::LOG_UNDEFINED;
|
return (it != levels.cend()) ? it->second : LogLevel::LOG_UNDEFINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmake::SetDirectoriesFromFile(const char* arg)
|
void cmake::SetDirectoriesFromFile(const std::string& arg)
|
||||||
{
|
{
|
||||||
// Check if the argument refers to a CMakeCache.txt or
|
// Check if the argument refers to a CMakeCache.txt or
|
||||||
// CMakeLists.txt file.
|
// CMakeLists.txt file.
|
||||||
@ -1755,7 +1755,7 @@ int cmake::Generate()
|
|||||||
this->GlobalGenerator->Generate();
|
this->GlobalGenerator->Generate();
|
||||||
if (!this->GraphVizFile.empty()) {
|
if (!this->GraphVizFile.empty()) {
|
||||||
std::cout << "Generate graphviz: " << this->GraphVizFile << std::endl;
|
std::cout << "Generate graphviz: " << this->GraphVizFile << std::endl;
|
||||||
this->GenerateGraphViz(this->GraphVizFile.c_str());
|
this->GenerateGraphViz(this->GraphVizFile);
|
||||||
}
|
}
|
||||||
if (this->WarnUnusedCli) {
|
if (this->WarnUnusedCli) {
|
||||||
this->RunCheckForUnusedVariables();
|
this->RunCheckForUnusedVariables();
|
||||||
@ -2263,7 +2263,7 @@ void cmake::MarkCliAsUsed(const std::string& variable)
|
|||||||
this->UsedCliVariables[variable] = true;
|
this->UsedCliVariables[variable] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmake::GenerateGraphViz(const char* fileName) const
|
void cmake::GenerateGraphViz(const std::string& fileName) const
|
||||||
{
|
{
|
||||||
#ifdef CMAKE_BUILD_WITH_CMAKE
|
#ifdef CMAKE_BUILD_WITH_CMAKE
|
||||||
cmGraphVizWriter gvWriter(this->GetGlobalGenerator());
|
cmGraphVizWriter gvWriter(this->GetGlobalGenerator());
|
||||||
@ -2273,8 +2273,7 @@ void cmake::GenerateGraphViz(const char* fileName) const
|
|||||||
std::string fallbackSettingsFile = this->GetHomeDirectory();
|
std::string fallbackSettingsFile = this->GetHomeDirectory();
|
||||||
fallbackSettingsFile += "/CMakeGraphVizOptions.cmake";
|
fallbackSettingsFile += "/CMakeGraphVizOptions.cmake";
|
||||||
|
|
||||||
gvWriter.ReadSettings(settingsFile.c_str(), fallbackSettingsFile.c_str());
|
gvWriter.ReadSettings(settingsFile, fallbackSettingsFile);
|
||||||
|
|
||||||
gvWriter.WritePerTargetFiles(fileName);
|
gvWriter.WritePerTargetFiles(fileName);
|
||||||
gvWriter.WriteTargetDependersFiles(fileName);
|
gvWriter.WriteTargetDependersFiles(fileName);
|
||||||
gvWriter.WriteGlobalFile(fileName);
|
gvWriter.WriteGlobalFile(fileName);
|
||||||
@ -2652,7 +2651,7 @@ int cmake::Build(int jobs, const std::string& dir,
|
|||||||
// directories, which is required for running the generation step.
|
// directories, which is required for running the generation step.
|
||||||
std::string homeOrig = this->GetHomeDirectory();
|
std::string homeOrig = this->GetHomeDirectory();
|
||||||
std::string homeOutputOrig = this->GetHomeOutputDirectory();
|
std::string homeOutputOrig = this->GetHomeOutputDirectory();
|
||||||
this->SetDirectoriesFromFile(cachePath.c_str());
|
this->SetDirectoriesFromFile(cachePath);
|
||||||
|
|
||||||
this->AddProjectCommands();
|
this->AddProjectCommands();
|
||||||
|
|
||||||
|
@ -495,13 +495,13 @@ protected:
|
|||||||
*/
|
*/
|
||||||
int CheckBuildSystem();
|
int CheckBuildSystem();
|
||||||
|
|
||||||
void SetDirectoriesFromFile(const char* arg);
|
void SetDirectoriesFromFile(const std::string& arg);
|
||||||
|
|
||||||
//! Make sure all commands are what they say they are and there is no
|
//! Make sure all commands are what they say they are and there is no
|
||||||
/// macros.
|
/// macros.
|
||||||
void CleanupCommandsAndMacros();
|
void CleanupCommandsAndMacros();
|
||||||
|
|
||||||
void GenerateGraphViz(const char* fileName) const;
|
void GenerateGraphViz(const std::string& fileName) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ProgressCallbackType ProgressCallback;
|
ProgressCallbackType ProgressCallback;
|
||||||
|
Loading…
Reference in New Issue
Block a user