mirror of
https://github.com/reactos/CMake.git
synced 2024-11-23 19:49:51 +00:00
Remove some c_str() calls.
Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
This commit is contained in:
parent
e21ffaf8fe
commit
21c573f682
@ -506,7 +506,7 @@ int cmCPackDebGenerator::createDeb()
|
||||
controlExtraList.begin(); i != controlExtraList.end(); ++i)
|
||||
{
|
||||
std::string filenamename =
|
||||
cmsys::SystemTools::GetFilenameName(i->c_str());
|
||||
cmsys::SystemTools::GetFilenameName(*i);
|
||||
std::string localcopy = this->GetOption("WDIR");
|
||||
localcopy += "/";
|
||||
localcopy += filenamename;
|
||||
@ -588,9 +588,9 @@ std::string cmCPackDebGenerator::GetComponentInstallDirNameSuffix(
|
||||
// the current COMPONENT belongs to.
|
||||
std::string groupVar = "CPACK_COMPONENT_" +
|
||||
cmSystemTools::UpperCase(componentName) + "_GROUP";
|
||||
if (NULL != GetOption(groupVar.c_str()))
|
||||
if (NULL != GetOption(groupVar))
|
||||
{
|
||||
return std::string(GetOption(groupVar.c_str()));
|
||||
return std::string(GetOption(groupVar));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -357,9 +357,9 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
||||
std::list<std::pair<std::string,std::string> > symlinkedFiles;
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Find files" << std::endl);
|
||||
cmsys::Glob gl;
|
||||
std::string top = it->c_str();
|
||||
std::string top = *it;
|
||||
it ++;
|
||||
std::string subdir = it->c_str();
|
||||
std::string subdir = *it;
|
||||
std::string findExpr = top;
|
||||
findExpr += "/*";
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||
@ -473,7 +473,7 @@ int cmCPackGenerator::InstallProjectViaInstallScript(
|
||||
it != cmakeScriptsVector.end();
|
||||
++it )
|
||||
{
|
||||
std::string installScript = it->c_str();
|
||||
std::string installScript = *it;
|
||||
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||
"- Install script: " << installScript << std::endl);
|
||||
@ -562,13 +562,13 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
std::string installDirectory = it->c_str();
|
||||
std::string installDirectory = *it;
|
||||
++it;
|
||||
std::string installProjectName = it->c_str();
|
||||
std::string installProjectName = *it;
|
||||
++it;
|
||||
std::string installComponent = it->c_str();
|
||||
std::string installComponent = *it;
|
||||
++it;
|
||||
std::string installSubDirectory = it->c_str();
|
||||
std::string installSubDirectory = *it;
|
||||
std::string installFile = installDirectory + "/cmake_install.cmake";
|
||||
|
||||
std::vector<std::string> componentsVector;
|
||||
@ -586,7 +586,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||
// Determine the installation types for this project (if provided).
|
||||
std::string installTypesVar = "CPACK_"
|
||||
+ cmSystemTools::UpperCase(installComponent) + "_INSTALL_TYPES";
|
||||
const char *installTypes = this->GetOption(installTypesVar.c_str());
|
||||
const char *installTypes = this->GetOption(installTypesVar);
|
||||
if (installTypes && *installTypes)
|
||||
{
|
||||
std::vector<std::string> installTypesVector;
|
||||
@ -596,15 +596,15 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||
installTypeIt != installTypesVector.end();
|
||||
++installTypeIt)
|
||||
{
|
||||
this->GetInstallationType(installProjectName.c_str(),
|
||||
installTypeIt->c_str());
|
||||
this->GetInstallationType(installProjectName,
|
||||
*installTypeIt);
|
||||
}
|
||||
}
|
||||
|
||||
// Determine the set of components that will be used in this project
|
||||
std::string componentsVar
|
||||
= "CPACK_COMPONENTS_" + cmSystemTools::UpperCase(installComponent);
|
||||
const char *components = this->GetOption(componentsVar.c_str());
|
||||
const char *components = this->GetOption(componentsVar);
|
||||
if (components && *components)
|
||||
{
|
||||
cmSystemTools::ExpandListArgument(components, componentsVector);
|
||||
@ -613,7 +613,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||
compIt != componentsVector.end();
|
||||
++compIt)
|
||||
{
|
||||
GetComponent(installProjectName.c_str(), compIt->c_str());
|
||||
GetComponent(installProjectName, *compIt);
|
||||
}
|
||||
componentInstall = true;
|
||||
}
|
||||
@ -641,7 +641,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||
= this->MakefileMap->GetDefinition("CMAKE_MAKE_PROGRAM");
|
||||
std::vector<std::string> buildCommand;
|
||||
globalGenerator->GenerateBuildCommand(buildCommand, cmakeMakeProgram,
|
||||
installProjectName.c_str(), installDirectory.c_str(),
|
||||
installProjectName, installDirectory,
|
||||
globalGenerator->GetPreinstallTargetName(),
|
||||
buildConfig, false);
|
||||
std::string buildCommandStr =
|
||||
@ -932,19 +932,19 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||
std::string absoluteDestFileComponent =
|
||||
std::string("CPACK_ABSOLUTE_DESTINATION_FILES")
|
||||
+ "_" + GetComponentInstallDirNameSuffix(installComponent);
|
||||
if (NULL != this->GetOption(absoluteDestFileComponent.c_str()))
|
||||
if (NULL != this->GetOption(absoluteDestFileComponent))
|
||||
{
|
||||
std::string absoluteDestFilesListComponent =
|
||||
this->GetOption(absoluteDestFileComponent.c_str());
|
||||
this->GetOption(absoluteDestFileComponent);
|
||||
absoluteDestFilesListComponent +=";";
|
||||
absoluteDestFilesListComponent +=
|
||||
mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES");
|
||||
this->SetOption(absoluteDestFileComponent.c_str(),
|
||||
this->SetOption(absoluteDestFileComponent,
|
||||
absoluteDestFilesListComponent.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
this->SetOption(absoluteDestFileComponent.c_str(),
|
||||
this->SetOption(absoluteDestFileComponent,
|
||||
mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES"));
|
||||
}
|
||||
}
|
||||
@ -1428,14 +1428,14 @@ std::string cmCPackGenerator::GetComponentPackageFileName(
|
||||
std::string suffix="-"+groupOrComponentName;
|
||||
/* check if we should use DISPLAY name */
|
||||
std::string dispNameVar = "CPACK_"+Name+"_USE_DISPLAY_NAME_IN_FILENAME";
|
||||
if (IsOn(dispNameVar.c_str()))
|
||||
if (IsOn(dispNameVar))
|
||||
{
|
||||
/* the component Group case */
|
||||
if (isGroupName)
|
||||
{
|
||||
std::string groupDispVar = "CPACK_COMPONENT_GROUP_"
|
||||
+ cmSystemTools::UpperCase(groupOrComponentName) + "_DISPLAY_NAME";
|
||||
const char* groupDispName = GetOption(groupDispVar.c_str());
|
||||
const char* groupDispName = GetOption(groupDispVar);
|
||||
if (groupDispName)
|
||||
{
|
||||
suffix = "-"+std::string(groupDispName);
|
||||
@ -1446,7 +1446,7 @@ std::string cmCPackGenerator::GetComponentPackageFileName(
|
||||
{
|
||||
std::string dispVar = "CPACK_COMPONENT_"
|
||||
+ cmSystemTools::UpperCase(groupOrComponentName) + "_DISPLAY_NAME";
|
||||
const char* dispName = GetOption(dispVar.c_str());
|
||||
const char* dispName = GetOption(dispVar);
|
||||
if(dispName)
|
||||
{
|
||||
suffix = "-"+std::string(dispName);
|
||||
@ -1497,7 +1497,7 @@ cmCPackGenerator::GetInstallationType(const std::string& projectName,
|
||||
installType->Name = name;
|
||||
|
||||
const char* displayName
|
||||
= this->GetOption((macroPrefix + "_DISPLAY_NAME").c_str());
|
||||
= this->GetOption(macroPrefix + "_DISPLAY_NAME");
|
||||
if (displayName && *displayName)
|
||||
{
|
||||
installType->DisplayName = displayName;
|
||||
@ -1527,7 +1527,7 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
|
||||
+ cmsys::SystemTools::UpperCase(name);
|
||||
component->Name = name;
|
||||
const char* displayName
|
||||
= this->GetOption((macroPrefix + "_DISPLAY_NAME").c_str());
|
||||
= this->GetOption(macroPrefix + "_DISPLAY_NAME");
|
||||
if (displayName && *displayName)
|
||||
{
|
||||
component->DisplayName = displayName;
|
||||
@ -1537,23 +1537,23 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
|
||||
component->DisplayName = component->Name;
|
||||
}
|
||||
component->IsHidden
|
||||
= this->IsOn((macroPrefix + "_HIDDEN").c_str());
|
||||
= this->IsOn(macroPrefix + "_HIDDEN");
|
||||
component->IsRequired
|
||||
= this->IsOn((macroPrefix + "_REQUIRED").c_str());
|
||||
= this->IsOn(macroPrefix + "_REQUIRED");
|
||||
component->IsDisabledByDefault
|
||||
= this->IsOn((macroPrefix + "_DISABLED").c_str());
|
||||
= this->IsOn(macroPrefix + "_DISABLED");
|
||||
component->IsDownloaded
|
||||
= this->IsOn((macroPrefix + "_DOWNLOADED").c_str())
|
||||
= this->IsOn(macroPrefix + "_DOWNLOADED")
|
||||
|| cmSystemTools::IsOn(this->GetOption("CPACK_DOWNLOAD_ALL"));
|
||||
|
||||
const char* archiveFile = this->GetOption((macroPrefix +
|
||||
"_ARCHIVE_FILE").c_str());
|
||||
const char* archiveFile = this->GetOption(macroPrefix +
|
||||
"_ARCHIVE_FILE");
|
||||
if (archiveFile && *archiveFile)
|
||||
{
|
||||
component->ArchiveFile = archiveFile;
|
||||
}
|
||||
|
||||
const char* groupName = this->GetOption((macroPrefix + "_GROUP").c_str());
|
||||
const char* groupName = this->GetOption(macroPrefix + "_GROUP");
|
||||
if (groupName && *groupName)
|
||||
{
|
||||
component->Group = GetComponentGroup(projectName, groupName);
|
||||
@ -1565,7 +1565,7 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
|
||||
}
|
||||
|
||||
const char* description
|
||||
= this->GetOption((macroPrefix + "_DESCRIPTION").c_str());
|
||||
= this->GetOption(macroPrefix + "_DESCRIPTION");
|
||||
if (description && *description)
|
||||
{
|
||||
component->Description = description;
|
||||
@ -1573,7 +1573,7 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
|
||||
|
||||
// Determine the installation types.
|
||||
const char *installTypes
|
||||
= this->GetOption((macroPrefix + "_INSTALL_TYPES").c_str());
|
||||
= this->GetOption(macroPrefix + "_INSTALL_TYPES");
|
||||
if (installTypes && *installTypes)
|
||||
{
|
||||
std::vector<std::string> installTypesVector;
|
||||
@ -1589,7 +1589,7 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
|
||||
}
|
||||
|
||||
// Determine the component dependencies.
|
||||
const char *depends = this->GetOption((macroPrefix + "_DEPENDS").c_str());
|
||||
const char *depends = this->GetOption(macroPrefix + "_DEPENDS");
|
||||
if (depends && *depends)
|
||||
{
|
||||
std::vector<std::string> dependsVector;
|
||||
@ -1600,7 +1600,7 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
|
||||
++dependIt)
|
||||
{
|
||||
cmCPackComponent *child = GetComponent(projectName,
|
||||
dependIt->c_str());
|
||||
*dependIt);
|
||||
component->Dependencies.push_back(child);
|
||||
child->ReverseDependencies.push_back(component);
|
||||
}
|
||||
@ -1624,7 +1624,7 @@ cmCPackGenerator::GetComponentGroup(const std::string& projectName,
|
||||
// Define the group
|
||||
group->Name = name;
|
||||
const char* displayName
|
||||
= this->GetOption((macroPrefix + "_DISPLAY_NAME").c_str());
|
||||
= this->GetOption(macroPrefix + "_DISPLAY_NAME");
|
||||
if (displayName && *displayName)
|
||||
{
|
||||
group->DisplayName = displayName;
|
||||
@ -1635,17 +1635,17 @@ cmCPackGenerator::GetComponentGroup(const std::string& projectName,
|
||||
}
|
||||
|
||||
const char* description
|
||||
= this->GetOption((macroPrefix + "_DESCRIPTION").c_str());
|
||||
= this->GetOption(macroPrefix + "_DESCRIPTION");
|
||||
if (description && *description)
|
||||
{
|
||||
group->Description = description;
|
||||
}
|
||||
group->IsBold
|
||||
= this->IsOn((macroPrefix + "_BOLD_TITLE").c_str());
|
||||
= this->IsOn(macroPrefix + "_BOLD_TITLE");
|
||||
group->IsExpandedByDefault
|
||||
= this->IsOn((macroPrefix + "_EXPANDED").c_str());
|
||||
= this->IsOn(macroPrefix + "_EXPANDED");
|
||||
const char* parentGroupName
|
||||
= this->GetOption((macroPrefix + "_PARENT_GROUP").c_str());
|
||||
= this->GetOption(macroPrefix + "_PARENT_GROUP");
|
||||
if (parentGroupName && *parentGroupName)
|
||||
{
|
||||
group->ParentGroup = GetComponentGroup(projectName, parentGroupName);
|
||||
|
@ -629,7 +629,7 @@ void cmCPackNSISGenerator::CreateMenuLinks( cmOStringStream& str,
|
||||
// if so add a desktop link
|
||||
std::string desktop = "CPACK_CREATE_DESKTOP_LINK_";
|
||||
desktop += linkName;
|
||||
if(this->IsSet(desktop.c_str()))
|
||||
if(this->IsSet(desktop))
|
||||
{
|
||||
str << " StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n";
|
||||
str << " CreateShortCut \"$DESKTOP\\"
|
||||
|
@ -272,9 +272,9 @@ std::string cmCPackRPMGenerator::GetComponentInstallDirNameSuffix(
|
||||
// the current COMPONENT belongs to.
|
||||
std::string groupVar = "CPACK_COMPONENT_" +
|
||||
cmSystemTools::UpperCase(componentName) + "_GROUP";
|
||||
if (NULL != GetOption(groupVar.c_str()))
|
||||
if (NULL != GetOption(groupVar))
|
||||
{
|
||||
return std::string(GetOption(groupVar.c_str()));
|
||||
return std::string(GetOption(groupVar));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -326,7 +326,7 @@ int main (int argc, char const* const* argv)
|
||||
cdit != definitions.Map.end();
|
||||
++cdit )
|
||||
{
|
||||
globalMF->AddDefinition(cdit->first.c_str(), cdit->second.c_str());
|
||||
globalMF->AddDefinition(cdit->first, cdit->second.c_str());
|
||||
}
|
||||
|
||||
const char* cpackModulesPath =
|
||||
|
@ -241,11 +241,11 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
|
||||
{
|
||||
// Make the generator available for the Build call below.
|
||||
cm.SetGlobalGenerator(cm.CreateGlobalGenerator(
|
||||
this->BuildGenerator.c_str()));
|
||||
this->BuildGenerator));
|
||||
cm.SetGeneratorToolset(this->BuildGeneratorToolset);
|
||||
|
||||
// Load the cache to make CMAKE_MAKE_PROGRAM available.
|
||||
cm.GetCacheManager()->LoadCache(this->BinaryDir.c_str());
|
||||
cm.GetCacheManager()->LoadCache(this->BinaryDir);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -295,9 +295,9 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
|
||||
config = "Debug";
|
||||
}
|
||||
int retVal = cm.GetGlobalGenerator()->Build(
|
||||
this->SourceDir.c_str(), this->BinaryDir.c_str(),
|
||||
this->BuildProject.c_str(), tarIt->c_str(),
|
||||
&output, this->BuildMakeProgram.c_str(),
|
||||
this->SourceDir, this->BinaryDir,
|
||||
this->BuildProject, *tarIt,
|
||||
&output, this->BuildMakeProgram,
|
||||
config,
|
||||
!this->BuildNoClean,
|
||||
false, remainingTime);
|
||||
|
@ -151,7 +151,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
|
||||
"\n"
|
||||
"Alternatively, set CTEST_BUILD_COMMAND to build the project "
|
||||
"with a custom command line.";
|
||||
this->SetError(ostr.str().c_str());
|
||||
this->SetError(ostr.str());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
|
||||
cmOStringStream e;
|
||||
e << "CMakeLists.txt file does not exist ["
|
||||
<< cmakelists_file << "]";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ void cmCTestCoverageHandler::CleanCoverageLogFiles(std::ostream& log)
|
||||
logGlob += this->CTest->GetCurrentTag();
|
||||
logGlob += "/CoverageLog*";
|
||||
cmsys::Glob gl;
|
||||
gl.FindFiles(logGlob.c_str());
|
||||
gl.FindFiles(logGlob);
|
||||
std::vector<std::string> const& files = gl.GetFiles();
|
||||
for(std::vector<std::string>::const_iterator fi = files.begin();
|
||||
fi != files.end(); ++fi)
|
||||
@ -241,7 +241,7 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file,
|
||||
bool buildSubDir = cmSystemTools::IsSubDirectory(fFile.c_str(),
|
||||
fBinDir.c_str());
|
||||
// Always check parent directory of the file.
|
||||
std::string fileDir = cmSystemTools::GetFilenamePath(fFile.c_str());
|
||||
std::string fileDir = cmSystemTools::GetFilenamePath(fFile);
|
||||
std::string checkDir;
|
||||
|
||||
// We also need to check the binary/source directory pair.
|
||||
@ -296,7 +296,7 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file,
|
||||
checkDir = fSrcDir;
|
||||
}
|
||||
fFile = checkDir + "/" + relPath;
|
||||
fFile = cmSystemTools::GetFilenamePath(fFile.c_str());
|
||||
fFile = cmSystemTools::GetFilenamePath(fFile);
|
||||
|
||||
if ( fileDir == fFile )
|
||||
{
|
||||
@ -503,7 +503,7 @@ int cmCTestCoverageHandler::ProcessHandler()
|
||||
}
|
||||
|
||||
const std::string fileName
|
||||
= cmSystemTools::GetFilenameName(fullFileName.c_str());
|
||||
= cmSystemTools::GetFilenameName(fullFileName);
|
||||
std::string shortFileName =
|
||||
this->CTest->GetShortPathToFile(fullFileName.c_str());
|
||||
const cmCTestCoverageHandlerContainer::SingleFileCoverageVector& fcov
|
||||
@ -947,7 +947,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
||||
|
||||
// Call gcov to get coverage data for this *.gcda file:
|
||||
//
|
||||
std::string fileDir = cmSystemTools::GetFilenamePath(it->c_str());
|
||||
std::string fileDir = cmSystemTools::GetFilenamePath(*it);
|
||||
std::string command = "\"" + gcovCommand + "\" " +
|
||||
gcovExtraFlags + " " +
|
||||
"-o \"" + fileDir + "\" " +
|
||||
@ -1814,7 +1814,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
|
||||
total_tested += functionsCalled;
|
||||
total_untested += (totalFunctions - functionsCalled);
|
||||
|
||||
std::string fileName = cmSystemTools::GetFilenameName(file.c_str());
|
||||
std::string fileName = cmSystemTools::GetFilenameName(file);
|
||||
std::string shortFileName =
|
||||
this->CTest->GetShortPathToFile(file.c_str());
|
||||
|
||||
|
@ -26,7 +26,7 @@ bool cmCTestEmptyBinaryDirectoryCommand
|
||||
{
|
||||
cmOStringStream ostr;
|
||||
ostr << "problem removing the binary directory: " << args[0].c_str();
|
||||
this->SetError(ostr.str().c_str());
|
||||
this->SetError(ostr.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ void cmCTestGenericHandler::Initialize()
|
||||
it != this->PersistentOptions.end();
|
||||
++ it )
|
||||
{
|
||||
this->Options[it->first.c_str()] = it->second.c_str();
|
||||
this->Options[it->first] = it->second.c_str();
|
||||
}
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ bool cmCTestGenericHandler::StartResultingXML(cmCTest::Part part,
|
||||
return false;
|
||||
}
|
||||
if( !this->CTest->OpenOutputFile(this->CTest->GetCurrentTag(),
|
||||
ostr.str().c_str(), xofs, true) )
|
||||
ostr.str(), xofs, true) )
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot create resulting XML file: " << ostr.str().c_str()
|
||||
@ -153,7 +153,7 @@ bool cmCTestGenericHandler::StartLogFile(const char* name,
|
||||
ostr << "_" << this->CTest->GetCurrentTag();
|
||||
}
|
||||
ostr << ".log";
|
||||
if( !this->CTest->OpenOutputFile("Temporary", ostr.str().c_str(), xofs) )
|
||||
if( !this->CTest->OpenOutputFile("Temporary", ostr.str(), xofs) )
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create log file: "
|
||||
<< ostr.str().c_str() << std::endl);
|
||||
|
@ -48,7 +48,7 @@ bool cmCTestHandlerCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "called with unknown argument \"" << args[i] << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -680,8 +680,8 @@ bool cmCTestLaunch::ScrapeLog(std::string const& fname)
|
||||
continue;
|
||||
}
|
||||
|
||||
if(this->Match(line.c_str(), this->RegexWarning) &&
|
||||
!this->Match(line.c_str(), this->RegexWarningSuppress))
|
||||
if(this->Match(line, this->RegexWarning) &&
|
||||
!this->Match(line, this->RegexWarningSuppress))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -352,7 +352,7 @@ void cmCTestP4::SetP4Options(std::vector<char const*> &CommandOptions)
|
||||
for(std::vector<std::string>::const_iterator ai = args.begin();
|
||||
ai != args.end(); ++ai)
|
||||
{
|
||||
P4Options.push_back(ai->c_str());
|
||||
P4Options.push_back(*ai);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ bool cmCTestRunScriptCommand
|
||||
&ret);
|
||||
cmOStringStream str;
|
||||
str << ret;
|
||||
this->Makefile->AddDefinition(returnVariable.c_str(), str.str().c_str());
|
||||
this->Makefile->AddDefinition(returnVariable, str.str().c_str());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -337,8 +337,8 @@ void cmCTestScriptHandler::CreateCMake()
|
||||
// Set CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR.
|
||||
// Also, some commands need Makefile->GetCurrentDirectory().
|
||||
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
||||
this->Makefile->SetStartDirectory(cwd.c_str());
|
||||
this->Makefile->SetStartOutputDirectory(cwd.c_str());
|
||||
this->Makefile->SetStartDirectory(cwd);
|
||||
this->Makefile->SetStartOutputDirectory(cwd);
|
||||
|
||||
// remove all cmake commands which are not scriptable, since they can't be
|
||||
// used in ctest scripts
|
||||
@ -436,7 +436,7 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
|
||||
for (std::map<std::string, std::string>::const_iterator it = defs.begin();
|
||||
it != defs.end(); ++it)
|
||||
{
|
||||
this->Makefile->AddDefinition(it->first.c_str(), it->second.c_str());
|
||||
this->Makefile->AddDefinition(it->first, it->second.c_str());
|
||||
}
|
||||
|
||||
// finally read in the script
|
||||
@ -646,7 +646,7 @@ int cmCTestScriptHandler::RunCurrentScript()
|
||||
if (!this->CTestEnv.empty())
|
||||
{
|
||||
std::vector<std::string> envArgs;
|
||||
cmSystemTools::ExpandListArgument(this->CTestEnv.c_str(),envArgs);
|
||||
cmSystemTools::ExpandListArgument(this->CTestEnv,envArgs);
|
||||
cmSystemTools::AppendEnv(envArgs);
|
||||
}
|
||||
|
||||
@ -772,7 +772,7 @@ int cmCTestScriptHandler::PerformExtraUpdates()
|
||||
++ it )
|
||||
{
|
||||
std::vector<std::string> cvsArgs;
|
||||
cmSystemTools::ExpandListArgument(it->c_str(),cvsArgs);
|
||||
cmSystemTools::ExpandListArgument(*it,cvsArgs);
|
||||
if (cvsArgs.size() == 2)
|
||||
{
|
||||
std::string fullCommand = command;
|
||||
|
@ -131,7 +131,7 @@ bool cmCTestStartCommand
|
||||
<< " " << sourceDir << "\n"
|
||||
<< "which is not an existing directory. "
|
||||
<< "Set CTEST_CHECKOUT_COMMAND to a command line to create it.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -160,7 +160,7 @@ bool cmCTestStartCommand::InitialCheckout(
|
||||
{
|
||||
// Use a generic VC object to run and log the command.
|
||||
cmCTestVC vc(this->CTest, ofs);
|
||||
vc.SetSourceDirectory(sourceDir.c_str());
|
||||
vc.SetSourceDirectory(sourceDir);
|
||||
if(!vc.InitialCheckout(initialCheckoutCommand))
|
||||
{
|
||||
return false;
|
||||
|
@ -339,7 +339,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
||||
std::string dropMethod(this->CTest->GetCTestConfiguration("DropMethod"));
|
||||
std::string curlopt(this->CTest->GetCTestConfiguration("CurlOptions"));
|
||||
std::vector<std::string> args;
|
||||
cmSystemTools::ExpandListArgument(curlopt.c_str(), args);
|
||||
cmSystemTools::ExpandListArgument(curlopt, args);
|
||||
bool verifyPeerOff = false;
|
||||
bool verifyHostOff = false;
|
||||
for( std::vector<std::string>::iterator i = args.begin();
|
||||
@ -461,7 +461,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
||||
else
|
||||
{
|
||||
char md5[33];
|
||||
cmSystemTools::ComputeFileMD5(local_file.c_str(), md5);
|
||||
cmSystemTools::ComputeFileMD5(local_file, md5);
|
||||
md5[32] = 0;
|
||||
upload_as += md5;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ bool cmCTestSubdirCommand
|
||||
{
|
||||
std::string m = "Could not find include file: ";
|
||||
m += fname;
|
||||
this->SetError(m.c_str());
|
||||
this->SetError(m);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -213,7 +213,7 @@ bool cmCTestAddSubdirectoryCommand
|
||||
{
|
||||
std::string m = "Could not find include file: ";
|
||||
m += fname;
|
||||
this->SetError(m.c_str());
|
||||
this->SetError(m);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -1506,7 +1506,7 @@ std::string cmCTestTestHandler
|
||||
// then try with the exe extension
|
||||
else
|
||||
{
|
||||
failed.push_back(attempted[ai].c_str());
|
||||
failed.push_back(attempted[ai]);
|
||||
tempPath = attempted[ai];
|
||||
tempPath += cmSystemTools::GetExecutableExtension();
|
||||
if(cmSystemTools::FileExists(tempPath.c_str())
|
||||
@ -1517,7 +1517,7 @@ std::string cmCTestTestHandler
|
||||
}
|
||||
else
|
||||
{
|
||||
failed.push_back(tempPath.c_str());
|
||||
failed.push_back(tempPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2154,7 +2154,7 @@ bool cmCTestTestHandler::SetTestsProperties(
|
||||
if ( key == "ATTACHED_FILES" )
|
||||
{
|
||||
std::vector<std::string> lval;
|
||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
||||
cmSystemTools::ExpandListArgument(val, lval);
|
||||
|
||||
for(std::vector<std::string>::iterator f = lval.begin();
|
||||
f != lval.end(); ++f)
|
||||
@ -2165,7 +2165,7 @@ bool cmCTestTestHandler::SetTestsProperties(
|
||||
if ( key == "ATTACHED_FILES_ON_FAIL" )
|
||||
{
|
||||
std::vector<std::string> lval;
|
||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
||||
cmSystemTools::ExpandListArgument(val, lval);
|
||||
|
||||
for(std::vector<std::string>::iterator f = lval.begin();
|
||||
f != lval.end(); ++f)
|
||||
@ -2176,7 +2176,7 @@ bool cmCTestTestHandler::SetTestsProperties(
|
||||
if ( key == "RESOURCE_LOCK" )
|
||||
{
|
||||
std::vector<std::string> lval;
|
||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
||||
cmSystemTools::ExpandListArgument(val, lval);
|
||||
|
||||
for(std::vector<std::string>::iterator f = lval.begin();
|
||||
f != lval.end(); ++f)
|
||||
@ -2196,7 +2196,7 @@ bool cmCTestTestHandler::SetTestsProperties(
|
||||
if ( key == "REQUIRED_FILES" )
|
||||
{
|
||||
std::vector<std::string> lval;
|
||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
||||
cmSystemTools::ExpandListArgument(val, lval);
|
||||
|
||||
for(std::vector<std::string>::iterator f = lval.begin();
|
||||
f != lval.end(); ++f)
|
||||
@ -2211,14 +2211,14 @@ bool cmCTestTestHandler::SetTestsProperties(
|
||||
if ( key == "FAIL_REGULAR_EXPRESSION" )
|
||||
{
|
||||
std::vector<std::string> lval;
|
||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
||||
cmSystemTools::ExpandListArgument(val, lval);
|
||||
std::vector<std::string>::iterator crit;
|
||||
for ( crit = lval.begin(); crit != lval.end(); ++ crit )
|
||||
{
|
||||
rtit->ErrorRegularExpressions.push_back(
|
||||
std::pair<cmsys::RegularExpression, std::string>(
|
||||
cmsys::RegularExpression(crit->c_str()),
|
||||
std::string(crit->c_str())));
|
||||
std::string(*crit)));
|
||||
}
|
||||
}
|
||||
if ( key == "PROCESSORS" )
|
||||
@ -2240,7 +2240,7 @@ bool cmCTestTestHandler::SetTestsProperties(
|
||||
if ( key == "DEPENDS" )
|
||||
{
|
||||
std::vector<std::string> lval;
|
||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
||||
cmSystemTools::ExpandListArgument(val, lval);
|
||||
std::vector<std::string>::iterator crit;
|
||||
for ( crit = lval.begin(); crit != lval.end(); ++ crit )
|
||||
{
|
||||
@ -2250,7 +2250,7 @@ bool cmCTestTestHandler::SetTestsProperties(
|
||||
if ( key == "ENVIRONMENT" )
|
||||
{
|
||||
std::vector<std::string> lval;
|
||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
||||
cmSystemTools::ExpandListArgument(val, lval);
|
||||
std::vector<std::string>::iterator crit;
|
||||
for ( crit = lval.begin(); crit != lval.end(); ++ crit )
|
||||
{
|
||||
@ -2260,7 +2260,7 @@ bool cmCTestTestHandler::SetTestsProperties(
|
||||
if ( key == "LABELS" )
|
||||
{
|
||||
std::vector<std::string> lval;
|
||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
||||
cmSystemTools::ExpandListArgument(val, lval);
|
||||
std::vector<std::string>::iterator crit;
|
||||
for ( crit = lval.begin(); crit != lval.end(); ++ crit )
|
||||
{
|
||||
@ -2284,14 +2284,14 @@ bool cmCTestTestHandler::SetTestsProperties(
|
||||
if ( key == "PASS_REGULAR_EXPRESSION" )
|
||||
{
|
||||
std::vector<std::string> lval;
|
||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
||||
cmSystemTools::ExpandListArgument(val, lval);
|
||||
std::vector<std::string>::iterator crit;
|
||||
for ( crit = lval.begin(); crit != lval.end(); ++ crit )
|
||||
{
|
||||
rtit->RequiredRegularExpressions.push_back(
|
||||
std::pair<cmsys::RegularExpression, std::string>(
|
||||
cmsys::RegularExpression(crit->c_str()),
|
||||
std::string(crit->c_str())));
|
||||
std::string(*crit)));
|
||||
}
|
||||
}
|
||||
if ( key == "WORKING_DIRECTORY" )
|
||||
|
@ -122,7 +122,7 @@ bool cmParseMumpsCoverage::LoadPackages(const char* d)
|
||||
glob.RecurseOn();
|
||||
std::string pat = d;
|
||||
pat += "/*.m";
|
||||
glob.FindFiles(pat.c_str());
|
||||
glob.FindFiles(pat);
|
||||
std::vector<std::string>& files = glob.GetFiles();
|
||||
std::vector<std::string>::iterator fileIt;
|
||||
for ( fileIt = files.begin(); fileIt != files.end();
|
||||
|
@ -19,7 +19,7 @@ cmCursesLabelWidget::cmCursesLabelWidget(int width, int height,
|
||||
field_opts_off(this->Field, O_EDIT);
|
||||
field_opts_off(this->Field, O_ACTIVE);
|
||||
field_opts_off(this->Field, O_STATIC);
|
||||
this->SetValue(name.c_str());
|
||||
this->SetValue(name);
|
||||
}
|
||||
|
||||
cmCursesLabelWidget::~cmCursesLabelWidget()
|
||||
|
@ -74,7 +74,7 @@ void cmCursesOptionsWidget::NextOption()
|
||||
{
|
||||
this->CurrentOption = 0;
|
||||
}
|
||||
this->SetValue(this->Options[this->CurrentOption].c_str());
|
||||
this->SetValue(this->Options[this->CurrentOption]);
|
||||
}
|
||||
void cmCursesOptionsWidget::PreviousOption()
|
||||
{
|
||||
@ -86,7 +86,7 @@ void cmCursesOptionsWidget::PreviousOption()
|
||||
{
|
||||
this->CurrentOption--;
|
||||
}
|
||||
this->SetValue(this->Options[this->CurrentOption].c_str());
|
||||
this->SetValue(this->Options[this->CurrentOption]);
|
||||
}
|
||||
|
||||
void cmCursesOptionsWidget::SetOption(const std::string& value)
|
||||
|
@ -59,7 +59,7 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w)
|
||||
}
|
||||
std::vector<std::string> dirs;
|
||||
|
||||
cmSystemTools::SimpleGlob(glob.c_str(), dirs, (this->Type == cmCacheManager::PATH?-1:0));
|
||||
cmSystemTools::SimpleGlob(glob, dirs, (this->Type == cmCacheManager::PATH?-1:0));
|
||||
if ( this->CurrentIndex < dirs.size() )
|
||||
{
|
||||
cstr = dirs[this->CurrentIndex];
|
||||
@ -74,7 +74,7 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w)
|
||||
cstr += "/";
|
||||
}
|
||||
|
||||
this->SetString(cstr.c_str());
|
||||
this->SetString(cstr);
|
||||
touchwin(w);
|
||||
wrefresh(w);
|
||||
form_driver(form, REQ_END_FIELD);
|
||||
|
@ -273,7 +273,7 @@ bool cmAddCustomCommandCommand
|
||||
{
|
||||
// Lookup an existing command.
|
||||
if(cmSourceFile* sf =
|
||||
this->Makefile->GetSourceFileWithOutput(output[0].c_str()))
|
||||
this->Makefile->GetSourceFileWithOutput(output[0]))
|
||||
{
|
||||
if(cmCustomCommand* cc = sf->GetCustomCommand())
|
||||
{
|
||||
@ -288,7 +288,7 @@ bool cmAddCustomCommandCommand
|
||||
cmOStringStream e;
|
||||
e << "given APPEND option with output \"" << output[0].c_str()
|
||||
<< "\" which is not already a custom command output.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -305,7 +305,7 @@ bool cmAddCustomCommandCommand
|
||||
{
|
||||
// Source is empty, use the target.
|
||||
std::vector<std::string> no_depends;
|
||||
this->Makefile->AddCustomCommandToTarget(target.c_str(), no_depends,
|
||||
this->Makefile->AddCustomCommandToTarget(target, no_depends,
|
||||
commandLines, cctype,
|
||||
comment, working.c_str(),
|
||||
escapeOldStyle);
|
||||
@ -314,7 +314,7 @@ bool cmAddCustomCommandCommand
|
||||
{
|
||||
// Target is empty, use the output.
|
||||
this->Makefile->AddCustomCommandToOutput(output, depends,
|
||||
main_dependency.c_str(),
|
||||
main_dependency,
|
||||
commandLines, comment,
|
||||
working.c_str(), false,
|
||||
escapeOldStyle);
|
||||
@ -324,7 +324,7 @@ bool cmAddCustomCommandCommand
|
||||
{
|
||||
bool okay = false;
|
||||
if(cmSourceFile* sf =
|
||||
this->Makefile->GetSourceFileWithOutput(output[0].c_str()))
|
||||
this->Makefile->GetSourceFileWithOutput(output[0]))
|
||||
{
|
||||
if(cmCustomCommand* cc = sf->GetCustomCommand())
|
||||
{
|
||||
@ -337,7 +337,7 @@ bool cmAddCustomCommandCommand
|
||||
cmOStringStream e;
|
||||
e << "could not locate source file with a custom command producing \""
|
||||
<< output[0] << "\" even though this command tried to create it!";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -367,7 +367,7 @@ bool cmAddCustomCommandCommand
|
||||
{
|
||||
e << "The SOURCE signatures of add_custom_command are no longer "
|
||||
"supported.";
|
||||
this->Makefile->IssueMessage(messageType, e.str().c_str());
|
||||
this->Makefile->IssueMessage(messageType, e.str());
|
||||
if (messageType == cmake::FATAL_ERROR)
|
||||
{
|
||||
return false;
|
||||
@ -375,8 +375,8 @@ bool cmAddCustomCommandCommand
|
||||
}
|
||||
|
||||
// Use the old-style mode for backward compatibility.
|
||||
this->Makefile->AddCustomCommandOldStyle(target.c_str(), outputs, depends,
|
||||
source.c_str(), commandLines,
|
||||
this->Makefile->AddCustomCommandOldStyle(target, outputs, depends,
|
||||
source, commandLines,
|
||||
comment);
|
||||
}
|
||||
|
||||
@ -397,7 +397,7 @@ cmAddCustomCommandCommand
|
||||
{
|
||||
std::string e = "attempted to have a file \"" + *o +
|
||||
"\" in a source directory as an output of custom command.";
|
||||
this->SetError(e.c_str());
|
||||
this->SetError(e);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
return false;
|
||||
}
|
||||
@ -409,7 +409,7 @@ cmAddCustomCommandCommand
|
||||
cmOStringStream msg;
|
||||
msg << "called with OUTPUT containing a \"" << (*o)[pos]
|
||||
<< "\". This character is not allowed.";
|
||||
this->SetError(msg.str().c_str());
|
||||
this->SetError(msg.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ bool cmAddCustomTargetCommand
|
||||
e << "called with invalid target name \"" << targetName
|
||||
<< "\". Target names may not contain a slash. "
|
||||
<< "Use ADD_CUSTOM_COMMAND to generate files.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -149,7 +149,7 @@ bool cmAddCustomTargetCommand
|
||||
cmOStringStream msg;
|
||||
msg << "called with target name containing a \"" << targetName[pos]
|
||||
<< "\". This character is not allowed.";
|
||||
this->SetError(msg.str().c_str());
|
||||
this->SetError(msg.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -187,7 +187,7 @@ bool cmAddCustomTargetCommand
|
||||
"\" is reserved or not valid for certain "
|
||||
"CMake features, such as generator expressions, and may result "
|
||||
"in undefined behavior.";
|
||||
this->Makefile->IssueMessage(messageType, e.str().c_str());
|
||||
this->Makefile->IssueMessage(messageType, e.str());
|
||||
|
||||
if (messageType == cmake::FATAL_ERROR)
|
||||
{
|
||||
@ -208,7 +208,7 @@ bool cmAddCustomTargetCommand
|
||||
std::string msg;
|
||||
if(!this->Makefile->EnforceUniqueName(targetName, msg, true))
|
||||
{
|
||||
this->SetError(msg.c_str());
|
||||
this->SetError(msg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -224,7 +224,7 @@ bool cmAddCustomTargetCommand
|
||||
// Add the utility target to the makefile.
|
||||
bool escapeOldStyle = !verbatim;
|
||||
cmTarget* target =
|
||||
this->Makefile->AddUtilityCommand(targetName.c_str(), excludeFromAll,
|
||||
this->Makefile->AddUtilityCommand(targetName, excludeFromAll,
|
||||
working_directory.c_str(), depends,
|
||||
commandLines, escapeOldStyle, comment);
|
||||
|
||||
|
@ -38,7 +38,7 @@ bool cmAddDependenciesCommand
|
||||
cmOStringStream e;
|
||||
e << "Cannot add target-level dependencies to INTERFACE library "
|
||||
"target \"" << target_name << "\".\n";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ bool cmAddDependenciesCommand
|
||||
++s; // skip over target_name
|
||||
for (; s != args.end(); ++s)
|
||||
{
|
||||
target->AddUtility(s->c_str(), this->Makefile);
|
||||
target->AddUtility(*s, this->Makefile);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -101,7 +101,7 @@ bool cmAddExecutableCommand
|
||||
"\" is reserved or not valid for certain "
|
||||
"CMake features, such as generator expressions, and may result "
|
||||
"in undefined behavior.";
|
||||
this->Makefile->IssueMessage(messageType, e.str().c_str());
|
||||
this->Makefile->IssueMessage(messageType, e.str());
|
||||
|
||||
if (messageType == cmake::FATAL_ERROR)
|
||||
{
|
||||
@ -132,9 +132,9 @@ bool cmAddExecutableCommand
|
||||
}
|
||||
if (isAlias)
|
||||
{
|
||||
if(!cmGeneratorExpression::IsValidTargetName(exename.c_str()))
|
||||
if(!cmGeneratorExpression::IsValidTargetName(exename))
|
||||
{
|
||||
this->SetError(("Invalid name for ALIAS: " + exename).c_str());
|
||||
this->SetError("Invalid name for ALIAS: " + exename);
|
||||
return false;
|
||||
}
|
||||
if(excludeFromAll)
|
||||
@ -151,7 +151,7 @@ bool cmAddExecutableCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "ALIAS requires exactly one target argument.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -161,7 +161,7 @@ bool cmAddExecutableCommand
|
||||
cmOStringStream e;
|
||||
e << "cannot create ALIAS target \"" << exename
|
||||
<< "\" because target \"" << aliasedName << "\" is itself an ALIAS.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
cmTarget *aliasedTarget =
|
||||
@ -172,7 +172,7 @@ bool cmAddExecutableCommand
|
||||
e << "cannot create ALIAS target \"" << exename
|
||||
<< "\" because target \"" << aliasedName << "\" does not already "
|
||||
"exist.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
cmTarget::TargetType type = aliasedTarget->GetType();
|
||||
@ -182,7 +182,7 @@ bool cmAddExecutableCommand
|
||||
e << "cannot create ALIAS target \"" << exename
|
||||
<< "\" because target \"" << aliasedName << "\" is not an "
|
||||
"executable.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
if(aliasedTarget->IsImported())
|
||||
@ -190,10 +190,10 @@ bool cmAddExecutableCommand
|
||||
cmOStringStream e;
|
||||
e << "cannot create ALIAS target \"" << exename
|
||||
<< "\" because target \"" << aliasedName << "\" is IMPORTED.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
this->Makefile->AddAlias(exename.c_str(), aliasedTarget);
|
||||
this->Makefile->AddAlias(exename, aliasedTarget);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -206,12 +206,12 @@ bool cmAddExecutableCommand
|
||||
cmOStringStream e;
|
||||
e << "cannot create imported target \"" << exename
|
||||
<< "\" because another target with the same name already exists.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
// Create the imported target.
|
||||
this->Makefile->AddImportedTarget(exename.c_str(), cmTarget::EXECUTABLE,
|
||||
this->Makefile->AddImportedTarget(exename, cmTarget::EXECUTABLE,
|
||||
importGlobal);
|
||||
return true;
|
||||
}
|
||||
@ -221,7 +221,7 @@ bool cmAddExecutableCommand
|
||||
std::string msg;
|
||||
if(!this->Makefile->EnforceUniqueName(exename, msg))
|
||||
{
|
||||
this->SetError(msg.c_str());
|
||||
this->SetError(msg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ bool cmAddLibraryCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "INTERFACE library specified with conflicting STATIC type.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
++s;
|
||||
@ -66,7 +66,7 @@ bool cmAddLibraryCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "INTERFACE library specified with conflicting SHARED type.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
++s;
|
||||
@ -79,7 +79,7 @@ bool cmAddLibraryCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "INTERFACE library specified with conflicting MODULE type.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
++s;
|
||||
@ -92,7 +92,7 @@ bool cmAddLibraryCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "INTERFACE library specified with conflicting OBJECT type.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
++s;
|
||||
@ -105,7 +105,7 @@ bool cmAddLibraryCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "INTERFACE library specified with conflicting UNKNOWN type.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
++s;
|
||||
@ -118,7 +118,7 @@ bool cmAddLibraryCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "INTERFACE library specified with conflicting ALIAS type.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
++s;
|
||||
@ -130,21 +130,21 @@ bool cmAddLibraryCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "INTERFACE library specified with conflicting/multiple types.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
if (isAlias)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "INTERFACE library specified with conflicting ALIAS type.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
if (excludeFromAll)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "INTERFACE library may not be used with EXCLUDE_FROM_ALL.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
++s;
|
||||
@ -157,7 +157,7 @@ bool cmAddLibraryCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "INTERFACE library may not be used with EXCLUDE_FROM_ALL.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
++s;
|
||||
@ -177,7 +177,7 @@ bool cmAddLibraryCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "GLOBAL option may only be used with IMPORTED libraries.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@ -192,14 +192,14 @@ bool cmAddLibraryCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "INTERFACE library requires no source arguments.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
if (importGlobal && !importTarget)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "INTERFACE library specified as GLOBAL, but not as IMPORTED.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -236,7 +236,7 @@ bool cmAddLibraryCommand
|
||||
"\" is reserved or not valid for certain "
|
||||
"CMake features, such as generator expressions, and may result "
|
||||
"in undefined behavior.";
|
||||
this->Makefile->IssueMessage(messageType, e.str().c_str());
|
||||
this->Makefile->IssueMessage(messageType, e.str());
|
||||
|
||||
if (messageType == cmake::FATAL_ERROR)
|
||||
{
|
||||
@ -247,9 +247,9 @@ bool cmAddLibraryCommand
|
||||
|
||||
if (isAlias)
|
||||
{
|
||||
if(!cmGeneratorExpression::IsValidTargetName(libName.c_str()))
|
||||
if(!cmGeneratorExpression::IsValidTargetName(libName))
|
||||
{
|
||||
this->SetError(("Invalid name for ALIAS: " + libName).c_str());
|
||||
this->SetError("Invalid name for ALIAS: " + libName);
|
||||
return false;
|
||||
}
|
||||
if(excludeFromAll)
|
||||
@ -266,7 +266,7 @@ bool cmAddLibraryCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "ALIAS requires exactly one target argument.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -276,7 +276,7 @@ bool cmAddLibraryCommand
|
||||
cmOStringStream e;
|
||||
e << "cannot create ALIAS target \"" << libName
|
||||
<< "\" because target \"" << aliasedName << "\" is itself an ALIAS.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
cmTarget *aliasedTarget =
|
||||
@ -287,7 +287,7 @@ bool cmAddLibraryCommand
|
||||
e << "cannot create ALIAS target \"" << libName
|
||||
<< "\" because target \"" << aliasedName << "\" does not already "
|
||||
"exist.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
cmTarget::TargetType aliasedType = aliasedTarget->GetType();
|
||||
@ -300,7 +300,7 @@ bool cmAddLibraryCommand
|
||||
cmOStringStream e;
|
||||
e << "cannot create ALIAS target \"" << libName
|
||||
<< "\" because target \"" << aliasedName << "\" is not a library.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
if(aliasedTarget->IsImported())
|
||||
@ -308,10 +308,10 @@ bool cmAddLibraryCommand
|
||||
cmOStringStream e;
|
||||
e << "cannot create ALIAS target \"" << libName
|
||||
<< "\" because target \"" << aliasedName << "\" is IMPORTED.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
this->Makefile->AddAlias(libName.c_str(), aliasedTarget);
|
||||
this->Makefile->AddAlias(libName, aliasedTarget);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -364,7 +364,7 @@ bool cmAddLibraryCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "Invalid name for IMPORTED INTERFACE library target: " << libName;
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -375,12 +375,12 @@ bool cmAddLibraryCommand
|
||||
cmOStringStream e;
|
||||
e << "cannot create imported target \"" << libName
|
||||
<< "\" because another target with the same name already exists.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
// Create the imported target.
|
||||
this->Makefile->AddImportedTarget(libName.c_str(), type, importGlobal);
|
||||
this->Makefile->AddImportedTarget(libName, type, importGlobal);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -399,7 +399,7 @@ bool cmAddLibraryCommand
|
||||
std::string msg;
|
||||
if(!this->Makefile->EnforceUniqueName(libName, msg))
|
||||
{
|
||||
this->SetError(msg.c_str());
|
||||
this->SetError(msg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -413,11 +413,11 @@ bool cmAddLibraryCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "Invalid name for INTERFACE library target: " << libName;
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
this->Makefile->AddLibrary(libName.c_str(),
|
||||
this->Makefile->AddLibrary(libName,
|
||||
type,
|
||||
srclists,
|
||||
excludeFromAll);
|
||||
@ -439,7 +439,7 @@ bool cmAddLibraryCommand
|
||||
++s;
|
||||
}
|
||||
|
||||
this->Makefile->AddLibrary(libName.c_str(), type, srclists, excludeFromAll);
|
||||
this->Makefile->AddLibrary(libName, type, srclists, excludeFromAll);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ bool cmAddSubDirectoryCommand::InitialPass
|
||||
std::string error = "given source \"";
|
||||
error += srcArg;
|
||||
error += "\" which is not an existing directory.";
|
||||
this->SetError(error.c_str());
|
||||
this->SetError(error);
|
||||
return false;
|
||||
}
|
||||
srcPath = cmSystemTools::CollapseFullPath(srcPath.c_str());
|
||||
@ -87,7 +87,7 @@ bool cmAddSubDirectoryCommand::InitialPass
|
||||
<< this->Makefile->GetCurrentDirectory() << "\". "
|
||||
<< "When specifying an out-of-tree source a binary directory "
|
||||
<< "must be explicitly specified.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ bool cmAddSubDirectoryCommand::InitialPass
|
||||
binPath = cmSystemTools::CollapseFullPath(binPath.c_str());
|
||||
|
||||
// Add the subdirectory using the computed full paths.
|
||||
this->Makefile->AddSubDirectory(srcPath.c_str(), binPath.c_str(),
|
||||
this->Makefile->AddSubDirectory(srcPath, binPath,
|
||||
excludeFromAll, false, true);
|
||||
|
||||
return true;
|
||||
|
@ -44,7 +44,7 @@ bool cmAddTestCommand
|
||||
|
||||
// Create the test but add a generator only the first time it is
|
||||
// seen. This preserves behavior from before test generators.
|
||||
cmTest* test = this->Makefile->GetTest(args[0].c_str());
|
||||
cmTest* test = this->Makefile->GetTest(args[0]);
|
||||
if(test)
|
||||
{
|
||||
// If the test was already added by a new-style signature do not
|
||||
@ -54,13 +54,13 @@ bool cmAddTestCommand
|
||||
cmOStringStream e;
|
||||
e << " given test name \"" << args[0]
|
||||
<< "\" which already exists in this directory.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
test = this->Makefile->CreateTest(args[0].c_str());
|
||||
test = this->Makefile->CreateTest(args[0]);
|
||||
test->SetOldStyle(true);
|
||||
this->Makefile->AddTestGenerator(new cmTestGenerator(test));
|
||||
}
|
||||
@ -137,7 +137,7 @@ bool cmAddTestCommand::HandleNameMode(std::vector<std::string> const& args)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << " given unknown argument:\n " << args[i] << "\n";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -157,17 +157,17 @@ bool cmAddTestCommand::HandleNameMode(std::vector<std::string> const& args)
|
||||
}
|
||||
|
||||
// Require a unique test name within the directory.
|
||||
if(this->Makefile->GetTest(name.c_str()))
|
||||
if(this->Makefile->GetTest(name))
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << " given test NAME \"" << name
|
||||
<< "\" which already exists in this directory.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
// Add the test.
|
||||
cmTest* test = this->Makefile->CreateTest(name.c_str());
|
||||
cmTest* test = this->Makefile->CreateTest(name);
|
||||
test->SetOldStyle(false);
|
||||
test->SetCommand(command);
|
||||
if(!working_directory.empty())
|
||||
|
@ -40,7 +40,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass
|
||||
}
|
||||
|
||||
// was the list already populated
|
||||
const char *def = this->Makefile->GetDefinition(args[1].c_str());
|
||||
const char *def = this->Makefile->GetDefinition(args[1]);
|
||||
if (def)
|
||||
{
|
||||
sourceListValue = def;
|
||||
@ -72,7 +72,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass
|
||||
// add the file as a class file so
|
||||
// depends can be done
|
||||
cmSourceFile* sf =
|
||||
this->Makefile->GetOrCreateSource(fullname.c_str());
|
||||
this->Makefile->GetOrCreateSource(fullname);
|
||||
sf->SetProperty("ABSTRACT","0");
|
||||
if(!sourceListValue.empty())
|
||||
{
|
||||
@ -83,7 +83,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass
|
||||
}
|
||||
}
|
||||
}
|
||||
this->Makefile->AddDefinition(args[1].c_str(), sourceListValue.c_str());
|
||||
this->Makefile->AddDefinition(args[1], sourceListValue.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ bool cmBuildCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "unknown argument \"" << args[i] << "\"";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -136,7 +136,7 @@ bool cmBuildCommand
|
||||
}
|
||||
|
||||
std::string makecommand = this->Makefile->GetLocalGenerator()
|
||||
->GetGlobalGenerator()->GenerateCMakeBuildCommand("", configType.c_str(),
|
||||
->GetGlobalGenerator()->GenerateCMakeBuildCommand("", configType,
|
||||
"", true);
|
||||
|
||||
if(cacheValue)
|
||||
|
@ -25,7 +25,7 @@ bool cmBuildNameCommand
|
||||
this->SetError("called with incorrect number of arguments");
|
||||
return false;
|
||||
}
|
||||
const char* cacheValue = this->Makefile->GetDefinition(args[0].c_str());
|
||||
const char* cacheValue = this->Makefile->GetDefinition(args[0]);
|
||||
if(cacheValue)
|
||||
{
|
||||
// do we need to correct the value?
|
||||
@ -36,7 +36,7 @@ bool cmBuildNameCommand
|
||||
cmSystemTools::ReplaceString(cv,"/", "_");
|
||||
cmSystemTools::ReplaceString(cv,"(", "_");
|
||||
cmSystemTools::ReplaceString(cv,")", "_");
|
||||
this->Makefile->AddCacheDefinition(args[0].c_str(),
|
||||
this->Makefile->AddCacheDefinition(args[0],
|
||||
cv.c_str(),
|
||||
"Name of build.",
|
||||
cmCacheManager::STRING);
|
||||
@ -71,7 +71,7 @@ bool cmBuildNameCommand
|
||||
cmSystemTools::ReplaceString(buildname,
|
||||
")", "_");
|
||||
|
||||
this->Makefile->AddCacheDefinition(args[0].c_str(),
|
||||
this->Makefile->AddCacheDefinition(args[0],
|
||||
buildname.c_str(),
|
||||
"Name of build.",
|
||||
cmCacheManager::STRING);
|
||||
|
@ -53,7 +53,7 @@ bool cmCMakeHostSystemInformationCommand
|
||||
result_list += value;
|
||||
}
|
||||
|
||||
this->Makefile->AddDefinition(variable.c_str(), result_list.c_str());
|
||||
this->Makefile->AddDefinition(variable, result_list.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -97,7 +97,7 @@ bool cmCMakeHostSystemInformationCommand
|
||||
else
|
||||
{
|
||||
std::string e = "does not recognize <key> " + key;
|
||||
this->SetError(e.c_str());
|
||||
this->SetError(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ bool cmCMakeMinimumRequired
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "could not parse VERSION \"" << version_string.c_str() << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ bool cmCMakeMinimumRequired::EnforceUnknownArguments()
|
||||
cmOStringStream e;
|
||||
e << "called with unknown argument \""
|
||||
<< this->UnknownArguments[0] << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -58,7 +58,7 @@ bool cmCMakePolicyCommand
|
||||
|
||||
cmOStringStream e;
|
||||
e << "given unknown first argument \"" << args[0] << "\"";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ bool cmCMakePolicyCommand::HandleSetMode(std::vector<std::string> const& args)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "SET given unrecognized policy status \"" << args[2] << "\"";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ bool cmCMakePolicyCommand::HandleGetMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "GET given policy \"" << id << "\" which is not known to this "
|
||||
<< "version of CMake.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -126,15 +126,15 @@ bool cmCMakePolicyCommand::HandleGetMode(std::vector<std::string> const& args)
|
||||
{
|
||||
case cmPolicies::OLD:
|
||||
// Report that the policy is set to OLD.
|
||||
this->Makefile->AddDefinition(var.c_str(), "OLD");
|
||||
this->Makefile->AddDefinition(var, "OLD");
|
||||
break;
|
||||
case cmPolicies::WARN:
|
||||
// Report that the policy is not set.
|
||||
this->Makefile->AddDefinition(var.c_str(), "");
|
||||
this->Makefile->AddDefinition(var, "");
|
||||
break;
|
||||
case cmPolicies::NEW:
|
||||
// Report that the policy is set to NEW.
|
||||
this->Makefile->AddDefinition(var.c_str(), "NEW");
|
||||
this->Makefile->AddDefinition(var, "NEW");
|
||||
break;
|
||||
case cmPolicies::REQUIRED_IF_USED:
|
||||
case cmPolicies::REQUIRED_ALWAYS:
|
||||
|
@ -557,9 +557,9 @@ void CCONV *cmGetSource(void *arg, const char *name)
|
||||
sf->RealSourceFile = rsf;
|
||||
sf->FullPath = rsf->GetFullPath();
|
||||
sf->SourceName =
|
||||
cmSystemTools::GetFilenameWithoutLastExtension(sf->FullPath.c_str());
|
||||
cmSystemTools::GetFilenameWithoutLastExtension(sf->FullPath);
|
||||
sf->SourceExtension =
|
||||
cmSystemTools::GetFilenameLastExtension(sf->FullPath.c_str());
|
||||
cmSystemTools::GetFilenameLastExtension(sf->FullPath);
|
||||
|
||||
// Store the proxy in the map so it can be re-used and deleted later.
|
||||
cmCPluginAPISourceFileMap::value_type entry(rsf, sf);
|
||||
@ -583,7 +583,7 @@ void * CCONV cmAddSource(void *arg, void *arg2)
|
||||
}
|
||||
|
||||
// Create the real cmSourceFile instance and copy over saved information.
|
||||
cmSourceFile* rsf = mf->GetOrCreateSource(osf->FullPath.c_str());
|
||||
cmSourceFile* rsf = mf->GetOrCreateSource(osf->FullPath);
|
||||
rsf->GetProperties() = osf->Properties;
|
||||
for(std::vector<std::string>::iterator i = osf->Depends.begin();
|
||||
i != osf->Depends.end(); ++i)
|
||||
|
@ -649,8 +649,8 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
||||
bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
||||
{
|
||||
std::string src_dir
|
||||
= this->GetCTestConfiguration("SourceDirectory").c_str();
|
||||
std::string bld_dir = this->GetCTestConfiguration("BuildDirectory").c_str();
|
||||
= this->GetCTestConfiguration("SourceDirectory");
|
||||
std::string bld_dir = this->GetCTestConfiguration("BuildDirectory");
|
||||
this->DartVersion = 1;
|
||||
this->DropSiteCDash = false;
|
||||
for(Part p = PartStart; p != PartCount; p = Part(p+1))
|
||||
@ -688,7 +688,7 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
||||
{
|
||||
std::string m = "Could not find include file: ";
|
||||
m += fname;
|
||||
command->SetError(m.c_str());
|
||||
command->SetError(m);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -930,7 +930,7 @@ bool cmCTest::AddIfExists(Part part, const char* file)
|
||||
{
|
||||
std::string name = file;
|
||||
name += ".gz";
|
||||
if ( this->CTestFileExists(name.c_str()) )
|
||||
if ( this->CTestFileExists(name) )
|
||||
{
|
||||
this->AddSubmitFile(part, file);
|
||||
}
|
||||
@ -2246,7 +2246,7 @@ bool cmCTest::AddVariableDefinition(const std::string &arg)
|
||||
std::string value;
|
||||
cmCacheManager::CacheEntryType type = cmCacheManager::UNINITIALIZED;
|
||||
|
||||
if (cmCacheManager::ParseEntry(arg.c_str(), name, value, type))
|
||||
if (cmCacheManager::ParseEntry(arg, name, value, type))
|
||||
{
|
||||
this->Definitions[name] = value;
|
||||
return true;
|
||||
@ -2611,7 +2611,7 @@ void cmCTest::PopulateCustomVector(cmMakefile* mf, const std::string& def,
|
||||
for ( it = slist.begin(); it != slist.end(); ++it )
|
||||
{
|
||||
cmCTestLog(this, DEBUG, " -- " << it->c_str() << std::endl);
|
||||
vec.push_back(it->c_str());
|
||||
vec.push_back(*it);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key,
|
||||
{
|
||||
if (this->EscapeQuotes)
|
||||
{
|
||||
return this->AddString(cmSystemTools::EscapeQuotes(ptr).c_str());
|
||||
return this->AddString(cmSystemTools::EscapeQuotes(ptr));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -94,7 +94,7 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key,
|
||||
{
|
||||
if(this->EscapeQuotes)
|
||||
{
|
||||
return this->AddString(cmSystemTools::EscapeQuotes(c).c_str());
|
||||
return this->AddString(cmSystemTools::EscapeQuotes(c));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -120,7 +120,7 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var)
|
||||
{
|
||||
cmOStringStream ostr;
|
||||
ostr << this->FileLine;
|
||||
return this->AddString(ostr.str().c_str());
|
||||
return this->AddString(ostr.str());
|
||||
}
|
||||
const char* value = this->Makefile->GetDefinition(var);
|
||||
if(!value && !this->RemoveEmpty)
|
||||
@ -144,14 +144,14 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var)
|
||||
bt.push_back(lfc);
|
||||
msg << "uninitialized variable \'" << var << "\'";
|
||||
this->Makefile->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING,
|
||||
msg.str().c_str(), bt);
|
||||
msg.str(), bt);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if (this->EscapeQuotes && value)
|
||||
{
|
||||
return this->AddString(cmSystemTools::EscapeQuotes(value).c_str());
|
||||
return this->AddString(cmSystemTools::EscapeQuotes(value));
|
||||
}
|
||||
return this->AddString(value ? value : "");
|
||||
}
|
||||
@ -181,7 +181,7 @@ char* cmCommandArgumentParserHelper::ExpandVariableForAt(const char* var)
|
||||
std::string ref = "@";
|
||||
ref += var;
|
||||
ref += "@";
|
||||
return this->AddString(ref.c_str());
|
||||
return this->AddString(ref);
|
||||
}
|
||||
|
||||
char* cmCommandArgumentParserHelper::CombineUnions(char* in1, char* in2)
|
||||
|
@ -312,7 +312,7 @@ int cmComputeLinkDepends::AddLinkEntry(int depender_index,
|
||||
int index = lei->second;
|
||||
LinkEntry& entry = this->EntryList[index];
|
||||
entry.Item = item;
|
||||
entry.Target = this->FindTargetToLink(depender_index, entry.Item.c_str());
|
||||
entry.Target = this->FindTargetToLink(depender_index, entry.Item);
|
||||
entry.IsFlag = (!entry.Target && item[0] == '-' && item[1] != 'l' &&
|
||||
item.substr(0, 10) != "-framework");
|
||||
|
||||
@ -328,7 +328,7 @@ int cmComputeLinkDepends::AddLinkEntry(int depender_index,
|
||||
// Look for an old-style <item>_LIB_DEPENDS variable.
|
||||
std::string var = entry.Item;
|
||||
var += "_LIB_DEPENDS";
|
||||
if(const char* val = this->Makefile->GetDefinition(var.c_str()))
|
||||
if(const char* val = this->Makefile->GetDefinition(var))
|
||||
{
|
||||
// The item dependencies are known. Follow them.
|
||||
BFSEntry qe = {index, val};
|
||||
@ -435,7 +435,7 @@ void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep)
|
||||
LinkEntry& entry = this->EntryList[lei->second];
|
||||
entry.Item = dep.Item;
|
||||
entry.Target = this->FindTargetToLink(dep.DependerIndex,
|
||||
dep.Item.c_str());
|
||||
dep.Item);
|
||||
|
||||
// This item was added specifically because it is a dependent
|
||||
// shared library. It may get special treatment
|
||||
@ -506,7 +506,7 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
|
||||
{
|
||||
std::string var = *di;
|
||||
var += "_LINK_TYPE";
|
||||
if(const char* val = this->Makefile->GetDefinition(var.c_str()))
|
||||
if(const char* val = this->Makefile->GetDefinition(var))
|
||||
{
|
||||
if(strcmp(val, "debug") == 0)
|
||||
{
|
||||
@ -1000,7 +1000,7 @@ void cmComputeLinkDepends::CheckWrongConfigItem(int depender_index,
|
||||
// directories of targets linked in another configuration as link
|
||||
// directories.
|
||||
if(cmTarget const* tgt
|
||||
= this->FindTargetToLink(depender_index, item.c_str()))
|
||||
= this->FindTargetToLink(depender_index, item))
|
||||
{
|
||||
if(!tgt->IsImported())
|
||||
{
|
||||
|
@ -293,7 +293,7 @@ cmComputeLinkInformation
|
||||
std::string loader_flag_var = "CMAKE_SHARED_MODULE_LOADER_";
|
||||
loader_flag_var += this->LinkLanguage;
|
||||
loader_flag_var += "_FLAG";
|
||||
this->LoaderFlag = this->Makefile->GetDefinition(loader_flag_var.c_str());
|
||||
this->LoaderFlag = this->Makefile->GetDefinition(loader_flag_var);
|
||||
}
|
||||
|
||||
// Get options needed to link libraries.
|
||||
@ -317,8 +317,8 @@ cmComputeLinkInformation
|
||||
rtVar += this->LinkLanguage;
|
||||
rtVar += "_FLAG";
|
||||
std::string rtSepVar = rtVar + "_SEP";
|
||||
this->RuntimeFlag = this->Makefile->GetSafeDefinition(rtVar.c_str());
|
||||
this->RuntimeSep = this->Makefile->GetSafeDefinition(rtSepVar.c_str());
|
||||
this->RuntimeFlag = this->Makefile->GetSafeDefinition(rtVar);
|
||||
this->RuntimeSep = this->Makefile->GetSafeDefinition(rtSepVar);
|
||||
this->RuntimeAlways =
|
||||
(this->Makefile->
|
||||
GetSafeDefinition("CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH"));
|
||||
@ -330,7 +330,7 @@ cmComputeLinkInformation
|
||||
rlVar += "_RPATH_LINK_";
|
||||
rlVar += this->LinkLanguage;
|
||||
rlVar += "_FLAG";
|
||||
this->RPathLinkFlag = this->Makefile->GetSafeDefinition(rlVar.c_str());
|
||||
this->RPathLinkFlag = this->Makefile->GetSafeDefinition(rlVar);
|
||||
}
|
||||
|
||||
// Check if we need to include the runtime search path at link time.
|
||||
@ -338,7 +338,7 @@ cmComputeLinkInformation
|
||||
std::string var = "CMAKE_SHARED_LIBRARY_LINK_";
|
||||
var += this->LinkLanguage;
|
||||
var += "_WITH_RUNTIME_PATH";
|
||||
this->LinkWithRuntimePath = this->Makefile->IsOn(var.c_str());
|
||||
this->LinkWithRuntimePath = this->Makefile->IsOn(var);
|
||||
}
|
||||
|
||||
// Check the platform policy for missing soname case.
|
||||
@ -505,7 +505,7 @@ bool cmComputeLinkInformation::Compute()
|
||||
}
|
||||
|
||||
// Compute the ordered link line items.
|
||||
cmComputeLinkDepends cld(this->Target, this->Config.c_str(),
|
||||
cmComputeLinkDepends cld(this->Target, this->Config,
|
||||
this->HeadTarget);
|
||||
cld.SetOldLinkDirMode(this->OldLinkDirMode);
|
||||
cmComputeLinkDepends::EntryVector const& linkEntries = cld.Compute();
|
||||
@ -593,7 +593,7 @@ void cmComputeLinkInformation::AddImplicitLinkInfo(std::string const& lang)
|
||||
std::string libVar = "CMAKE_";
|
||||
libVar += lang;
|
||||
libVar += "_IMPLICIT_LINK_LIBRARIES";
|
||||
if(const char* libs = this->Makefile->GetDefinition(libVar.c_str()))
|
||||
if(const char* libs = this->Makefile->GetDefinition(libVar))
|
||||
{
|
||||
std::vector<std::string> libsVec;
|
||||
cmSystemTools::ExpandListArgument(libs, libsVec);
|
||||
@ -602,7 +602,7 @@ void cmComputeLinkInformation::AddImplicitLinkInfo(std::string const& lang)
|
||||
{
|
||||
if(this->ImplicitLinkLibs.find(*i) == this->ImplicitLinkLibs.end())
|
||||
{
|
||||
this->AddItem(i->c_str(), 0);
|
||||
this->AddItem(*i, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -612,7 +612,7 @@ void cmComputeLinkInformation::AddImplicitLinkInfo(std::string const& lang)
|
||||
std::string dirVar = "CMAKE_";
|
||||
dirVar += lang;
|
||||
dirVar += "_IMPLICIT_LINK_DIRECTORIES";
|
||||
if(const char* dirs = this->Makefile->GetDefinition(dirVar.c_str()))
|
||||
if(const char* dirs = this->Makefile->GetDefinition(dirVar))
|
||||
{
|
||||
std::vector<std::string> dirsVec;
|
||||
cmSystemTools::ExpandListArgument(dirs, dirsVec);
|
||||
@ -820,7 +820,7 @@ void cmComputeLinkInformation::ComputeLinkTypeInfo()
|
||||
static_link_type_flag_var += this->LinkLanguage;
|
||||
static_link_type_flag_var += "_FLAGS";
|
||||
static_link_type_flag =
|
||||
this->Makefile->GetDefinition(static_link_type_flag_var.c_str());
|
||||
this->Makefile->GetDefinition(static_link_type_flag_var);
|
||||
|
||||
std::string shared_link_type_flag_var = "CMAKE_";
|
||||
shared_link_type_flag_var += target_type_str;
|
||||
@ -828,7 +828,7 @@ void cmComputeLinkInformation::ComputeLinkTypeInfo()
|
||||
shared_link_type_flag_var += this->LinkLanguage;
|
||||
shared_link_type_flag_var += "_FLAGS";
|
||||
shared_link_type_flag =
|
||||
this->Makefile->GetDefinition(shared_link_type_flag_var.c_str());
|
||||
this->Makefile->GetDefinition(shared_link_type_flag_var);
|
||||
}
|
||||
|
||||
// We can support link type switching only if all needed flags are
|
||||
@ -1370,7 +1370,7 @@ void cmComputeLinkInformation::AddFrameworkItem(std::string const& item)
|
||||
|
||||
// Add the item using the -framework option.
|
||||
this->Items.push_back(Item("-framework", false));
|
||||
fw = this->LocalGenerator->EscapeForShell(fw.c_str());
|
||||
fw = this->LocalGenerator->EscapeForShell(fw);
|
||||
this->Items.push_back(Item(fw, false));
|
||||
}
|
||||
|
||||
@ -1419,7 +1419,7 @@ void cmComputeLinkInformation::ComputeFrameworkInfo()
|
||||
implicitDirVar += this->LinkLanguage;
|
||||
implicitDirVar += "_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES";
|
||||
if(const char* implicitDirs =
|
||||
this->Makefile->GetDefinition(implicitDirVar.c_str()))
|
||||
this->Makefile->GetDefinition(implicitDirVar))
|
||||
{
|
||||
cmSystemTools::ExpandListArgument(implicitDirs, implicitDirVec);
|
||||
}
|
||||
@ -1506,9 +1506,9 @@ void cmComputeLinkInformation::HandleBadFullItem(std::string const& item,
|
||||
// Print the warning at most once for this item.
|
||||
std::string wid = "CMP0008-WARNING-GIVEN-";
|
||||
wid += item;
|
||||
if(!this->CMakeInstance->GetPropertyAsBool(wid.c_str()))
|
||||
if(!this->CMakeInstance->GetPropertyAsBool(wid))
|
||||
{
|
||||
this->CMakeInstance->SetProperty(wid.c_str(), "1");
|
||||
this->CMakeInstance->SetProperty(wid, "1");
|
||||
cmOStringStream w;
|
||||
w << (this->Makefile->GetPolicies()
|
||||
->GetPolicyWarning(cmPolicies::CMP0008)) << "\n"
|
||||
@ -1692,7 +1692,7 @@ void cmComputeLinkInformation::LoadImplicitLinkInfo()
|
||||
implicitDirVar += this->LinkLanguage;
|
||||
implicitDirVar += "_IMPLICIT_LINK_DIRECTORIES";
|
||||
if(const char* implicitDirs =
|
||||
this->Makefile->GetDefinition(implicitDirVar.c_str()))
|
||||
this->Makefile->GetDefinition(implicitDirVar))
|
||||
{
|
||||
cmSystemTools::ExpandListArgument(implicitDirs, implicitDirVec);
|
||||
}
|
||||
@ -1710,7 +1710,7 @@ void cmComputeLinkInformation::LoadImplicitLinkInfo()
|
||||
implicitLibVar += this->LinkLanguage;
|
||||
implicitLibVar += "_IMPLICIT_LINK_LIBRARIES";
|
||||
if(const char* implicitLibs =
|
||||
this->Makefile->GetDefinition(implicitLibVar.c_str()))
|
||||
this->Makefile->GetDefinition(implicitLibVar))
|
||||
{
|
||||
cmSystemTools::ExpandListArgument(implicitLibs, implicitLibVec);
|
||||
}
|
||||
@ -1978,11 +1978,11 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
|
||||
{
|
||||
std::string useVar = "CMAKE_" + *li +
|
||||
"_USE_IMPLICIT_LINK_DIRECTORIES_IN_RUNTIME_PATH";
|
||||
if(this->Makefile->IsOn(useVar.c_str()))
|
||||
if(this->Makefile->IsOn(useVar))
|
||||
{
|
||||
std::string dirVar = "CMAKE_" + *li +
|
||||
"_IMPLICIT_LINK_DIRECTORIES";
|
||||
if(const char* dirs = this->Makefile->GetDefinition(dirVar.c_str()))
|
||||
if(const char* dirs = this->Makefile->GetDefinition(dirVar))
|
||||
{
|
||||
cmCLI_ExpandListUnique(dirs, runtimeDirs, emitted);
|
||||
}
|
||||
|
@ -223,8 +223,8 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
|
||||
// Don't emit the same library twice for this target.
|
||||
if(emitted.insert(*lib).second)
|
||||
{
|
||||
this->AddTargetDepend(depender_index, lib->c_str(), true);
|
||||
this->AddInterfaceDepends(depender_index, lib->c_str(),
|
||||
this->AddTargetDepend(depender_index, *lib, true);
|
||||
this->AddInterfaceDepends(depender_index, *lib,
|
||||
true, emitted);
|
||||
}
|
||||
}
|
||||
@ -235,7 +235,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
|
||||
it != configs.end(); ++it)
|
||||
{
|
||||
std::vector<std::string> tlibs;
|
||||
depender->GetDirectLinkLibraries(it->c_str(), tlibs, depender);
|
||||
depender->GetDirectLinkLibraries(*it, tlibs, depender);
|
||||
|
||||
// A target should not depend on itself.
|
||||
emitted.insert(depender->GetName());
|
||||
@ -245,8 +245,8 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
|
||||
// Don't emit the same library twice for this target.
|
||||
if(emitted.insert(*lib).second)
|
||||
{
|
||||
this->AddTargetDepend(depender_index, lib->c_str(), true);
|
||||
this->AddInterfaceDepends(depender_index, lib->c_str(),
|
||||
this->AddTargetDepend(depender_index, *lib, true);
|
||||
this->AddInterfaceDepends(depender_index, *lib,
|
||||
true, emitted);
|
||||
}
|
||||
}
|
||||
@ -265,7 +265,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
|
||||
// Don't emit the same utility twice for this target.
|
||||
if(emitted.insert(*util).second)
|
||||
{
|
||||
this->AddTargetDepend(depender_index, util->c_str(), false);
|
||||
this->AddTargetDepend(depender_index, *util, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -288,8 +288,8 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
|
||||
// Don't emit the same library twice for this target.
|
||||
if(emitted.insert(*lib).second)
|
||||
{
|
||||
this->AddTargetDepend(depender_index, lib->c_str(), true);
|
||||
this->AddInterfaceDepends(depender_index, lib->c_str(),
|
||||
this->AddTargetDepend(depender_index, *lib, true);
|
||||
this->AddInterfaceDepends(depender_index, *lib,
|
||||
true, emitted);
|
||||
}
|
||||
}
|
||||
@ -326,7 +326,7 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
|
||||
// A target should not depend on itself.
|
||||
emitted.insert(depender->GetName());
|
||||
this->AddInterfaceDepends(depender_index, dependee,
|
||||
it->c_str(), emitted);
|
||||
*it, emitted);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ bool cmConfigureFileCommand
|
||||
e << "input location\n"
|
||||
<< " " << this->InputFile << "\n"
|
||||
<< "is a directory but a file was expected.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -61,14 +61,14 @@ bool cmConfigureFileCommand
|
||||
{
|
||||
std::string e = "attempted to configure a file: " + this->OutputFile
|
||||
+ " into a source directory.";
|
||||
this->SetError(e.c_str());
|
||||
this->SetError(e);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
return false;
|
||||
}
|
||||
std::string errorMessage;
|
||||
if (!this->NewLineStyle.ReadFromArguments(args, errorMessage))
|
||||
{
|
||||
this->SetError(errorMessage.c_str());
|
||||
this->SetError(errorMessage);
|
||||
return false;
|
||||
}
|
||||
this->CopyOnly = false;
|
||||
|
@ -307,13 +307,13 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
|
||||
std::string rulesOverrideBase = "CMAKE_USER_MAKE_RULES_OVERRIDE";
|
||||
std::string rulesOverrideLang = rulesOverrideBase + "_" + *li;
|
||||
if(const char* rulesOverridePath =
|
||||
this->Makefile->GetDefinition(rulesOverrideLang.c_str()))
|
||||
this->Makefile->GetDefinition(rulesOverrideLang))
|
||||
{
|
||||
fprintf(fout, "set(%s \"%s\")\n",
|
||||
rulesOverrideLang.c_str(), rulesOverridePath);
|
||||
}
|
||||
else if(const char* rulesOverridePath2 =
|
||||
this->Makefile->GetDefinition(rulesOverrideBase.c_str()))
|
||||
this->Makefile->GetDefinition(rulesOverrideBase))
|
||||
{
|
||||
fprintf(fout, "set(%s \"%s\")\n",
|
||||
rulesOverrideBase.c_str(), rulesOverridePath2);
|
||||
@ -325,7 +325,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
|
||||
li != testLangs.end(); ++li)
|
||||
{
|
||||
std::string langFlags = "CMAKE_" + *li + "_FLAGS";
|
||||
const char* flags = this->Makefile->GetDefinition(langFlags.c_str());
|
||||
const char* flags = this->Makefile->GetDefinition(langFlags);
|
||||
fprintf(fout, "set(CMAKE_%s_FLAGS %s)\n", li->c_str(),
|
||||
lg->EscapeForCMake(flags?flags:"").c_str());
|
||||
fprintf(fout, "set(CMAKE_%s_FLAGS \"${CMAKE_%s_FLAGS}"
|
||||
@ -484,7 +484,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
|
||||
std::string output;
|
||||
// actually do the try compile now that everything is setup
|
||||
int res = this->Makefile->TryCompile(sourceDirectory,
|
||||
this->BinaryDirectory.c_str(),
|
||||
this->BinaryDirectory,
|
||||
projectName,
|
||||
targetName,
|
||||
this->SrcFileSignature,
|
||||
@ -496,14 +496,14 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
|
||||
}
|
||||
|
||||
// set the result var to the return value to indicate success or failure
|
||||
this->Makefile->AddCacheDefinition(argv[0].c_str(),
|
||||
this->Makefile->AddCacheDefinition(argv[0],
|
||||
(res == 0 ? "TRUE" : "FALSE"),
|
||||
"Result of TRY_COMPILE",
|
||||
cmCacheManager::INTERNAL);
|
||||
|
||||
if ( outputVariable.size() > 0 )
|
||||
{
|
||||
this->Makefile->AddDefinition(outputVariable.c_str(), output.c_str());
|
||||
this->Makefile->AddDefinition(outputVariable, output.c_str());
|
||||
}
|
||||
|
||||
if (this->SrcFileSignature)
|
||||
@ -540,7 +540,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
|
||||
|
||||
if(!copyFileError.empty())
|
||||
{
|
||||
this->Makefile->AddDefinition(copyFileError.c_str(),
|
||||
this->Makefile->AddDefinition(copyFileError,
|
||||
copyFileErrorMessage.c_str());
|
||||
}
|
||||
}
|
||||
|
@ -169,13 +169,13 @@ bool cmCreateTestSourceList
|
||||
// Construct the source list.
|
||||
std::string sourceListValue;
|
||||
{
|
||||
cmSourceFile* sf = this->Makefile->GetOrCreateSource(driver.c_str());
|
||||
cmSourceFile* sf = this->Makefile->GetOrCreateSource(driver);
|
||||
sf->SetProperty("ABSTRACT","0");
|
||||
sourceListValue = args[1];
|
||||
}
|
||||
for(i = testsBegin; i != tests.end(); ++i)
|
||||
{
|
||||
cmSourceFile* sf = this->Makefile->GetOrCreateSource(i->c_str());
|
||||
cmSourceFile* sf = this->Makefile->GetOrCreateSource(*i);
|
||||
sf->SetProperty("ABSTRACT","0");
|
||||
sourceListValue += ";";
|
||||
sourceListValue += *i;
|
||||
|
@ -63,11 +63,11 @@ cmCustomCommandGenerator
|
||||
cmd += " ";
|
||||
if(this->OldStyle)
|
||||
{
|
||||
cmd += this->LG->EscapeForShellOldStyle(arg.c_str());
|
||||
cmd += this->LG->EscapeForShellOldStyle(arg);
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd += this->LG->EscapeForShell(arg.c_str(), this->MakeVars);
|
||||
cmd += this->LG->EscapeForShell(arg, this->MakeVars);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ bool cmDefinePropertyCommand
|
||||
<< "Valid scopes are "
|
||||
<< "GLOBAL, DIRECTORY, TARGET, SOURCE, "
|
||||
<< "TEST, VARIABLE, CACHED_VARIABLE.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ bool cmDefinePropertyCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "given invalid argument \"" << args[i] << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -128,7 +128,7 @@ bool cmDefinePropertyCommand
|
||||
|
||||
// Actually define the property.
|
||||
this->Makefile->GetCMakeInstance()->DefineProperty
|
||||
(this->PropertyName.c_str(), scope,
|
||||
(this->PropertyName, scope,
|
||||
this->BriefDocs.c_str(), this->FullDocs.c_str(), inherited);
|
||||
|
||||
return true;
|
||||
|
@ -47,7 +47,7 @@ bool cmDepends::Write(std::ostream &makeDepends,
|
||||
std::string srcLang = "CMAKE_DEPENDS_CHECK_";
|
||||
srcLang += this->Language;
|
||||
cmMakefile* mf = this->LocalGenerator->GetMakefile();
|
||||
const char* srcStr = mf->GetSafeDefinition(srcLang.c_str());
|
||||
const char* srcStr = mf->GetSafeDefinition(srcLang);
|
||||
std::vector<std::string> pairs;
|
||||
cmSystemTools::ExpandListArgument(srcStr, pairs);
|
||||
|
||||
@ -61,7 +61,7 @@ bool cmDepends::Write(std::ostream &makeDepends,
|
||||
std::string obj = *si++;
|
||||
|
||||
// Make sure the object file is relative to the top of the build tree.
|
||||
obj = this->LocalGenerator->Convert(obj.c_str(),
|
||||
obj = this->LocalGenerator->Convert(obj,
|
||||
cmLocalGenerator::HOME_OUTPUT,
|
||||
cmLocalGenerator::MAKEFILE);
|
||||
dependencies[obj].insert(src);
|
||||
@ -305,7 +305,7 @@ void cmDepends::SetIncludePathFromLanguage(const std::string& lang)
|
||||
includePathVar += lang;
|
||||
includePathVar += "_TARGET_INCLUDE_PATH";
|
||||
cmMakefile* mf = this->LocalGenerator->GetMakefile();
|
||||
includePath = mf->GetDefinition(includePathVar.c_str());
|
||||
includePath = mf->GetDefinition(includePathVar);
|
||||
if(includePath)
|
||||
{
|
||||
cmSystemTools::ExpandListArgument(includePath, this->IncludePath);
|
||||
@ -316,7 +316,7 @@ void cmDepends::SetIncludePathFromLanguage(const std::string& lang)
|
||||
includePathVar = "CMAKE_";
|
||||
includePathVar += lang;
|
||||
includePathVar += "_INCLUDE_PATH";
|
||||
includePath = mf->GetDefinition(includePathVar.c_str());
|
||||
includePath = mf->GetDefinition(includePathVar);
|
||||
if(includePath)
|
||||
{
|
||||
cmSystemTools::ExpandListArgument(includePath, this->IncludePath);
|
||||
|
@ -54,14 +54,14 @@ cmDependsC::cmDependsC(cmLocalGenerator* lg,
|
||||
std::string scanRegexVar = "CMAKE_";
|
||||
scanRegexVar += lang;
|
||||
scanRegexVar += "_INCLUDE_REGEX_SCAN";
|
||||
if(const char* sr = mf->GetDefinition(scanRegexVar.c_str()))
|
||||
if(const char* sr = mf->GetDefinition(scanRegexVar))
|
||||
{
|
||||
scanRegex = sr;
|
||||
}
|
||||
std::string complainRegexVar = "CMAKE_";
|
||||
complainRegexVar += lang;
|
||||
complainRegexVar += "_INCLUDE_REGEX_COMPLAIN";
|
||||
if(const char* cr = mf->GetDefinition(complainRegexVar.c_str()))
|
||||
if(const char* cr = mf->GetDefinition(complainRegexVar))
|
||||
{
|
||||
complainRegex = cr;
|
||||
}
|
||||
@ -274,7 +274,7 @@ bool cmDependsC::WriteDependencies(const std::set<std::string>& sources,
|
||||
i != dependencies.end(); ++i)
|
||||
{
|
||||
makeDepends << obj << ": " <<
|
||||
this->LocalGenerator->Convert(i->c_str(),
|
||||
this->LocalGenerator->Convert(*i,
|
||||
cmLocalGenerator::HOME_OUTPUT,
|
||||
cmLocalGenerator::MAKEFILE)
|
||||
<< std::endl;
|
||||
|
@ -292,15 +292,15 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends,
|
||||
stamp += ".mod.stamp";
|
||||
fcStream << "\n";
|
||||
fcStream << " \"" <<
|
||||
this->LocalGenerator->Convert(mod_lower.c_str(),
|
||||
this->LocalGenerator->Convert(mod_lower,
|
||||
cmLocalGenerator::START_OUTPUT)
|
||||
<< "\"\n";
|
||||
fcStream << " \"" <<
|
||||
this->LocalGenerator->Convert(mod_upper.c_str(),
|
||||
this->LocalGenerator->Convert(mod_upper,
|
||||
cmLocalGenerator::START_OUTPUT)
|
||||
<< "\"\n";
|
||||
fcStream << " \"" <<
|
||||
this->LocalGenerator->Convert(stamp.c_str(),
|
||||
this->LocalGenerator->Convert(stamp,
|
||||
cmLocalGenerator::START_OUTPUT)
|
||||
<< "\"\n";
|
||||
}
|
||||
@ -449,7 +449,7 @@ cmDependsFortran
|
||||
i != info.Includes.end(); ++i)
|
||||
{
|
||||
makeDepends << obj << ": " <<
|
||||
this->LocalGenerator->Convert(i->c_str(),
|
||||
this->LocalGenerator->Convert(*i,
|
||||
cmLocalGenerator::HOME_OUTPUT,
|
||||
cmLocalGenerator::MAKEFILE)
|
||||
<< std::endl;
|
||||
@ -480,7 +480,7 @@ cmDependsFortran
|
||||
proxy += "/";
|
||||
proxy += *i;
|
||||
proxy += ".mod.proxy";
|
||||
proxy = this->LocalGenerator->Convert(proxy.c_str(),
|
||||
proxy = this->LocalGenerator->Convert(proxy,
|
||||
cmLocalGenerator::HOME_OUTPUT,
|
||||
cmLocalGenerator::MAKEFILE);
|
||||
|
||||
@ -497,7 +497,7 @@ cmDependsFortran
|
||||
{
|
||||
// This module is known. Depend on its timestamp file.
|
||||
std::string stampFile =
|
||||
this->LocalGenerator->Convert(required->second.c_str(),
|
||||
this->LocalGenerator->Convert(required->second,
|
||||
cmLocalGenerator::HOME_OUTPUT,
|
||||
cmLocalGenerator::MAKEFILE);
|
||||
makeDepends << obj << ": " << stampFile << "\n";
|
||||
@ -510,7 +510,7 @@ cmDependsFortran
|
||||
if(this->FindModule(*i, module))
|
||||
{
|
||||
module =
|
||||
this->LocalGenerator->Convert(module.c_str(),
|
||||
this->LocalGenerator->Convert(module,
|
||||
cmLocalGenerator::HOME_OUTPUT,
|
||||
cmLocalGenerator::MAKEFILE);
|
||||
makeDepends << obj << ": " << module << "\n";
|
||||
@ -526,7 +526,7 @@ cmDependsFortran
|
||||
proxy += "/";
|
||||
proxy += *i;
|
||||
proxy += ".mod.proxy";
|
||||
proxy = this->LocalGenerator->Convert(proxy.c_str(),
|
||||
proxy = this->LocalGenerator->Convert(proxy,
|
||||
cmLocalGenerator::HOME_OUTPUT,
|
||||
cmLocalGenerator::MAKEFILE);
|
||||
makeDepends << proxy << ": " << obj << ".provides" << std::endl;
|
||||
@ -552,7 +552,7 @@ cmDependsFortran
|
||||
modFile += "/";
|
||||
modFile += *i;
|
||||
modFile =
|
||||
this->LocalGenerator->Convert(modFile.c_str(),
|
||||
this->LocalGenerator->Convert(modFile,
|
||||
cmLocalGenerator::HOME_OUTPUT,
|
||||
cmLocalGenerator::SHELL);
|
||||
std::string stampFile = stamp_dir;
|
||||
@ -560,7 +560,7 @@ cmDependsFortran
|
||||
stampFile += m;
|
||||
stampFile += ".mod.stamp";
|
||||
stampFile =
|
||||
this->LocalGenerator->Convert(stampFile.c_str(),
|
||||
this->LocalGenerator->Convert(stampFile,
|
||||
cmLocalGenerator::HOME_OUTPUT,
|
||||
cmLocalGenerator::SHELL);
|
||||
makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod "
|
||||
@ -582,7 +582,7 @@ cmDependsFortran
|
||||
// the target finishes building.
|
||||
std::string driver = this->TargetDirectory;
|
||||
driver += "/build";
|
||||
driver = this->LocalGenerator->Convert(driver.c_str(),
|
||||
driver = this->LocalGenerator->Convert(driver,
|
||||
cmLocalGenerator::HOME_OUTPUT,
|
||||
cmLocalGenerator::MAKEFILE);
|
||||
makeDepends << driver << ": " << obj << ".provides.build\n";
|
||||
|
@ -672,7 +672,7 @@ bool cmDocumentation::PrintFiles(std::ostream& os,
|
||||
for (std::vector<std::string>::const_iterator i = files.begin();
|
||||
i != files.end(); ++i)
|
||||
{
|
||||
found = r.ProcessFile(i->c_str()) || found;
|
||||
found = r.ProcessFile(*i) || found;
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
@ -132,14 +132,14 @@ bool cmExecProgramCommand
|
||||
}
|
||||
|
||||
std::string coutput = std::string(output, first, last-first+1);
|
||||
this->Makefile->AddDefinition(output_variable.c_str(), coutput.c_str());
|
||||
this->Makefile->AddDefinition(output_variable, coutput.c_str());
|
||||
}
|
||||
|
||||
if ( return_variable.size() > 0 )
|
||||
{
|
||||
char buffer[100];
|
||||
sprintf(buffer, "%d", retVal);
|
||||
this->Makefile->AddDefinition(return_variable.c_str(), buffer);
|
||||
this->Makefile->AddDefinition(return_variable, buffer);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -191,7 +191,7 @@ bool cmExecuteProcessCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << " given unknown argument \"" << args[i] << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -200,7 +200,7 @@ bool cmExecuteProcessCommand
|
||||
{
|
||||
std::string e = "attempted to output into a file: " + output_file
|
||||
+ " into a source directory.";
|
||||
this->SetError(e.c_str());
|
||||
this->SetError(e);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
return false;
|
||||
}
|
||||
@ -326,12 +326,12 @@ bool cmExecuteProcessCommand
|
||||
// Store the output obtained.
|
||||
if(!output_variable.empty() && tempOutput.size())
|
||||
{
|
||||
this->Makefile->AddDefinition(output_variable.c_str(),
|
||||
this->Makefile->AddDefinition(output_variable,
|
||||
&*tempOutput.begin());
|
||||
}
|
||||
if(!merge_output && !error_variable.empty() && tempError.size())
|
||||
{
|
||||
this->Makefile->AddDefinition(error_variable.c_str(),
|
||||
this->Makefile->AddDefinition(error_variable,
|
||||
&*tempError.begin());
|
||||
}
|
||||
|
||||
@ -345,19 +345,19 @@ bool cmExecuteProcessCommand
|
||||
int v = cmsysProcess_GetExitValue(cp);
|
||||
char buf[100];
|
||||
sprintf(buf, "%d", v);
|
||||
this->Makefile->AddDefinition(result_variable.c_str(), buf);
|
||||
this->Makefile->AddDefinition(result_variable, buf);
|
||||
}
|
||||
break;
|
||||
case cmsysProcess_State_Exception:
|
||||
this->Makefile->AddDefinition(result_variable.c_str(),
|
||||
this->Makefile->AddDefinition(result_variable,
|
||||
cmsysProcess_GetExceptionString(cp));
|
||||
break;
|
||||
case cmsysProcess_State_Error:
|
||||
this->Makefile->AddDefinition(result_variable.c_str(),
|
||||
this->Makefile->AddDefinition(result_variable,
|
||||
cmsysProcess_GetErrorString(cp));
|
||||
break;
|
||||
case cmsysProcess_State_Expired:
|
||||
this->Makefile->AddDefinition(result_variable.c_str(),
|
||||
this->Makefile->AddDefinition(result_variable,
|
||||
"Process terminated due to timeout");
|
||||
break;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
|
||||
cmOStringStream e;
|
||||
e << "given target \"" << te->GetName() << "\" more than once.";
|
||||
this->Makefile->GetCMakeInstance()
|
||||
->IssueMessage(cmake::FATAL_ERROR, e.str().c_str(), this->Backtrace);
|
||||
->IssueMessage(cmake::FATAL_ERROR, e.str(), this->Backtrace);
|
||||
return false;
|
||||
}
|
||||
if (te->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||
@ -106,7 +106,7 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
|
||||
ci = this->Configurations.begin();
|
||||
ci != this->Configurations.end(); ++ci)
|
||||
{
|
||||
this->GenerateImportConfig(os, ci->c_str(), missingTargets);
|
||||
this->GenerateImportConfig(os, *ci, missingTargets);
|
||||
}
|
||||
|
||||
this->GenerateMissingTargetsCheckCode(os, missingTargets);
|
||||
@ -315,7 +315,7 @@ cmExportBuildFileGenerator
|
||||
<< "consider using the APPEND option with multiple separate calls.";
|
||||
|
||||
this->Makefile->GetCMakeInstance()
|
||||
->IssueMessage(cmake::FATAL_ERROR, e.str().c_str(), this->Backtrace);
|
||||
->IssueMessage(cmake::FATAL_ERROR, e.str(), this->Backtrace);
|
||||
}
|
||||
|
||||
std::string
|
||||
@ -328,7 +328,7 @@ cmExportBuildFileGenerator::InstallNameDir(cmTarget* target,
|
||||
if(mf->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME"))
|
||||
{
|
||||
install_name_dir =
|
||||
target->GetInstallNameDirForBuildTree(config.c_str());
|
||||
target->GetInstallNameDirForBuildTree(config);
|
||||
}
|
||||
|
||||
return install_name_dir;
|
||||
|
@ -92,7 +92,7 @@ bool cmExportCommand
|
||||
cmOStringStream e;
|
||||
e << "FILE option given filename \"" << this->Filename.GetString()
|
||||
<< "\" which does not have an extension of \".cmake\".\n";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
fname = this->Filename.GetString();
|
||||
@ -106,7 +106,7 @@ bool cmExportCommand
|
||||
cmOStringStream e;
|
||||
e << "FILE option given filename \"" << fname
|
||||
<< "\" which is in the source tree.\n";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -128,7 +128,7 @@ bool cmExportCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "EXPORT signature does not recognise the APPEND option.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -137,7 +137,7 @@ bool cmExportCommand
|
||||
cmOStringStream e;
|
||||
e << "EXPORT signature does not recognise the "
|
||||
"EXPORT_LINK_INTERFACE_LIBRARIES option.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ bool cmExportCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "Export set \"" << setName << "\" not found.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
this->ExportSet = setMap[setName];
|
||||
@ -164,18 +164,18 @@ bool cmExportCommand
|
||||
cmOStringStream e;
|
||||
e << "given ALIAS target \"" << *currentTarget
|
||||
<< "\" which may not be exported.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if(cmTarget* target = gg->FindTarget(currentTarget->c_str()))
|
||||
if(cmTarget* target = gg->FindTarget(*currentTarget))
|
||||
{
|
||||
if(target->GetType() == cmTarget::OBJECT_LIBRARY)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "given OBJECT library \"" << *currentTarget
|
||||
<< "\" which may not be exported.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -184,7 +184,7 @@ bool cmExportCommand
|
||||
cmOStringStream e;
|
||||
e << "given target \"" << *currentTarget
|
||||
<< "\" which is not built by this project.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
targets.push_back(*currentTarget);
|
||||
@ -229,7 +229,7 @@ bool cmExportCommand
|
||||
ci = configurationTypes.begin();
|
||||
ci != configurationTypes.end(); ++ci)
|
||||
{
|
||||
ebfg->AddConfiguration(ci->c_str());
|
||||
ebfg->AddConfiguration(*ci);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -266,7 +266,7 @@ bool cmExportCommand::HandlePackage(std::vector<std::string> const& args)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "PACKAGE given unknown argument: " << args[i];
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -284,7 +284,7 @@ bool cmExportCommand::HandlePackage(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "PACKAGE given invalid package name \"" << package << "\". "
|
||||
<< "Package names must match \"" << packageExpr << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -275,7 +275,7 @@ static bool checkInterfaceDirs(const std::string &prepro,
|
||||
e << "Target \"" << target->GetName() << "\" "
|
||||
"INTERFACE_INCLUDE_DIRECTORIES property contains relative path:\n"
|
||||
" \"" << *li << "\"";
|
||||
target->GetMakefile()->IssueMessage(messageType, e.str().c_str());
|
||||
target->GetMakefile()->IssueMessage(messageType, e.str());
|
||||
}
|
||||
if (isSubDirectory(li->c_str(), installDir))
|
||||
{
|
||||
@ -286,7 +286,7 @@ static bool checkInterfaceDirs(const std::string &prepro,
|
||||
e << "Target \"" << target->GetName() << "\" "
|
||||
"INTERFACE_INCLUDE_DIRECTORIES property contains path:\n"
|
||||
" \"" << *li << "\"\nwhich is prefixed in the build directory.";
|
||||
target->GetMakefile()->IssueMessage(messageType, e.str().c_str());
|
||||
target->GetMakefile()->IssueMessage(messageType, e.str());
|
||||
}
|
||||
if (!inSourceBuild)
|
||||
{
|
||||
@ -295,7 +295,7 @@ static bool checkInterfaceDirs(const std::string &prepro,
|
||||
e << "Target \"" << target->GetName() << "\" "
|
||||
"INTERFACE_INCLUDE_DIRECTORIES property contains path:\n"
|
||||
" \"" << *li << "\"\nwhich is prefixed in the source directory.";
|
||||
target->GetMakefile()->IssueMessage(messageType, e.str().c_str());
|
||||
target->GetMakefile()->IssueMessage(messageType, e.str());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -498,14 +498,14 @@ void cmExportFileGenerator::PopulateCompatibleInterfaceProperties(
|
||||
for (std::vector<std::string>::const_iterator ci = configNames.begin();
|
||||
ci != configNames.end(); ++ci)
|
||||
{
|
||||
getCompatibleInterfaceProperties(target, ifaceProperties, ci->c_str());
|
||||
getCompatibleInterfaceProperties(target, ifaceProperties, *ci);
|
||||
}
|
||||
}
|
||||
|
||||
for (std::set<std::string>::const_iterator it = ifaceProperties.begin();
|
||||
it != ifaceProperties.end(); ++it)
|
||||
{
|
||||
this->PopulateInterfaceProperty(("INTERFACE_" + *it).c_str(),
|
||||
this->PopulateInterfaceProperty("INTERFACE_" + *it,
|
||||
target, properties);
|
||||
}
|
||||
}
|
||||
@ -712,7 +712,7 @@ cmExportFileGenerator
|
||||
const char *propContent;
|
||||
|
||||
if (const char *prop_suffixed = target->GetProperty(
|
||||
("LINK_INTERFACE_LIBRARIES" + suffix).c_str()))
|
||||
"LINK_INTERFACE_LIBRARIES" + suffix))
|
||||
{
|
||||
propContent = prop_suffixed;
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
|
||||
ci = this->Configurations.begin();
|
||||
ci != this->Configurations.end(); ++ci)
|
||||
{
|
||||
if(!this->GenerateImportFileConfig(ci->c_str(), missingTargets))
|
||||
if(!this->GenerateImportFileConfig(*ci, missingTargets))
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const
|
||||
break;
|
||||
}
|
||||
std::string lib = li->first;
|
||||
if(cmTarget* libtgt = global->FindTarget(lib.c_str()))
|
||||
if(cmTarget* libtgt = global->FindTarget(lib))
|
||||
{
|
||||
// Handle simple output name changes. This command is
|
||||
// deprecated so we do not support full target name
|
||||
|
@ -102,7 +102,7 @@ cmExportTryCompileFileGenerator::PopulateProperties(cmTarget const* target,
|
||||
{
|
||||
const std::string libs = i->second.GetValue();
|
||||
|
||||
std::string evalResult = this->FindTargets(i->first.c_str(),
|
||||
std::string evalResult = this->FindTargets(i->first,
|
||||
target, emitted);
|
||||
|
||||
std::vector<std::string> depends;
|
||||
@ -129,7 +129,7 @@ cmExportTryCompileFileGenerator::InstallNameDir(cmTarget* target,
|
||||
if(mf->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME"))
|
||||
{
|
||||
install_name_dir =
|
||||
target->GetInstallNameDirForBuildTree(config.c_str());
|
||||
target->GetInstallNameDirForBuildTree(config);
|
||||
}
|
||||
|
||||
return install_name_dir;
|
||||
|
@ -60,7 +60,7 @@ std::string cmExternalMakefileProjectGenerator::GetGlobalGeneratorName(
|
||||
it != this->SupportedGlobalGenerators.end();
|
||||
++it)
|
||||
{
|
||||
if (this->CreateFullGeneratorName(it->c_str(), this->GetName())
|
||||
if (this->CreateFullGeneratorName(*it, this->GetName())
|
||||
== currentName)
|
||||
{
|
||||
return *it;
|
||||
|
@ -334,7 +334,7 @@ void cmExtraCodeBlocksGenerator
|
||||
if (strcmp(makefile->GetStartOutputDirectory(),
|
||||
makefile->GetHomeOutputDirectory())==0)
|
||||
{
|
||||
this->AppendTarget(fout, ti->first.c_str(), 0,
|
||||
this->AppendTarget(fout, ti->first, 0,
|
||||
make.c_str(), makefile, compiler.c_str());
|
||||
}
|
||||
}
|
||||
@ -350,7 +350,7 @@ void cmExtraCodeBlocksGenerator
|
||||
break;
|
||||
}
|
||||
|
||||
this->AppendTarget(fout, ti->first.c_str(), 0,
|
||||
this->AppendTarget(fout, ti->first, 0,
|
||||
make.c_str(), makefile, compiler.c_str());
|
||||
break;
|
||||
case cmTarget::EXECUTABLE:
|
||||
@ -359,11 +359,11 @@ void cmExtraCodeBlocksGenerator
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
{
|
||||
this->AppendTarget(fout, ti->first.c_str(), &ti->second,
|
||||
this->AppendTarget(fout, ti->first, &ti->second,
|
||||
make.c_str(), makefile, compiler.c_str());
|
||||
std::string fastTarget = ti->first;
|
||||
fastTarget += "/fast";
|
||||
this->AppendTarget(fout, fastTarget.c_str(), &ti->second,
|
||||
this->AppendTarget(fout, fastTarget, &ti->second,
|
||||
make.c_str(), makefile, compiler.c_str());
|
||||
}
|
||||
break;
|
||||
@ -626,7 +626,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
|
||||
if (!systemIncludeDirs.empty())
|
||||
{
|
||||
std::vector<std::string> dirs;
|
||||
cmSystemTools::ExpandListArgument(systemIncludeDirs.c_str(), dirs);
|
||||
cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs);
|
||||
for(std::vector<std::string>::const_iterator dirIt=dirs.begin();
|
||||
dirIt != dirs.end();
|
||||
++dirIt)
|
||||
@ -640,7 +640,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
|
||||
if (!systemIncludeDirs.empty())
|
||||
{
|
||||
std::vector<std::string> dirs;
|
||||
cmSystemTools::ExpandListArgument(systemIncludeDirs.c_str(), dirs);
|
||||
cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs);
|
||||
for(std::vector<std::string>::const_iterator dirIt=dirs.begin();
|
||||
dirIt != dirs.end();
|
||||
++dirIt)
|
||||
@ -697,7 +697,7 @@ std::string cmExtraCodeBlocksGenerator::GetCBCompilerId(const cmMakefile* mf)
|
||||
|
||||
std::string hostSystemName = mf->GetSafeDefinition("CMAKE_HOST_SYSTEM_NAME");
|
||||
std::string systemName = mf->GetSafeDefinition("CMAKE_SYSTEM_NAME");
|
||||
std::string compilerId = mf->GetSafeDefinition(compilerIdVar.c_str());
|
||||
std::string compilerId = mf->GetSafeDefinition(compilerIdVar);
|
||||
std::string compiler = "gcc"; // default to gcc
|
||||
if (compilerId == "MSVC")
|
||||
{
|
||||
|
@ -404,7 +404,7 @@ cmExtraCodeLiteGenerator::GetCodeLiteCompilerName(const cmMakefile* mf) const
|
||||
compilerIdVar = "CMAKE_C_COMPILER_ID";
|
||||
}
|
||||
|
||||
std::string compilerId = mf->GetSafeDefinition(compilerIdVar.c_str());
|
||||
std::string compilerId = mf->GetSafeDefinition(compilerIdVar);
|
||||
std::string compiler = "gnu g++"; // default to g++
|
||||
|
||||
// Since we need the compiler for parsing purposes only
|
||||
|
@ -205,7 +205,7 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(cmGeneratedFileStream& fout,
|
||||
std::string cacheEntryName = "CMAKE_ECLIPSE_ENVVAR_";
|
||||
cacheEntryName += envVar;
|
||||
const char* cacheValue = mf->GetCacheManager()->GetCacheValue(
|
||||
cacheEntryName.c_str());
|
||||
cacheEntryName);
|
||||
|
||||
// now we have both, decide which one to use
|
||||
std::string valueToUse;
|
||||
@ -219,7 +219,7 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(cmGeneratedFileStream& fout,
|
||||
// The variable is in the env, but not in the cache. Use it and put it
|
||||
// in the cache
|
||||
valueToUse = envVarValue;
|
||||
mf->AddCacheDefinition(cacheEntryName.c_str(), valueToUse.c_str(),
|
||||
mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(),
|
||||
cacheEntryName.c_str(), cmCacheManager::STRING,
|
||||
true);
|
||||
mf->GetCacheManager()->SaveCache(mf->GetHomeOutputDirectory());
|
||||
@ -240,7 +240,7 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(cmGeneratedFileStream& fout,
|
||||
if (valueToUse.find(envVarValue) == std::string::npos)
|
||||
{
|
||||
valueToUse = envVarValue;
|
||||
mf->AddCacheDefinition(cacheEntryName.c_str(), valueToUse.c_str(),
|
||||
mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(),
|
||||
cacheEntryName.c_str(), cmCacheManager::STRING,
|
||||
true);
|
||||
mf->GetCacheManager()->SaveCache(mf->GetHomeOutputDirectory());
|
||||
@ -981,7 +981,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||
std::string systemIncludeDirs = mf->GetSafeDefinition(
|
||||
"CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS");
|
||||
std::vector<std::string> dirs;
|
||||
cmSystemTools::ExpandListArgument(systemIncludeDirs.c_str(), dirs);
|
||||
cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs);
|
||||
this->AppendIncludeDirectories(fout, dirs, emmited);
|
||||
}
|
||||
compiler = mf->GetSafeDefinition("CMAKE_CXX_COMPILER");
|
||||
@ -990,7 +990,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||
std::string systemIncludeDirs = mf->GetSafeDefinition(
|
||||
"CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS");
|
||||
std::vector<std::string> dirs;
|
||||
cmSystemTools::ExpandListArgument(systemIncludeDirs.c_str(), dirs);
|
||||
cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs);
|
||||
this->AppendIncludeDirectories(fout, dirs, emmited);
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ void cmExtraSublimeTextGenerator::
|
||||
if (strcmp(makefile->GetStartOutputDirectory(),
|
||||
makefile->GetHomeOutputDirectory())==0)
|
||||
{
|
||||
this->AppendTarget(fout, ti->first.c_str(), *lg, 0,
|
||||
this->AppendTarget(fout, ti->first, *lg, 0,
|
||||
make.c_str(), makefile, compiler.c_str(),
|
||||
sourceFileFlags, false);
|
||||
}
|
||||
@ -194,7 +194,7 @@ void cmExtraSublimeTextGenerator::
|
||||
break;
|
||||
}
|
||||
|
||||
this->AppendTarget(fout, ti->first.c_str(), *lg, 0,
|
||||
this->AppendTarget(fout, ti->first, *lg, 0,
|
||||
make.c_str(), makefile, compiler.c_str(),
|
||||
sourceFileFlags, false);
|
||||
break;
|
||||
@ -204,12 +204,12 @@ void cmExtraSublimeTextGenerator::
|
||||
case cmTarget::MODULE_LIBRARY:
|
||||
case cmTarget::OBJECT_LIBRARY:
|
||||
{
|
||||
this->AppendTarget(fout, ti->first.c_str(), *lg, &ti->second,
|
||||
this->AppendTarget(fout, ti->first, *lg, &ti->second,
|
||||
make.c_str(), makefile, compiler.c_str(),
|
||||
sourceFileFlags, false);
|
||||
std::string fastTarget = ti->first;
|
||||
fastTarget += "/fast";
|
||||
this->AppendTarget(fout, fastTarget.c_str(), *lg, &ti->second,
|
||||
this->AppendTarget(fout, fastTarget, *lg, &ti->second,
|
||||
make.c_str(), makefile, compiler.c_str(),
|
||||
sourceFileFlags, false);
|
||||
}
|
||||
@ -440,7 +440,7 @@ ComputeDefines(cmSourceFile *source, cmLocalGenerator* lg, cmTarget *target,
|
||||
{
|
||||
std::string defPropName = "COMPILE_DEFINITIONS_";
|
||||
defPropName += cmSystemTools::UpperCase(config);
|
||||
lg->AppendDefines(defines, source->GetProperty(defPropName.c_str()));
|
||||
lg->AppendDefines(defines, source->GetProperty(defPropName));
|
||||
}
|
||||
|
||||
std::string definesString;
|
||||
|
@ -48,7 +48,7 @@ bool cmFLTKWrapUICommand
|
||||
for(std::vector<std::string>::iterator i = (newArgs.begin() + 1);
|
||||
i != newArgs.end(); i++)
|
||||
{
|
||||
cmSourceFile *curr = this->Makefile->GetSource(i->c_str());
|
||||
cmSourceFile *curr = this->Makefile->GetSource(*i);
|
||||
// if we should use the source GUI
|
||||
// to generate .cxx and .h files
|
||||
if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
|
||||
@ -81,16 +81,16 @@ bool cmFLTKWrapUICommand
|
||||
std::string no_main_dependency = "";
|
||||
const char* no_comment = 0;
|
||||
const char* no_working_dir = 0;
|
||||
this->Makefile->AddCustomCommandToOutput(cxxres.c_str(),
|
||||
this->Makefile->AddCustomCommandToOutput(cxxres,
|
||||
depends, no_main_dependency,
|
||||
commandLines, no_comment,
|
||||
no_working_dir);
|
||||
this->Makefile->AddCustomCommandToOutput(hname.c_str(),
|
||||
this->Makefile->AddCustomCommandToOutput(hname,
|
||||
depends, no_main_dependency,
|
||||
commandLines, no_comment,
|
||||
no_working_dir);
|
||||
|
||||
cmSourceFile *sf = this->Makefile->GetSource(cxxres.c_str());
|
||||
cmSourceFile *sf = this->Makefile->GetSource(cxxres);
|
||||
sf->AddDepend(hname.c_str());
|
||||
sf->AddDepend(origname.c_str());
|
||||
this->GeneratedSourcesClasses.push_back(sf);
|
||||
@ -110,7 +110,7 @@ bool cmFLTKWrapUICommand
|
||||
}
|
||||
std::string varName = this->Target;
|
||||
varName += "_FLTK_UI_SRCS";
|
||||
this->Makefile->AddDefinition(varName.c_str(), sourceListValue.c_str());
|
||||
this->Makefile->AddDefinition(varName, sourceListValue.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ bool cmFileCommand
|
||||
}
|
||||
|
||||
std::string e = "does not recognize sub-command "+subCommand;
|
||||
this->SetError(e.c_str());
|
||||
this->SetError(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -205,7 +205,7 @@ bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args,
|
||||
std::string e
|
||||
= "attempted to write a file: " + fileName +
|
||||
" into a source directory.";
|
||||
this->SetError(e.c_str());
|
||||
this->SetError(e);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
return false;
|
||||
}
|
||||
@ -235,7 +235,7 @@ bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args,
|
||||
std::string error = "Internal CMake error when trying to open file: ";
|
||||
error += fileName.c_str();
|
||||
error += " for writing.";
|
||||
this->SetError(error.c_str());
|
||||
this->SetError(error);
|
||||
return false;
|
||||
}
|
||||
file << message;
|
||||
@ -295,7 +295,7 @@ bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args)
|
||||
std::string error = "Internal CMake error when trying to open file: ";
|
||||
error += fileName.c_str();
|
||||
error += " for reading.";
|
||||
this->SetError(error.c_str());
|
||||
this->SetError(error);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -359,7 +359,7 @@ bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args)
|
||||
}
|
||||
}
|
||||
}
|
||||
this->Makefile->AddDefinition(variable.c_str(), output.c_str());
|
||||
this->Makefile->AddDefinition(variable, output.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -371,23 +371,23 @@ bool cmFileCommand::HandleHashCommand(std::vector<std::string> const& args)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << args[0] << " requires a file name and output variable";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
cmsys::auto_ptr<cmCryptoHash> hash(cmCryptoHash::New(args[0].c_str()));
|
||||
if(hash.get())
|
||||
{
|
||||
std::string out = hash->HashFile(args[1].c_str());
|
||||
std::string out = hash->HashFile(args[1]);
|
||||
if(!out.empty())
|
||||
{
|
||||
this->Makefile->AddDefinition(args[2].c_str(), out.c_str());
|
||||
this->Makefile->AddDefinition(args[2], out.c_str());
|
||||
return true;
|
||||
}
|
||||
cmOStringStream e;
|
||||
e << args[0] << " failed to read file \"" << args[1] << "\": "
|
||||
<< cmSystemTools::GetLastSystemError();
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
}
|
||||
return false;
|
||||
#else
|
||||
@ -481,7 +481,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "STRINGS option LIMIT_INPUT value \""
|
||||
<< args[i] << "\" is not an unsigned integer.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
arg_mode = arg_none;
|
||||
@ -494,7 +494,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "STRINGS option LIMIT_OUTPUT value \""
|
||||
<< args[i] << "\" is not an unsigned integer.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
arg_mode = arg_none;
|
||||
@ -507,7 +507,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "STRINGS option LIMIT_COUNT value \""
|
||||
<< args[i] << "\" is not an unsigned integer.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
limit_count = count;
|
||||
@ -521,7 +521,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "STRINGS option LENGTH_MINIMUM value \""
|
||||
<< args[i] << "\" is not an unsigned integer.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
minlen = len;
|
||||
@ -535,7 +535,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "STRINGS option LENGTH_MAXIMUM value \""
|
||||
<< args[i] << "\" is not an unsigned integer.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
maxlen = len;
|
||||
@ -548,7 +548,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "STRINGS option REGEX value \""
|
||||
<< args[i] << "\" could not be compiled.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
have_regex = true;
|
||||
@ -559,7 +559,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "STRINGS given unknown argument \""
|
||||
<< args[i] << "\"";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -586,7 +586,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "STRINGS file \"" << fileName << "\" cannot be read.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -709,7 +709,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
||||
}
|
||||
|
||||
// Save the output in a makefile variable.
|
||||
this->Makefile->AddDefinition(outVar.c_str(), output.c_str());
|
||||
this->Makefile->AddDefinition(outVar, output.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -844,7 +844,7 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
|
||||
}
|
||||
}
|
||||
|
||||
this->Makefile->AddDefinition(variable.c_str(), output.c_str());
|
||||
this->Makefile->AddDefinition(variable, output.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -873,14 +873,14 @@ bool cmFileCommand::HandleMakeDirectoryCommand(
|
||||
{
|
||||
std::string e = "attempted to create a directory: " + *cdir
|
||||
+ " into a source directory.";
|
||||
this->SetError(e.c_str());
|
||||
this->SetError(e);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
return false;
|
||||
}
|
||||
if ( !cmSystemTools::MakeDirectory(cdir->c_str()) )
|
||||
{
|
||||
std::string error = "problem creating directory: " + *cdir;
|
||||
this->SetError(error.c_str());
|
||||
this->SetError(error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -926,7 +926,7 @@ cmFileCommand::HandleDifferentCommand(std::vector<std::string> const& args)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "DIFFERENT given unknown argument " << args[i];
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1041,7 +1041,7 @@ protected:
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << this->Name << " cannot set permissions on \"" << toFile << "\"";
|
||||
this->FileCommand->SetError(e.str().c_str());
|
||||
this->FileCommand->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -1065,7 +1065,7 @@ protected:
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << this->Name << " given invalid permission \"" << arg << "\".";
|
||||
this->FileCommand->SetError(e.str().c_str());
|
||||
this->FileCommand->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -1092,7 +1092,7 @@ protected:
|
||||
// The input file does not exist and installation is not optional.
|
||||
cmOStringStream e;
|
||||
e << this->Name << " cannot find \"" << fromFile << "\".";
|
||||
this->FileCommand->SetError(e.str().c_str());
|
||||
this->FileCommand->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1125,14 +1125,14 @@ protected:
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "option " << arg << " may not appear before PATTERN or REGEX.";
|
||||
this->FileCommand->SetError(e.str().c_str());
|
||||
this->FileCommand->SetError(e.str());
|
||||
this->Doing = DoingError;
|
||||
}
|
||||
void NotAfterMatch(std::string const& arg)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "option " << arg << " may not appear after PATTERN or REGEX.";
|
||||
this->FileCommand->SetError(e.str().c_str());
|
||||
this->FileCommand->SetError(e.str());
|
||||
this->Doing = DoingError;
|
||||
}
|
||||
virtual void DefaultFilePermissions()
|
||||
@ -1170,7 +1170,7 @@ bool cmFileCopier::Parse(std::vector<std::string> const& args)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "called with unknown argument \"" << args[i] << "\".";
|
||||
this->FileCommand->SetError(e.str().c_str());
|
||||
this->FileCommand->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1186,7 +1186,7 @@ bool cmFileCopier::Parse(std::vector<std::string> const& args)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << this->Name << " given no DESTINATION";
|
||||
this->FileCommand->SetError(e.str().c_str());
|
||||
this->FileCommand->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1366,7 +1366,7 @@ bool cmFileCopier::CheckValue(std::string const& arg)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "could not compile PATTERN \"" << arg << "\".";
|
||||
this->FileCommand->SetError(e.str().c_str());
|
||||
this->FileCommand->SetError(e.str());
|
||||
this->Doing = DoingError;
|
||||
}
|
||||
}
|
||||
@ -1382,7 +1382,7 @@ bool cmFileCopier::CheckValue(std::string const& arg)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "could not compile REGEX \"" << arg << "\".";
|
||||
this->FileCommand->SetError(e.str().c_str());
|
||||
this->FileCommand->SetError(e.str());
|
||||
this->Doing = DoingError;
|
||||
}
|
||||
break;
|
||||
@ -1462,7 +1462,7 @@ bool cmFileCopier::Install(const char* fromFile, const char* toFile)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "INSTALL encountered an empty string input file name.";
|
||||
this->FileCommand->SetError(e.str().c_str());
|
||||
this->FileCommand->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1504,7 +1504,7 @@ bool cmFileCopier::InstallSymlink(const char* fromFile, const char* toFile)
|
||||
cmOStringStream e;
|
||||
e << this->Name << " cannot read symlink \"" << fromFile
|
||||
<< "\" to duplicate at \"" << toFile << "\".";
|
||||
this->FileCommand->SetError(e.str().c_str());
|
||||
this->FileCommand->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1537,7 +1537,7 @@ bool cmFileCopier::InstallSymlink(const char* fromFile, const char* toFile)
|
||||
cmOStringStream e;
|
||||
e << this->Name << " cannot duplicate symlink \"" << fromFile
|
||||
<< "\" at \"" << toFile << "\".";
|
||||
this->FileCommand->SetError(e.str().c_str());
|
||||
this->FileCommand->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1569,7 +1569,7 @@ bool cmFileCopier::InstallFile(const char* fromFile, const char* toFile,
|
||||
cmOStringStream e;
|
||||
e << this->Name << " cannot copy file \"" << fromFile
|
||||
<< "\" to \"" << toFile << "\".";
|
||||
this->FileCommand->SetError(e.str().c_str());
|
||||
this->FileCommand->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1588,7 +1588,7 @@ bool cmFileCopier::InstallFile(const char* fromFile, const char* toFile,
|
||||
cmOStringStream e;
|
||||
e << this->Name << " cannot set modification time on \""
|
||||
<< toFile << "\"";
|
||||
this->FileCommand->SetError(e.str().c_str());
|
||||
this->FileCommand->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1619,7 +1619,7 @@ bool cmFileCopier::InstallDirectory(const char* source,
|
||||
cmOStringStream e;
|
||||
e << this->Name << " cannot make directory \"" << destination << "\": "
|
||||
<< cmSystemTools::GetLastSystemError();
|
||||
this->FileCommand->SetError(e.str().c_str());
|
||||
this->FileCommand->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1910,7 +1910,7 @@ bool cmFileInstaller::CheckKeyword(std::string const& arg)
|
||||
e << "INSTALL called with old-style " << arg << " argument. "
|
||||
<< "This script was generated with an older version of CMake. "
|
||||
<< "Re-run this cmake version on your build tree.";
|
||||
this->FileCommand->SetError(e.str().c_str());
|
||||
this->FileCommand->SetError(e.str());
|
||||
this->Doing = DoingError;
|
||||
}
|
||||
else
|
||||
@ -1976,7 +1976,7 @@ bool cmFileInstaller
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "Option TYPE given unknown value \"" << stype << "\".";
|
||||
this->FileCommand->SetError(e.str().c_str());
|
||||
this->FileCommand->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -2047,7 +2047,7 @@ bool cmFileInstaller::HandleInstallDestination()
|
||||
"absolute path or remove DESTDIR environment variable."
|
||||
"\nDESTINATION=\n";
|
||||
message += destination;
|
||||
this->FileCommand->SetError(message.c_str());
|
||||
this->FileCommand->SetError(message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -2061,7 +2061,7 @@ bool cmFileInstaller::HandleInstallDestination()
|
||||
{
|
||||
std::string errstring = "cannot create directory: " + destination +
|
||||
". Maybe need administrative privileges.";
|
||||
this->FileCommand->SetError(errstring.c_str());
|
||||
this->FileCommand->SetError(errstring);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -2069,7 +2069,7 @@ bool cmFileInstaller::HandleInstallDestination()
|
||||
{
|
||||
std::string errstring = "INSTALL destination: " + destination +
|
||||
" is not a directory.";
|
||||
this->FileCommand->SetError(errstring.c_str());
|
||||
this->FileCommand->SetError(errstring);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -2118,7 +2118,7 @@ cmFileCommand::HandleRPathChangeCommand(std::vector<std::string> const& args)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "RPATH_CHANGE given unknown argument " << args[i];
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -2141,7 +2141,7 @@ cmFileCommand::HandleRPathChangeCommand(std::vector<std::string> const& args)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "RPATH_CHANGE given FILE \"" << file << "\" that does not exist.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
bool success = true;
|
||||
@ -2157,7 +2157,7 @@ cmFileCommand::HandleRPathChangeCommand(std::vector<std::string> const& args)
|
||||
<< "to the file:\n"
|
||||
<< " " << file << "\n"
|
||||
<< emsg;
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
success = false;
|
||||
}
|
||||
if(success)
|
||||
@ -2203,7 +2203,7 @@ cmFileCommand::HandleRPathRemoveCommand(std::vector<std::string> const& args)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "RPATH_REMOVE given unknown argument " << args[i];
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -2216,7 +2216,7 @@ cmFileCommand::HandleRPathRemoveCommand(std::vector<std::string> const& args)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "RPATH_REMOVE given FILE \"" << file << "\" that does not exist.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
bool success = true;
|
||||
@ -2230,7 +2230,7 @@ cmFileCommand::HandleRPathRemoveCommand(std::vector<std::string> const& args)
|
||||
e << "RPATH_REMOVE could not remove RPATH from file:\n"
|
||||
<< " " << file << "\n"
|
||||
<< emsg;
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
success = false;
|
||||
}
|
||||
if(success)
|
||||
@ -2284,7 +2284,7 @@ cmFileCommand::HandleRPathCheckCommand(std::vector<std::string> const& args)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "RPATH_CHECK given unknown argument " << args[i];
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -2337,7 +2337,7 @@ bool cmFileCommand::HandleRelativePathCommand(
|
||||
std::string errstring =
|
||||
"RELATIVE_PATH must be passed a full path to the directory: "
|
||||
+ directoryName;
|
||||
this->SetError(errstring.c_str());
|
||||
this->SetError(errstring);
|
||||
return false;
|
||||
}
|
||||
if(!cmSystemTools::FileIsFullPath(fileName.c_str()))
|
||||
@ -2345,13 +2345,13 @@ bool cmFileCommand::HandleRelativePathCommand(
|
||||
std::string errstring =
|
||||
"RELATIVE_PATH must be passed a full path to the file: "
|
||||
+ fileName;
|
||||
this->SetError(errstring.c_str());
|
||||
this->SetError(errstring);
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string res = cmSystemTools::RelativePath(directoryName.c_str(),
|
||||
fileName.c_str());
|
||||
this->Makefile->AddDefinition(outVar.c_str(),
|
||||
this->Makefile->AddDefinition(outVar,
|
||||
res.c_str());
|
||||
return true;
|
||||
}
|
||||
@ -2389,7 +2389,7 @@ bool cmFileCommand::HandleRename(std::vector<std::string> const& args)
|
||||
<< "to\n"
|
||||
<< " " << newname << "\n"
|
||||
<< "because: " << err << "\n";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -2649,7 +2649,7 @@ namespace {
|
||||
{ \
|
||||
std::string e(errstr); \
|
||||
e += ::curl_easy_strerror(result); \
|
||||
this->SetError(e.c_str()); \
|
||||
this->SetError(e); \
|
||||
return false; \
|
||||
}
|
||||
|
||||
@ -2785,7 +2785,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
||||
std::string err =
|
||||
"DOWNLOAD EXPECTED_HASH expects ALGO=value but got: ";
|
||||
err += *i;
|
||||
this->SetError(err.c_str());
|
||||
this->SetError(err);
|
||||
return false;
|
||||
}
|
||||
std::string algo = i->substr(0, pos);
|
||||
@ -2795,7 +2795,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
||||
{
|
||||
std::string err = "DOWNLOAD EXPECTED_HASH given unknown ALGO: ";
|
||||
err += algo;
|
||||
this->SetError(err.c_str());
|
||||
this->SetError(err);
|
||||
return false;
|
||||
}
|
||||
hashMatchMSG = algo + " hash";
|
||||
@ -2809,7 +2809,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
||||
if(cmSystemTools::FileExists(file.c_str()) && hash.get())
|
||||
{
|
||||
std::string msg;
|
||||
std::string actualHash = hash->HashFile(file.c_str());
|
||||
std::string actualHash = hash->HashFile(file);
|
||||
if(actualHash == expectedHash)
|
||||
{
|
||||
msg = "returning early; file already exists with expected ";
|
||||
@ -2819,7 +2819,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
||||
{
|
||||
cmOStringStream result;
|
||||
result << (int)0 << ";\"" << msg;
|
||||
this->Makefile->AddDefinition(statusVar.c_str(),
|
||||
this->Makefile->AddDefinition(statusVar,
|
||||
result.str().c_str());
|
||||
}
|
||||
return true;
|
||||
@ -2828,14 +2828,14 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
||||
// Make sure parent directory exists so we can write to the file
|
||||
// as we receive downloaded bits from curl...
|
||||
//
|
||||
std::string dir = cmSystemTools::GetFilenamePath(file.c_str());
|
||||
std::string dir = cmSystemTools::GetFilenamePath(file);
|
||||
if(!cmSystemTools::FileExists(dir.c_str()) &&
|
||||
!cmSystemTools::MakeDirectory(dir.c_str()))
|
||||
{
|
||||
std::string errstring = "DOWNLOAD error: cannot create directory '"
|
||||
+ dir + "' - Specify file by full path name and verify that you "
|
||||
"have directory creation and file write privileges.";
|
||||
this->SetError(errstring.c_str());
|
||||
this->SetError(errstring);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2954,7 +2954,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
||||
{
|
||||
cmOStringStream result;
|
||||
result << (int)res << ";\"" << ::curl_easy_strerror(res) << "\"";
|
||||
this->Makefile->AddDefinition(statusVar.c_str(),
|
||||
this->Makefile->AddDefinition(statusVar,
|
||||
result.str().c_str());
|
||||
}
|
||||
|
||||
@ -2969,7 +2969,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
||||
//
|
||||
if (hash.get())
|
||||
{
|
||||
std::string actualHash = hash->HashFile(file.c_str());
|
||||
std::string actualHash = hash->HashFile(file);
|
||||
if (actualHash.size() == 0)
|
||||
{
|
||||
this->SetError("DOWNLOAD cannot compute hash on downloaded file");
|
||||
@ -2986,7 +2986,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
||||
<< " status: [" << (int)res << ";\""
|
||||
<< ::curl_easy_strerror(res) << "\"]" << std::endl
|
||||
;
|
||||
this->SetError(oss.str().c_str());
|
||||
this->SetError(oss.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -3000,12 +3000,12 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
||||
|
||||
if(verboseLog.size())
|
||||
{
|
||||
this->Makefile->AddDefinition(verboseLog.c_str(),
|
||||
this->Makefile->AddDefinition(verboseLog,
|
||||
&*chunkDebug.begin());
|
||||
}
|
||||
}
|
||||
|
||||
this->Makefile->AddDefinition(verboseLog.c_str(),
|
||||
this->Makefile->AddDefinition(verboseLog,
|
||||
&*chunkDebug.begin());
|
||||
}
|
||||
|
||||
@ -3102,7 +3102,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
|
||||
{
|
||||
std::string errStr = "UPLOAD cannot open file '";
|
||||
errStr += filename + "' for reading.";
|
||||
this->SetError(errStr.c_str());
|
||||
this->SetError(errStr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3111,7 +3111,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
|
||||
{
|
||||
std::string errStr = "UPLOAD cannot stat file '";
|
||||
errStr += filename + "'.";
|
||||
this->SetError(errStr.c_str());
|
||||
this->SetError(errStr);
|
||||
fclose(fin);
|
||||
return false;
|
||||
}
|
||||
@ -3217,7 +3217,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
|
||||
{
|
||||
cmOStringStream result;
|
||||
result << (int)res << ";\"" << ::curl_easy_strerror(res) << "\"";
|
||||
this->Makefile->AddDefinition(statusVar.c_str(),
|
||||
this->Makefile->AddDefinition(statusVar,
|
||||
result.str().c_str());
|
||||
}
|
||||
|
||||
@ -3246,7 +3246,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
|
||||
log += "\n";
|
||||
}
|
||||
|
||||
this->Makefile->AddDefinition(logVar.c_str(), log.c_str());
|
||||
this->Makefile->AddDefinition(logVar, log.c_str());
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -3368,7 +3368,7 @@ bool cmFileCommand::HandleTimestampCommand(
|
||||
{
|
||||
std::string e = " TIMESTAMP sub-command does not recognize option " +
|
||||
args[argsIndex] + ".";
|
||||
this->SetError(e.c_str());
|
||||
this->SetError(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -3376,7 +3376,7 @@ bool cmFileCommand::HandleTimestampCommand(
|
||||
cmTimestamp timestamp;
|
||||
std::string result = timestamp.FileModificationTime(
|
||||
filename.c_str(), formatString, utcFlag);
|
||||
this->Makefile->AddDefinition(outputVariable.c_str(), result.c_str());
|
||||
this->Makefile->AddDefinition(outputVariable, result.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ void cmFindBase::AddPrefixPaths(std::vector<std::string> const& in_paths,
|
||||
for(std::vector<std::string>::const_iterator it = in_paths.begin();
|
||||
it != in_paths.end(); ++it)
|
||||
{
|
||||
std::string dir = it->c_str();
|
||||
std::string dir = *it;
|
||||
if(!subdir.empty() && !dir.empty() && dir[dir.size()-1] != '/')
|
||||
{
|
||||
dir += "/";
|
||||
@ -323,7 +323,7 @@ void cmFindBase::AddCMakeVariablePath()
|
||||
var += this->CMakePathName;
|
||||
var += "_PATH";
|
||||
this->AddCMakePrefixPath("CMAKE_PREFIX_PATH");
|
||||
this->AddCMakePath(var.c_str());
|
||||
this->AddCMakePath(var);
|
||||
|
||||
if(this->CMakePathName == "PROGRAM")
|
||||
{
|
||||
@ -360,7 +360,7 @@ void cmFindBase::AddCMakeSystemVariablePath()
|
||||
var += this->CMakePathName;
|
||||
var += "_PATH";
|
||||
this->AddCMakePrefixPath("CMAKE_SYSTEM_PREFIX_PATH");
|
||||
this->AddCMakePath(var.c_str());
|
||||
this->AddCMakePath(var);
|
||||
|
||||
if(this->CMakePathName == "PROGRAM")
|
||||
{
|
||||
@ -466,7 +466,7 @@ void cmFindBase::PrintFindStuff()
|
||||
bool cmFindBase::CheckForVariableInCache()
|
||||
{
|
||||
if(const char* cacheValue =
|
||||
this->Makefile->GetDefinition(this->VariableName.c_str()))
|
||||
this->Makefile->GetDefinition(this->VariableName))
|
||||
{
|
||||
cmCacheManager::CacheIterator it =
|
||||
this->Makefile->GetCacheManager()->
|
||||
|
@ -51,7 +51,7 @@ void cmFindCommon::SelectDefaultRootPathMode()
|
||||
std::string findRootPathVar = "CMAKE_FIND_ROOT_PATH_MODE_";
|
||||
findRootPathVar += this->CMakePathName;
|
||||
std::string rootPathMode =
|
||||
this->Makefile->GetSafeDefinition(findRootPathVar.c_str());
|
||||
this->Makefile->GetSafeDefinition(findRootPathVar);
|
||||
if (rootPathMode=="NEVER")
|
||||
{
|
||||
this->FindRootPathMode = RootPathModeNoRootPath;
|
||||
@ -361,7 +361,7 @@ void cmFindCommon::AddUserPath(std::string const& p,
|
||||
// Expand using the view of the target application.
|
||||
std::string expanded = p;
|
||||
cmSystemTools::ExpandRegistryValues(expanded, view);
|
||||
cmSystemTools::GlobDirs(expanded.c_str(), paths);
|
||||
cmSystemTools::GlobDirs(expanded, paths);
|
||||
|
||||
// Executables can be either 32-bit or 64-bit, so expand using the
|
||||
// alternative view.
|
||||
@ -369,7 +369,7 @@ void cmFindCommon::AddUserPath(std::string const& p,
|
||||
{
|
||||
expanded = p;
|
||||
cmSystemTools::ExpandRegistryValues(expanded, other_view);
|
||||
cmSystemTools::GlobDirs(expanded.c_str(), paths);
|
||||
cmSystemTools::GlobDirs(expanded, paths);
|
||||
}
|
||||
}
|
||||
|
||||
@ -433,7 +433,7 @@ void cmFindCommon::AddPathInternal(std::string const& in_path,
|
||||
// Insert the path if has not already been emitted.
|
||||
if(this->SearchPathsEmitted.insert(fullPath).second)
|
||||
{
|
||||
this->SearchPaths.push_back(fullPath.c_str());
|
||||
this->SearchPaths.push_back(fullPath);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ bool cmFindLibraryCommand
|
||||
// value.
|
||||
if(this->AlreadyInCacheWithoutMetaInfo)
|
||||
{
|
||||
this->Makefile->AddCacheDefinition(this->VariableName.c_str(), "",
|
||||
this->Makefile->AddCacheDefinition(this->VariableName, "",
|
||||
this->VariableDocumentation.c_str(),
|
||||
cmCacheManager::FILEPATH);
|
||||
}
|
||||
@ -69,14 +69,14 @@ bool cmFindLibraryCommand
|
||||
if(library != "")
|
||||
{
|
||||
// Save the value in the cache
|
||||
this->Makefile->AddCacheDefinition(this->VariableName.c_str(),
|
||||
this->Makefile->AddCacheDefinition(this->VariableName,
|
||||
library.c_str(),
|
||||
this->VariableDocumentation.c_str(),
|
||||
cmCacheManager::FILEPATH);
|
||||
return true;
|
||||
}
|
||||
std::string notfound = this->VariableName + "-NOTFOUND";
|
||||
this->Makefile->AddCacheDefinition(this->VariableName.c_str(),
|
||||
this->Makefile->AddCacheDefinition(this->VariableName,
|
||||
notfound.c_str(),
|
||||
this->VariableDocumentation.c_str(),
|
||||
cmCacheManager::FILEPATH);
|
||||
|
@ -223,7 +223,7 @@ bool cmFindPackageCommand
|
||||
}
|
||||
|
||||
std::string req_var = this->Name + "_FIND_REQUIRED_" + args[i];
|
||||
this->AddFindDefinition(req_var.c_str(), isRequired);
|
||||
this->AddFindDefinition(req_var, isRequired);
|
||||
|
||||
// Append to the list of required components.
|
||||
components += components_sep;
|
||||
@ -255,7 +255,7 @@ bool cmFindPackageCommand
|
||||
e << "given CONFIGS option followed by invalid file name \""
|
||||
<< args[i] << "\". The names given must be file names without "
|
||||
<< "a path and with a \".cmake\" extension.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
this->Configs.push_back(args[i]);
|
||||
@ -269,7 +269,7 @@ bool cmFindPackageCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "called with invalid argument \"" << args[i].c_str() << "\"";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -286,7 +286,7 @@ bool cmFindPackageCommand
|
||||
{
|
||||
e << " " << doubledComponents[i] << "\n";
|
||||
}
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -309,7 +309,7 @@ bool cmFindPackageCommand
|
||||
e << " " << args[*si] << "\n";
|
||||
}
|
||||
e << "The options are incompatible.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -327,7 +327,7 @@ bool cmFindPackageCommand
|
||||
// another find_package(<name>) call.
|
||||
std::string mod = this->Name;
|
||||
mod += "_FIND_MODULE";
|
||||
if(this->Makefile->IsOn(mod.c_str()))
|
||||
if(this->Makefile->IsOn(mod))
|
||||
{
|
||||
if(this->Version.empty())
|
||||
{
|
||||
@ -335,17 +335,17 @@ bool cmFindPackageCommand
|
||||
// Requested version string.
|
||||
std::string ver = this->Name;
|
||||
ver += "_FIND_VERSION";
|
||||
this->Version = this->Makefile->GetSafeDefinition(ver.c_str());
|
||||
this->Version = this->Makefile->GetSafeDefinition(ver);
|
||||
|
||||
// Whether an exact version is required.
|
||||
std::string exact = this->Name;
|
||||
exact += "_FIND_VERSION_EXACT";
|
||||
this->VersionExact = this->Makefile->IsOn(exact.c_str());
|
||||
this->VersionExact = this->Makefile->IsOn(exact);
|
||||
}
|
||||
if(components.empty())
|
||||
{
|
||||
std::string components_var = this->Name + "_FIND_COMPONENTS";
|
||||
components = this->Makefile->GetSafeDefinition(components_var.c_str());
|
||||
components = this->Makefile->GetSafeDefinition(components_var);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -373,7 +373,7 @@ bool cmFindPackageCommand
|
||||
|
||||
std::string disableFindPackageVar = "CMAKE_DISABLE_FIND_PACKAGE_";
|
||||
disableFindPackageVar += this->Name;
|
||||
if(this->Makefile->IsOn(disableFindPackageVar.c_str()))
|
||||
if(this->Makefile->IsOn(disableFindPackageVar))
|
||||
{
|
||||
if (this->Required)
|
||||
{
|
||||
@ -381,7 +381,7 @@ bool cmFindPackageCommand
|
||||
e << "for module " << this->Name << " called with REQUIRED, but "
|
||||
<< disableFindPackageVar
|
||||
<< " is enabled. A REQUIRED package cannot be disabled.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -488,7 +488,7 @@ void cmFindPackageCommand::SetModuleVariables(const std::string& components)
|
||||
|
||||
// Store the list of components.
|
||||
std::string components_var = this->Name + "_FIND_COMPONENTS";
|
||||
this->AddFindDefinition(components_var.c_str(), components.c_str());
|
||||
this->AddFindDefinition(components_var, components.c_str());
|
||||
|
||||
if(this->Quiet)
|
||||
{
|
||||
@ -496,7 +496,7 @@ void cmFindPackageCommand::SetModuleVariables(const std::string& components)
|
||||
// quietly.
|
||||
std::string quietly = this->Name;
|
||||
quietly += "_FIND_QUIETLY";
|
||||
this->AddFindDefinition(quietly.c_str(), "1");
|
||||
this->AddFindDefinition(quietly, "1");
|
||||
}
|
||||
|
||||
if(this->Required)
|
||||
@ -505,7 +505,7 @@ void cmFindPackageCommand::SetModuleVariables(const std::string& components)
|
||||
// a fatal error if the package is not found.
|
||||
std::string req = this->Name;
|
||||
req += "_FIND_REQUIRED";
|
||||
this->AddFindDefinition(req.c_str(), "1");
|
||||
this->AddFindDefinition(req, "1");
|
||||
}
|
||||
|
||||
if(!this->Version.empty())
|
||||
@ -514,23 +514,23 @@ void cmFindPackageCommand::SetModuleVariables(const std::string& components)
|
||||
// package has been requested.
|
||||
std::string ver = this->Name;
|
||||
ver += "_FIND_VERSION";
|
||||
this->AddFindDefinition(ver.c_str(), this->Version.c_str());
|
||||
this->AddFindDefinition(ver, this->Version.c_str());
|
||||
char buf[64];
|
||||
sprintf(buf, "%u", this->VersionMajor);
|
||||
this->AddFindDefinition((ver+"_MAJOR").c_str(), buf);
|
||||
this->AddFindDefinition(ver+"_MAJOR", buf);
|
||||
sprintf(buf, "%u", this->VersionMinor);
|
||||
this->AddFindDefinition((ver+"_MINOR").c_str(), buf);
|
||||
this->AddFindDefinition(ver+"_MINOR", buf);
|
||||
sprintf(buf, "%u", this->VersionPatch);
|
||||
this->AddFindDefinition((ver+"_PATCH").c_str(), buf);
|
||||
this->AddFindDefinition(ver+"_PATCH", buf);
|
||||
sprintf(buf, "%u", this->VersionTweak);
|
||||
this->AddFindDefinition((ver+"_TWEAK").c_str(), buf);
|
||||
this->AddFindDefinition(ver+"_TWEAK", buf);
|
||||
sprintf(buf, "%u", this->VersionCount);
|
||||
this->AddFindDefinition((ver+"_COUNT").c_str(), buf);
|
||||
this->AddFindDefinition(ver+"_COUNT", buf);
|
||||
|
||||
// Tell the module whether an exact version has been requested.
|
||||
std::string exact = this->Name;
|
||||
exact += "_FIND_VERSION_EXACT";
|
||||
this->AddFindDefinition(exact.c_str(), this->VersionExact? "1":"0");
|
||||
this->AddFindDefinition(exact, this->VersionExact? "1":"0");
|
||||
}
|
||||
}
|
||||
|
||||
@ -559,11 +559,11 @@ void cmFindPackageCommand::RestoreFindDefinitions()
|
||||
OriginalDef const& od = i->second;
|
||||
if(od.exists)
|
||||
{
|
||||
this->Makefile->AddDefinition(i->first.c_str(), od.value.c_str());
|
||||
this->Makefile->AddDefinition(i->first, od.value.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
this->Makefile->RemoveDefinition(i->first.c_str());
|
||||
this->Makefile->RemoveDefinition(i->first);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -582,9 +582,9 @@ bool cmFindPackageCommand::FindModule(bool& found)
|
||||
found = true;
|
||||
std::string var = this->Name;
|
||||
var += "_FIND_MODULE";
|
||||
this->Makefile->AddDefinition(var.c_str(), "1");
|
||||
this->Makefile->AddDefinition(var, "1");
|
||||
bool result = this->ReadListFile(mfile.c_str(), DoPolicyScope);
|
||||
this->Makefile->RemoveDefinition(var.c_str());
|
||||
this->Makefile->RemoveDefinition(var);
|
||||
return result;
|
||||
}
|
||||
return true;
|
||||
@ -602,7 +602,7 @@ bool cmFindPackageCommand::HandlePackageMode()
|
||||
upperFound += "_FOUND";
|
||||
|
||||
// Try to find the config file.
|
||||
const char* def = this->Makefile->GetDefinition(this->Variable.c_str());
|
||||
const char* def = this->Makefile->GetDefinition(this->Variable);
|
||||
|
||||
// Try to load the config file if the directory is known
|
||||
bool fileFound = false;
|
||||
@ -627,14 +627,14 @@ bool cmFindPackageCommand::HandlePackageMode()
|
||||
this->FileFound = file;
|
||||
fileFound = true;
|
||||
}
|
||||
def = this->Makefile->GetDefinition(this->Variable.c_str());
|
||||
def = this->Makefile->GetDefinition(this->Variable);
|
||||
}
|
||||
|
||||
// Search for the config file if it is not already found.
|
||||
if(cmSystemTools::IsOff(def) || !fileFound)
|
||||
{
|
||||
fileFound = this->FindConfig();
|
||||
def = this->Makefile->GetDefinition(this->Variable.c_str());
|
||||
def = this->Makefile->GetDefinition(this->Variable);
|
||||
}
|
||||
|
||||
// Sanity check.
|
||||
@ -659,16 +659,16 @@ bool cmFindPackageCommand::HandlePackageMode()
|
||||
|
||||
if(fileFound)
|
||||
{
|
||||
if ((this->Makefile->IsDefinitionSet(foundVar.c_str()))
|
||||
&& (this->Makefile->IsOn(foundVar.c_str()) == false))
|
||||
if ((this->Makefile->IsDefinitionSet(foundVar))
|
||||
&& (this->Makefile->IsOn(foundVar) == false))
|
||||
{
|
||||
// by removing Foo_FOUND here if it is FALSE, we don't really change
|
||||
// the situation for the Config file which is about to be included,
|
||||
// but we make it possible to detect later on whether the Config file
|
||||
// has set Foo_FOUND to FALSE itself:
|
||||
this->Makefile->RemoveDefinition(foundVar.c_str());
|
||||
this->Makefile->RemoveDefinition(foundVar);
|
||||
}
|
||||
this->Makefile->RemoveDefinition(notFoundMessageVar.c_str());
|
||||
this->Makefile->RemoveDefinition(notFoundMessageVar);
|
||||
|
||||
// Set the version variables before loading the config file.
|
||||
// It may override them.
|
||||
@ -681,14 +681,14 @@ bool cmFindPackageCommand::HandlePackageMode()
|
||||
found = true;
|
||||
|
||||
// Check whether the Config file has set Foo_FOUND to FALSE:
|
||||
if ((this->Makefile->IsDefinitionSet(foundVar.c_str()))
|
||||
&& (this->Makefile->IsOn(foundVar.c_str()) == false))
|
||||
if ((this->Makefile->IsDefinitionSet(foundVar))
|
||||
&& (this->Makefile->IsOn(foundVar) == false))
|
||||
{
|
||||
// we get here if the Config file has set Foo_FOUND actively to FALSE
|
||||
found = false;
|
||||
configFileSetFOUNDFalse = true;
|
||||
notFoundMessage = this->Makefile->GetSafeDefinition(
|
||||
notFoundMessageVar.c_str());
|
||||
notFoundMessageVar);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -810,18 +810,18 @@ bool cmFindPackageCommand::HandlePackageMode()
|
||||
}
|
||||
|
||||
// Set a variable marking whether the package was found.
|
||||
this->Makefile->AddDefinition(foundVar.c_str(), found? "1":"0");
|
||||
this->Makefile->AddDefinition(foundVar, found? "1":"0");
|
||||
|
||||
// Set a variable naming the configuration file that was found.
|
||||
std::string fileVar = this->Name;
|
||||
fileVar += "_CONFIG";
|
||||
if(found)
|
||||
{
|
||||
this->Makefile->AddDefinition(fileVar.c_str(), this->FileFound.c_str());
|
||||
this->Makefile->AddDefinition(fileVar, this->FileFound.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
this->Makefile->RemoveDefinition(fileVar.c_str());
|
||||
this->Makefile->RemoveDefinition(fileVar);
|
||||
}
|
||||
|
||||
std::string consideredConfigsVar = this->Name;
|
||||
@ -843,10 +843,10 @@ bool cmFindPackageCommand::HandlePackageMode()
|
||||
sep = ";";
|
||||
}
|
||||
|
||||
this->Makefile->AddDefinition(consideredConfigsVar.c_str(),
|
||||
this->Makefile->AddDefinition(consideredConfigsVar,
|
||||
consideredConfigFiles.c_str());
|
||||
|
||||
this->Makefile->AddDefinition(consideredVersionsVar.c_str(),
|
||||
this->Makefile->AddDefinition(consideredVersionsVar,
|
||||
consideredVersions.c_str());
|
||||
|
||||
return result;
|
||||
@ -906,7 +906,7 @@ bool cmFindPackageCommand::FindConfig()
|
||||
help += this->Name;
|
||||
help += ".";
|
||||
// We force the value since we do not get here if it was already set.
|
||||
this->Makefile->AddCacheDefinition(this->Variable.c_str(),
|
||||
this->Makefile->AddCacheDefinition(this->Variable,
|
||||
init.c_str(), help.c_str(),
|
||||
cmCacheManager::PATH, true);
|
||||
return found;
|
||||
@ -968,7 +968,7 @@ bool cmFindPackageCommand::ReadListFile(const char* f, PolicyScopeRule psr)
|
||||
std::string e = "Error reading CMake code from \"";
|
||||
e += f;
|
||||
e += "\".";
|
||||
this->SetError(e.c_str());
|
||||
this->SetError(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1048,14 +1048,14 @@ void cmFindPackageCommand::AppendSuccessInformation()
|
||||
std::string transitivePropName = "_CMAKE_";
|
||||
transitivePropName += this->Name + "_TRANSITIVE_DEPENDENCY";
|
||||
this->Makefile->GetCMakeInstance()
|
||||
->SetProperty(transitivePropName.c_str(), "False");
|
||||
->SetProperty(transitivePropName, "False");
|
||||
}
|
||||
std::string found = this->Name;
|
||||
found += "_FOUND";
|
||||
std::string upperFound = cmSystemTools::UpperCase(found);
|
||||
|
||||
const char* upperResult = this->Makefile->GetDefinition(upperFound.c_str());
|
||||
const char* result = this->Makefile->GetDefinition(found.c_str());
|
||||
const char* upperResult = this->Makefile->GetDefinition(upperFound);
|
||||
const char* result = this->Makefile->GetDefinition(found);
|
||||
bool packageFound = ((cmSystemTools::IsOn(result))
|
||||
|| (cmSystemTools::IsOn(upperResult)));
|
||||
|
||||
@ -1066,7 +1066,7 @@ void cmFindPackageCommand::AppendSuccessInformation()
|
||||
std::string quietInfoPropName = "_CMAKE_";
|
||||
quietInfoPropName += this->Name;
|
||||
quietInfoPropName += "_QUIET";
|
||||
this->Makefile->GetCMakeInstance()->SetProperty(quietInfoPropName.c_str(),
|
||||
this->Makefile->GetCMakeInstance()->SetProperty(quietInfoPropName,
|
||||
this->Quiet ? "TRUE" : "FALSE");
|
||||
|
||||
// set a global property to record the required version of this package
|
||||
@ -1080,7 +1080,7 @@ void cmFindPackageCommand::AppendSuccessInformation()
|
||||
versionInfo += " ";
|
||||
versionInfo += this->Version;
|
||||
}
|
||||
this->Makefile->GetCMakeInstance()->SetProperty(versionInfoPropName.c_str(),
|
||||
this->Makefile->GetCMakeInstance()->SetProperty(versionInfoPropName,
|
||||
versionInfo.c_str());
|
||||
if (this->Required)
|
||||
{
|
||||
@ -1088,7 +1088,7 @@ void cmFindPackageCommand::AppendSuccessInformation()
|
||||
requiredInfoPropName += this->Name;
|
||||
requiredInfoPropName += "_TYPE";
|
||||
this->Makefile->GetCMakeInstance()->SetProperty(
|
||||
requiredInfoPropName.c_str(), "REQUIRED");
|
||||
requiredInfoPropName, "REQUIRED");
|
||||
}
|
||||
|
||||
|
||||
@ -1648,25 +1648,25 @@ void cmFindPackageCommand::StoreVersionFound()
|
||||
ver += "_VERSION";
|
||||
if(this->VersionFound.empty())
|
||||
{
|
||||
this->Makefile->RemoveDefinition(ver.c_str());
|
||||
this->Makefile->RemoveDefinition(ver);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->Makefile->AddDefinition(ver.c_str(), this->VersionFound.c_str());
|
||||
this->Makefile->AddDefinition(ver, this->VersionFound.c_str());
|
||||
}
|
||||
|
||||
// Store the version components.
|
||||
char buf[64];
|
||||
sprintf(buf, "%u", this->VersionFoundMajor);
|
||||
this->Makefile->AddDefinition((ver+"_MAJOR").c_str(), buf);
|
||||
this->Makefile->AddDefinition(ver+"_MAJOR", buf);
|
||||
sprintf(buf, "%u", this->VersionFoundMinor);
|
||||
this->Makefile->AddDefinition((ver+"_MINOR").c_str(), buf);
|
||||
this->Makefile->AddDefinition(ver+"_MINOR", buf);
|
||||
sprintf(buf, "%u", this->VersionFoundPatch);
|
||||
this->Makefile->AddDefinition((ver+"_PATCH").c_str(), buf);
|
||||
this->Makefile->AddDefinition(ver+"_PATCH", buf);
|
||||
sprintf(buf, "%u", this->VersionFoundTweak);
|
||||
this->Makefile->AddDefinition((ver+"_TWEAK").c_str(), buf);
|
||||
this->Makefile->AddDefinition(ver+"_TWEAK", buf);
|
||||
sprintf(buf, "%u", this->VersionFoundCount);
|
||||
this->Makefile->AddDefinition((ver+"_COUNT").c_str(), buf);
|
||||
this->Makefile->AddDefinition(ver+"_COUNT", buf);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -38,7 +38,7 @@ bool cmFindPathCommand
|
||||
if(this->AlreadyInCacheWithoutMetaInfo)
|
||||
{
|
||||
this->Makefile->AddCacheDefinition(
|
||||
this->VariableName.c_str(), "",
|
||||
this->VariableName, "",
|
||||
this->VariableDocumentation.c_str(),
|
||||
(this->IncludeFileInPath ?
|
||||
cmCacheManager::FILEPATH :cmCacheManager::PATH)
|
||||
@ -51,14 +51,14 @@ bool cmFindPathCommand
|
||||
if(result.size() != 0)
|
||||
{
|
||||
this->Makefile->AddCacheDefinition
|
||||
(this->VariableName.c_str(), result.c_str(),
|
||||
(this->VariableName, result.c_str(),
|
||||
this->VariableDocumentation.c_str(),
|
||||
(this->IncludeFileInPath) ?
|
||||
cmCacheManager::FILEPATH :cmCacheManager::PATH);
|
||||
return true;
|
||||
}
|
||||
this->Makefile->AddCacheDefinition
|
||||
(this->VariableName.c_str(),
|
||||
(this->VariableName,
|
||||
(this->VariableName + "-NOTFOUND").c_str(),
|
||||
this->VariableDocumentation.c_str(),
|
||||
(this->IncludeFileInPath) ?
|
||||
|
@ -35,7 +35,7 @@ bool cmFindProgramCommand
|
||||
// value.
|
||||
if(this->AlreadyInCacheWithoutMetaInfo)
|
||||
{
|
||||
this->Makefile->AddCacheDefinition(this->VariableName.c_str(), "",
|
||||
this->Makefile->AddCacheDefinition(this->VariableName, "",
|
||||
this->VariableDocumentation.c_str(),
|
||||
cmCacheManager::FILEPATH);
|
||||
}
|
||||
@ -46,14 +46,14 @@ bool cmFindProgramCommand
|
||||
if(result != "")
|
||||
{
|
||||
// Save the value in the cache
|
||||
this->Makefile->AddCacheDefinition(this->VariableName.c_str(),
|
||||
this->Makefile->AddCacheDefinition(this->VariableName,
|
||||
result.c_str(),
|
||||
this->VariableDocumentation.c_str(),
|
||||
cmCacheManager::FILEPATH);
|
||||
|
||||
return true;
|
||||
}
|
||||
this->Makefile->AddCacheDefinition(this->VariableName.c_str(),
|
||||
this->Makefile->AddCacheDefinition(this->VariableName,
|
||||
(this->VariableName + "-NOTFOUND").c_str(),
|
||||
this->VariableDocumentation.c_str(),
|
||||
cmCacheManager::FILEPATH);
|
||||
|
@ -35,9 +35,9 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
||||
// at end of for each execute recorded commands
|
||||
// store the old value
|
||||
std::string oldDef;
|
||||
if (mf.GetDefinition(this->Args[0].c_str()))
|
||||
if (mf.GetDefinition(this->Args[0]))
|
||||
{
|
||||
oldDef = mf.GetDefinition(this->Args[0].c_str());
|
||||
oldDef = mf.GetDefinition(this->Args[0]);
|
||||
}
|
||||
std::vector<std::string>::const_iterator j = this->Args.begin();
|
||||
++j;
|
||||
@ -47,7 +47,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
||||
for( ; j != this->Args.end(); ++j)
|
||||
{
|
||||
// set the variable to the loop value
|
||||
mf.AddDefinition(this->Args[0].c_str(),j->c_str());
|
||||
mf.AddDefinition(this->Args[0],j->c_str());
|
||||
// Invoke all the functions that were collected in the block.
|
||||
cmExecutionStatus status;
|
||||
for(unsigned int c = 0; c < this->Functions.size(); ++c)
|
||||
@ -58,13 +58,13 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
||||
{
|
||||
inStatus.SetReturnInvoked(true);
|
||||
// restore the variable to its prior value
|
||||
mf.AddDefinition(this->Args[0].c_str(),oldDef.c_str());
|
||||
mf.AddDefinition(this->Args[0],oldDef.c_str());
|
||||
return true;
|
||||
}
|
||||
if (status.GetBreakInvoked())
|
||||
{
|
||||
// restore the variable to its prior value
|
||||
mf.AddDefinition(this->Args[0].c_str(),oldDef.c_str());
|
||||
mf.AddDefinition(this->Args[0],oldDef.c_str());
|
||||
return true;
|
||||
}
|
||||
if(cmSystemTools::GetFatalErrorOccured() )
|
||||
@ -74,7 +74,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
||||
}
|
||||
}
|
||||
// restore the variable to its prior value
|
||||
mf.AddDefinition(this->Args[0].c_str(),oldDef.c_str());
|
||||
mf.AddDefinition(this->Args[0],oldDef.c_str());
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@ -166,7 +166,7 @@ bool cmForEachCommand
|
||||
cmOStringStream str;
|
||||
str << "called with incorrect range specification: start ";
|
||||
str << start << ", stop " << stop << ", step " << step;
|
||||
this->SetError(str.str().c_str());
|
||||
this->SetError(str.str());
|
||||
return false;
|
||||
}
|
||||
std::vector<std::string> range;
|
||||
@ -226,7 +226,7 @@ bool cmForEachCommand::HandleInMode(std::vector<std::string> const& args)
|
||||
}
|
||||
else if(doing == DoingLists)
|
||||
{
|
||||
const char* value = this->Makefile->GetDefinition(args[i].c_str());
|
||||
const char* value = this->Makefile->GetDefinition(args[i]);
|
||||
if(value && *value)
|
||||
{
|
||||
cmSystemTools::ExpandListArgument(value, f->Args, true);
|
||||
|
@ -89,7 +89,7 @@ bool cmFunctionHelperCommand::InvokeInitialPass
|
||||
std::string errorMsg =
|
||||
"Function invoked with incorrect arguments for function named: ";
|
||||
errorMsg += this->Args[0];
|
||||
this->SetError(errorMsg.c_str());
|
||||
this->SetError(errorMsg);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -113,15 +113,15 @@ bool cmFunctionHelperCommand::InvokeInitialPass
|
||||
{
|
||||
cmOStringStream tmpStream;
|
||||
tmpStream << "ARGV" << t;
|
||||
this->Makefile->AddDefinition(tmpStream.str().c_str(),
|
||||
this->Makefile->AddDefinition(tmpStream.str(),
|
||||
expandedArgs[t].c_str());
|
||||
this->Makefile->MarkVariableAsUsed(tmpStream.str().c_str());
|
||||
this->Makefile->MarkVariableAsUsed(tmpStream.str());
|
||||
}
|
||||
|
||||
// define the formal arguments
|
||||
for (unsigned int j = 1; j < this->Args.size(); ++j)
|
||||
{
|
||||
this->Makefile->AddDefinition(this->Args[j].c_str(),
|
||||
this->Makefile->AddDefinition(this->Args[j],
|
||||
expandedArgs[j-1].c_str());
|
||||
}
|
||||
|
||||
@ -219,8 +219,8 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
||||
}
|
||||
|
||||
std::string newName = "_" + this->Args[0];
|
||||
mf.GetCMakeInstance()->RenameCommand(this->Args[0].c_str(),
|
||||
newName.c_str());
|
||||
mf.GetCMakeInstance()->RenameCommand(this->Args[0],
|
||||
newName);
|
||||
mf.AddCommand(f);
|
||||
|
||||
// remove the function blocker now that the function is defined
|
||||
|
@ -379,7 +379,7 @@ void cmGeneratorExpression::Split(const std::string &input,
|
||||
}
|
||||
if(!part.empty())
|
||||
{
|
||||
cmSystemTools::ExpandListArgument(part.c_str(), output);
|
||||
cmSystemTools::ExpandListArgument(part, output);
|
||||
}
|
||||
}
|
||||
pos += 2;
|
||||
|
@ -92,7 +92,7 @@ void cmGeneratorExpressionDAGChecker::ReportError(
|
||||
<< "Self reference on target \""
|
||||
<< context->HeadTarget->GetName() << "\".\n";
|
||||
context->Makefile->GetCMakeInstance()
|
||||
->IssueMessage(cmake::FATAL_ERROR, e.str().c_str(),
|
||||
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
||||
parent->Backtrace);
|
||||
return;
|
||||
}
|
||||
@ -103,7 +103,7 @@ void cmGeneratorExpressionDAGChecker::ReportError(
|
||||
<< " " << expr << "\n"
|
||||
<< "Dependency loop found.";
|
||||
context->Makefile->GetCMakeInstance()
|
||||
->IssueMessage(cmake::FATAL_ERROR, e.str().c_str(),
|
||||
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
||||
context->Backtrace);
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ void cmGeneratorExpressionDAGChecker::ReportError(
|
||||
<< (parent->Content ? parent->Content->GetOriginalExpression() : expr)
|
||||
<< "\n";
|
||||
context->Makefile->GetCMakeInstance()
|
||||
->IssueMessage(cmake::FATAL_ERROR, e.str().c_str(),
|
||||
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
||||
parent->Backtrace);
|
||||
parent = parent->Parent;
|
||||
++loopStep;
|
||||
|
@ -50,7 +50,7 @@ void cmGeneratorExpressionEvaluationFile::Generate(const std::string& config,
|
||||
cmOStringStream e;
|
||||
e << "Evaluation file condition \"" << rawCondition << "\" did "
|
||||
"not evaluate to valid content. Got \"" << condResult << "\".";
|
||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
|
||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -72,7 +72,7 @@ void cmGeneratorExpressionEvaluationFile::Generate(const std::string& config,
|
||||
cmOStringStream e;
|
||||
e << "Evaluation file to be written multiple times for different "
|
||||
"configurations with different content:\n " << outputFileName;
|
||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
|
||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ void cmGeneratorExpressionEvaluationFile::Generate(const std::string& config,
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "Evaluation file \"" << outputFileName << "\" cannot be written.";
|
||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
|
||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ void cmGeneratorExpressionEvaluationFile::Generate()
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "Evaluation file \"" << this->Input << "\" cannot be read.";
|
||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
|
||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -142,7 +142,7 @@ void cmGeneratorExpressionEvaluationFile::Generate()
|
||||
for(std::vector<std::string>::const_iterator li = allConfigs.begin();
|
||||
li != allConfigs.end(); ++li)
|
||||
{
|
||||
this->Generate(li->c_str(), inputExpression.get(), outputFiles);
|
||||
this->Generate(*li, inputExpression.get(), outputFiles);
|
||||
if(cmSystemTools::GetFatalErrorOccured())
|
||||
{
|
||||
return;
|
||||
|
@ -39,7 +39,7 @@ void reportError(cmGeneratorExpressionContext *context,
|
||||
<< " " << expr << "\n"
|
||||
<< result;
|
||||
context->Makefile->GetCMakeInstance()
|
||||
->IssueMessage(cmake::FATAL_ERROR, e.str().c_str(),
|
||||
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
||||
context->Backtrace);
|
||||
}
|
||||
|
||||
@ -393,8 +393,8 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
|
||||
const std::string &lang) const
|
||||
{
|
||||
const char *compilerId = context->Makefile ?
|
||||
context->Makefile->GetSafeDefinition((
|
||||
"CMAKE_" + lang + "_COMPILER_ID").c_str()) : "";
|
||||
context->Makefile->GetSafeDefinition(
|
||||
"CMAKE_" + lang + "_COMPILER_ID") : "";
|
||||
if (parameters.size() == 0)
|
||||
{
|
||||
return compilerId ? compilerId : "";
|
||||
@ -428,7 +428,7 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
|
||||
->GetPolicyWarning(cmPolicies::CMP0044);
|
||||
context->Makefile->GetCMakeInstance()
|
||||
->IssueMessage(cmake::AUTHOR_WARNING,
|
||||
e.str().c_str(), context->Backtrace);
|
||||
e.str(), context->Backtrace);
|
||||
}
|
||||
case cmPolicies::OLD:
|
||||
return "1";
|
||||
@ -500,8 +500,8 @@ struct CompilerVersionNode : public cmGeneratorExpressionNode
|
||||
const std::string &lang) const
|
||||
{
|
||||
const char *compilerVersion = context->Makefile ?
|
||||
context->Makefile->GetSafeDefinition((
|
||||
"CMAKE_" + lang + "_COMPILER_VERSION").c_str()) : "";
|
||||
context->Makefile->GetSafeDefinition(
|
||||
"CMAKE_" + lang + "_COMPILER_VERSION") : "";
|
||||
if (parameters.size() == 0)
|
||||
{
|
||||
return compilerVersion ? compilerVersion : "";
|
||||
@ -747,7 +747,7 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode
|
||||
std::string mapProp = "MAP_IMPORTED_CONFIG_";
|
||||
mapProp += cmSystemTools::UpperCase(context->Config);
|
||||
if(const char* mapValue =
|
||||
context->CurrentTarget->GetProperty(mapProp.c_str()))
|
||||
context->CurrentTarget->GetProperty(mapProp))
|
||||
{
|
||||
cmSystemTools::ExpandListArgument(cmSystemTools::UpperCase(mapValue),
|
||||
mappedConfigs);
|
||||
@ -1022,7 +1022,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
|
||||
break;
|
||||
}
|
||||
|
||||
const char *prop = target->GetProperty(propertyName.c_str());
|
||||
const char *prop = target->GetProperty(propertyName);
|
||||
|
||||
if (dagCheckerParent)
|
||||
{
|
||||
|
@ -688,7 +688,7 @@ void cmTargetTraceDependencies::FollowName(std::string const& name)
|
||||
if(i == this->NameMap.end())
|
||||
{
|
||||
// Check if we know how to generate this file.
|
||||
cmSourceFile* sf = this->Makefile->GetSourceFileWithOutput(name.c_str());
|
||||
cmSourceFile* sf = this->Makefile->GetSourceFileWithOutput(name);
|
||||
NameMapType::value_type entry(name, sf);
|
||||
i = this->NameMap.insert(entry).first;
|
||||
}
|
||||
@ -750,7 +750,7 @@ bool cmTargetTraceDependencies::IsUtility(std::string const& dep)
|
||||
tLocation = cmSystemTools::CollapseFullPath(tLocation.c_str());
|
||||
if(depLocation == tLocation)
|
||||
{
|
||||
this->Target->AddUtility(util.c_str());
|
||||
this->Target->AddUtility(util);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -759,7 +759,7 @@ bool cmTargetTraceDependencies::IsUtility(std::string const& dep)
|
||||
{
|
||||
// The original name of the dependency was not a full path. It
|
||||
// must name a target, so add the target-level dependency.
|
||||
this->Target->AddUtility(util.c_str());
|
||||
this->Target->AddUtility(util);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -793,7 +793,7 @@ cmTargetTraceDependencies
|
||||
// this project. Add the target-level dependency to make
|
||||
// sure the executable is up to date before this custom
|
||||
// command possibly runs.
|
||||
this->Target->AddUtility(command.c_str());
|
||||
this->Target->AddUtility(command);
|
||||
}
|
||||
}
|
||||
|
||||
@ -872,7 +872,7 @@ void cmGeneratorTarget::GetAppleArchs(const std::string& config,
|
||||
{
|
||||
std::string defVarName = "OSX_ARCHITECTURES_";
|
||||
defVarName += cmSystemTools::UpperCase(config);
|
||||
archs = this->Target->GetProperty(defVarName.c_str());
|
||||
archs = this->Target->GetProperty(defVarName);
|
||||
}
|
||||
if(!archs)
|
||||
{
|
||||
@ -1048,7 +1048,7 @@ void cmGeneratorTarget::ConstructSourceFileFlags() const
|
||||
for(std::vector<std::string>::iterator it = relFiles.begin();
|
||||
it != relFiles.end(); ++it)
|
||||
{
|
||||
if(cmSourceFile* sf = this->Makefile->GetSource(it->c_str()))
|
||||
if(cmSourceFile* sf = this->Makefile->GetSource(*it))
|
||||
{
|
||||
SourceFileFlags& flags = this->SourceFlagsMap[sf];
|
||||
flags.MacFolder = "Headers";
|
||||
@ -1066,7 +1066,7 @@ void cmGeneratorTarget::ConstructSourceFileFlags() const
|
||||
for(std::vector<std::string>::iterator it = relFiles.begin();
|
||||
it != relFiles.end(); ++it)
|
||||
{
|
||||
if(cmSourceFile* sf = this->Makefile->GetSource(it->c_str()))
|
||||
if(cmSourceFile* sf = this->Makefile->GetSource(*it))
|
||||
{
|
||||
SourceFileFlags& flags = this->SourceFlagsMap[sf];
|
||||
flags.MacFolder = "PrivateHeaders";
|
||||
@ -1083,7 +1083,7 @@ void cmGeneratorTarget::ConstructSourceFileFlags() const
|
||||
for(std::vector<std::string>::iterator it = relFiles.begin();
|
||||
it != relFiles.end(); ++it)
|
||||
{
|
||||
if(cmSourceFile* sf = this->Makefile->GetSource(it->c_str()))
|
||||
if(cmSourceFile* sf = this->Makefile->GetSource(*it))
|
||||
{
|
||||
SourceFileFlags& flags = this->SourceFlagsMap[sf];
|
||||
flags.MacFolder = "Resources";
|
||||
|
@ -66,14 +66,14 @@ bool cmGetCMakePropertyCommand
|
||||
else
|
||||
{
|
||||
const char *prop =
|
||||
this->Makefile->GetCMakeInstance()->GetProperty(args[1].c_str());
|
||||
this->Makefile->GetCMakeInstance()->GetProperty(args[1]);
|
||||
if (prop)
|
||||
{
|
||||
output = prop;
|
||||
}
|
||||
}
|
||||
|
||||
this->Makefile->AddDefinition(variable.c_str(), output.c_str());
|
||||
this->Makefile->AddDefinition(variable, output.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ bool cmGetDirectoryPropertyCommand
|
||||
// lookup the makefile from the directory name
|
||||
cmLocalGenerator *lg =
|
||||
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
|
||||
FindLocalGenerator(sd.c_str());
|
||||
FindLocalGenerator(sd);
|
||||
if (!lg)
|
||||
{
|
||||
this->SetError
|
||||
@ -79,18 +79,18 @@ bool cmGetDirectoryPropertyCommand
|
||||
"providing the name of the variable to get.");
|
||||
return false;
|
||||
}
|
||||
output = dir->GetSafeDefinition(i->c_str());
|
||||
this->Makefile->AddDefinition(variable.c_str(), output.c_str());
|
||||
output = dir->GetSafeDefinition(*i);
|
||||
this->Makefile->AddDefinition(variable, output.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
const char *prop = dir->GetProperty(i->c_str());
|
||||
const char *prop = dir->GetProperty(*i);
|
||||
if (prop)
|
||||
{
|
||||
this->Makefile->AddDefinition(variable.c_str(), prop);
|
||||
this->Makefile->AddDefinition(variable, prop);
|
||||
return true;
|
||||
}
|
||||
this->Makefile->AddDefinition(variable.c_str(), "");
|
||||
this->Makefile->AddDefinition(variable, "");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ bool cmGetFilenameComponentCommand
|
||||
// already, if so use that value
|
||||
if(args.size() == 4 && args[3] == "CACHE")
|
||||
{
|
||||
const char* cacheValue = this->Makefile->GetDefinition(args[0].c_str());
|
||||
const char* cacheValue = this->Makefile->GetDefinition(args[0]);
|
||||
if(cacheValue && !cmSystemTools::IsNOTFOUND(cacheValue))
|
||||
{
|
||||
return true;
|
||||
@ -107,7 +107,7 @@ bool cmGetFilenameComponentCommand
|
||||
else
|
||||
{
|
||||
std::string err = "unknown component " + args[2];
|
||||
this->SetError(err.c_str());
|
||||
this->SetError(err);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -116,12 +116,12 @@ bool cmGetFilenameComponentCommand
|
||||
if(programArgs.size() && storeArgs.size())
|
||||
{
|
||||
this->Makefile->AddCacheDefinition
|
||||
(storeArgs.c_str(), programArgs.c_str(),
|
||||
(storeArgs, programArgs.c_str(),
|
||||
"", args[2] == "PATH" ? cmCacheManager::FILEPATH
|
||||
: cmCacheManager::STRING);
|
||||
}
|
||||
this->Makefile->AddCacheDefinition
|
||||
(args[0].c_str(), result.c_str(), "",
|
||||
(args[0], result.c_str(), "",
|
||||
args[2] == "PATH" ? cmCacheManager::FILEPATH
|
||||
: cmCacheManager::STRING);
|
||||
}
|
||||
@ -129,9 +129,9 @@ bool cmGetFilenameComponentCommand
|
||||
{
|
||||
if(programArgs.size() && storeArgs.size())
|
||||
{
|
||||
this->Makefile->AddDefinition(storeArgs.c_str(), programArgs.c_str());
|
||||
this->Makefile->AddDefinition(storeArgs, programArgs.c_str());
|
||||
}
|
||||
this->Makefile->AddDefinition(args[0].c_str(), result.c_str());
|
||||
this->Makefile->AddDefinition(args[0], result.c_str());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -73,7 +73,7 @@ bool cmGetPropertyCommand
|
||||
e << "given invalid scope " << args[1] << ". "
|
||||
<< "Valid scopes are "
|
||||
<< "GLOBAL, DIRECTORY, TARGET, SOURCE, TEST, VARIABLE, CACHE.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -120,7 +120,7 @@ bool cmGetPropertyCommand
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "given invalid argument \"" << args[i] << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -139,7 +139,7 @@ bool cmGetPropertyCommand
|
||||
std::string output;
|
||||
if(cmPropertyDefinition* def =
|
||||
this->Makefile->GetCMakeInstance()->
|
||||
GetPropertyDefinition(this->PropertyName.c_str(), scope))
|
||||
GetPropertyDefinition(this->PropertyName, scope))
|
||||
{
|
||||
output = def->GetShortDescription();
|
||||
}
|
||||
@ -147,7 +147,7 @@ bool cmGetPropertyCommand
|
||||
{
|
||||
output = "NOTFOUND";
|
||||
}
|
||||
this->Makefile->AddDefinition(this->Variable.c_str(), output.c_str());
|
||||
this->Makefile->AddDefinition(this->Variable, output.c_str());
|
||||
}
|
||||
else if(this->InfoType == OutFullDoc)
|
||||
{
|
||||
@ -155,7 +155,7 @@ bool cmGetPropertyCommand
|
||||
std::string output;
|
||||
if(cmPropertyDefinition* def =
|
||||
this->Makefile->GetCMakeInstance()->
|
||||
GetPropertyDefinition(this->PropertyName.c_str(), scope))
|
||||
GetPropertyDefinition(this->PropertyName, scope))
|
||||
{
|
||||
output = def->GetFullDescription();
|
||||
}
|
||||
@ -163,19 +163,19 @@ bool cmGetPropertyCommand
|
||||
{
|
||||
output = "NOTFOUND";
|
||||
}
|
||||
this->Makefile->AddDefinition(this->Variable.c_str(), output.c_str());
|
||||
this->Makefile->AddDefinition(this->Variable, output.c_str());
|
||||
}
|
||||
else if(this->InfoType == OutDefined)
|
||||
{
|
||||
// Lookup if the property is defined
|
||||
if(this->Makefile->GetCMakeInstance()->
|
||||
GetPropertyDefinition(this->PropertyName.c_str(), scope))
|
||||
GetPropertyDefinition(this->PropertyName, scope))
|
||||
{
|
||||
this->Makefile->AddDefinition(this->Variable.c_str(), "1");
|
||||
this->Makefile->AddDefinition(this->Variable, "1");
|
||||
}
|
||||
else
|
||||
{
|
||||
this->Makefile->AddDefinition(this->Variable.c_str(), "0");
|
||||
this->Makefile->AddDefinition(this->Variable, "0");
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -204,17 +204,17 @@ bool cmGetPropertyCommand::StoreResult(const char* value)
|
||||
{
|
||||
if(this->InfoType == OutSet)
|
||||
{
|
||||
this->Makefile->AddDefinition(this->Variable.c_str(), value? "1":"0");
|
||||
this->Makefile->AddDefinition(this->Variable, value? "1":"0");
|
||||
}
|
||||
else // if(this->InfoType == OutValue)
|
||||
{
|
||||
if(value)
|
||||
{
|
||||
this->Makefile->AddDefinition(this->Variable.c_str(), value);
|
||||
this->Makefile->AddDefinition(this->Variable, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->Makefile->RemoveDefinition(this->Variable.c_str());
|
||||
this->Makefile->RemoveDefinition(this->Variable);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@ -231,7 +231,7 @@ bool cmGetPropertyCommand::HandleGlobalMode()
|
||||
|
||||
// Get the property.
|
||||
cmake* cm = this->Makefile->GetCMakeInstance();
|
||||
return this->StoreResult(cm->GetProperty(this->PropertyName.c_str()));
|
||||
return this->StoreResult(cm->GetProperty(this->PropertyName));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@ -259,7 +259,7 @@ bool cmGetPropertyCommand::HandleDirectoryMode()
|
||||
// Lookup the generator.
|
||||
if(cmLocalGenerator* lg =
|
||||
(this->Makefile->GetLocalGenerator()
|
||||
->GetGlobalGenerator()->FindLocalGenerator(dir.c_str())))
|
||||
->GetGlobalGenerator()->FindLocalGenerator(dir)))
|
||||
{
|
||||
// Use the makefile for the directory found.
|
||||
mf = lg->GetMakefile();
|
||||
@ -276,7 +276,7 @@ bool cmGetPropertyCommand::HandleDirectoryMode()
|
||||
}
|
||||
|
||||
// Get the property.
|
||||
return this->StoreResult(mf->GetProperty(this->PropertyName.c_str()));
|
||||
return this->StoreResult(mf->GetProperty(this->PropertyName));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@ -302,14 +302,14 @@ bool cmGetPropertyCommand::HandleTargetMode()
|
||||
}
|
||||
if(cmTarget* target = this->Makefile->FindTargetToUse(this->Name))
|
||||
{
|
||||
return this->StoreResult(target->GetProperty(this->PropertyName.c_str()));
|
||||
return this->StoreResult(target->GetProperty(this->PropertyName));
|
||||
}
|
||||
else
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "could not find TARGET " << this->Name
|
||||
<< ". Perhaps it has not yet been created.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -325,17 +325,17 @@ bool cmGetPropertyCommand::HandleSourceMode()
|
||||
|
||||
// Get the source file.
|
||||
if(cmSourceFile* sf =
|
||||
this->Makefile->GetOrCreateSource(this->Name.c_str()))
|
||||
this->Makefile->GetOrCreateSource(this->Name))
|
||||
{
|
||||
return
|
||||
this->StoreResult(sf->GetPropertyForUser(this->PropertyName.c_str()));
|
||||
this->StoreResult(sf->GetPropertyForUser(this->PropertyName));
|
||||
}
|
||||
else
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "given SOURCE name that could not be found or created: "
|
||||
<< this->Name;
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -350,15 +350,15 @@ bool cmGetPropertyCommand::HandleTestMode()
|
||||
}
|
||||
|
||||
// Loop over all tests looking for matching names.
|
||||
if(cmTest* test = this->Makefile->GetTest(this->Name.c_str()))
|
||||
if(cmTest* test = this->Makefile->GetTest(this->Name))
|
||||
{
|
||||
return this->StoreResult(test->GetProperty(this->PropertyName.c_str()));
|
||||
return this->StoreResult(test->GetProperty(this->PropertyName));
|
||||
}
|
||||
|
||||
// If not found it is an error.
|
||||
cmOStringStream e;
|
||||
e << "given TEST name that does not exist: " << this->Name;
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -372,7 +372,7 @@ bool cmGetPropertyCommand::HandleVariableMode()
|
||||
}
|
||||
|
||||
return this->StoreResult
|
||||
(this->Makefile->GetDefinition(this->PropertyName.c_str()));
|
||||
(this->Makefile->GetDefinition(this->PropertyName));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@ -389,7 +389,7 @@ bool cmGetPropertyCommand::HandleCacheMode()
|
||||
this->Makefile->GetCacheManager()->GetCacheIterator(this->Name.c_str());
|
||||
if(!it.IsAtEnd())
|
||||
{
|
||||
value = it.GetProperty(this->PropertyName.c_str());
|
||||
value = it.GetProperty(this->PropertyName);
|
||||
}
|
||||
this->StoreResult(value);
|
||||
return true;
|
||||
|
@ -38,7 +38,7 @@ bool cmGetSourceFilePropertyCommand
|
||||
this->Makefile->AddDefinition(var, sf->GetLanguage().c_str());
|
||||
return true;
|
||||
}
|
||||
const char *prop = sf->GetPropertyForUser(args[2].c_str());
|
||||
const char *prop = sf->GetPropertyForUser(args[2]);
|
||||
if (prop)
|
||||
{
|
||||
this->Makefile->AddDefinition(var, prop);
|
||||
|
@ -20,7 +20,7 @@ bool cmGetTargetPropertyCommand
|
||||
this->SetError("called with incorrect number of arguments");
|
||||
return false;
|
||||
}
|
||||
std::string var = args[0].c_str();
|
||||
std::string var = args[0];
|
||||
const std::string& targetName = args[1];
|
||||
std::string prop;
|
||||
|
||||
@ -38,7 +38,7 @@ bool cmGetTargetPropertyCommand
|
||||
else if(cmTarget* tgt = this->Makefile->FindTargetToUse(targetName))
|
||||
{
|
||||
cmTarget& target = *tgt;
|
||||
const char* prop_cstr = target.GetProperty(args[2].c_str());
|
||||
const char* prop_cstr = target.GetProperty(args[2]);
|
||||
if(prop_cstr)
|
||||
{
|
||||
prop = prop_cstr;
|
||||
@ -67,7 +67,7 @@ bool cmGetTargetPropertyCommand
|
||||
{
|
||||
e << "get_target_property() called with non-existent target \""
|
||||
<< targetName << "\".";
|
||||
this->Makefile->IssueMessage(messageType, e.str().c_str());
|
||||
this->Makefile->IssueMessage(messageType, e.str());
|
||||
if (messageType == cmake::FATAL_ERROR)
|
||||
{
|
||||
return false;
|
||||
@ -76,10 +76,10 @@ bool cmGetTargetPropertyCommand
|
||||
}
|
||||
if (!prop.empty())
|
||||
{
|
||||
this->Makefile->AddDefinition(var.c_str(), prop.c_str());
|
||||
this->Makefile->AddDefinition(var, prop.c_str());
|
||||
return true;
|
||||
}
|
||||
this->Makefile->AddDefinition(var.c_str(), (var+"-NOTFOUND").c_str());
|
||||
this->Makefile->AddDefinition(var, (var+"-NOTFOUND").c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -26,17 +26,17 @@ bool cmGetTestPropertyCommand
|
||||
|
||||
std::string testName = args[0];
|
||||
std::string var = args[2];
|
||||
cmTest *test = this->Makefile->GetTest(testName.c_str());
|
||||
cmTest *test = this->Makefile->GetTest(testName);
|
||||
if (test)
|
||||
{
|
||||
const char *prop = test->GetProperty(args[1].c_str());
|
||||
const char *prop = test->GetProperty(args[1]);
|
||||
if (prop)
|
||||
{
|
||||
this->Makefile->AddDefinition(var.c_str(), prop);
|
||||
this->Makefile->AddDefinition(var, prop);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
this->Makefile->AddDefinition(var.c_str(), "NOTFOUND");
|
||||
this->Makefile->AddDefinition(var, "NOTFOUND");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
|
||||
langComp += lang;
|
||||
langComp += "_COMPILER";
|
||||
|
||||
if(!mf->GetDefinition(langComp.c_str()))
|
||||
if(!mf->GetDefinition(langComp))
|
||||
{
|
||||
if(!optional)
|
||||
{
|
||||
@ -132,7 +132,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
|
||||
}
|
||||
return;
|
||||
}
|
||||
const char* name = mf->GetRequiredDefinition(langComp.c_str());
|
||||
const char* name = mf->GetRequiredDefinition(langComp);
|
||||
std::string path;
|
||||
if(!cmSystemTools::FileIsFullPath(name))
|
||||
{
|
||||
@ -150,7 +150,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
|
||||
std::string doc = lang;
|
||||
doc += " compiler.";
|
||||
const char* cname = this->GetCMakeInstance()->
|
||||
GetCacheManager()->GetCacheValue(langComp.c_str());
|
||||
GetCacheManager()->GetCacheValue(langComp);
|
||||
std::string changeVars;
|
||||
if(cname && !optional)
|
||||
{
|
||||
@ -185,7 +185,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
|
||||
changeVars.c_str());
|
||||
}
|
||||
}
|
||||
mf->AddCacheDefinition(langComp.c_str(), path.c_str(),
|
||||
mf->AddCacheDefinition(langComp, path.c_str(),
|
||||
doc.c_str(), cmCacheManager::FILEPATH);
|
||||
}
|
||||
|
||||
@ -457,7 +457,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
||||
std::string loadedLang = "CMAKE_";
|
||||
loadedLang += lang;
|
||||
loadedLang += "_COMPILER_LOADED";
|
||||
if(!mf->GetDefinition(loadedLang.c_str()))
|
||||
if(!mf->GetDefinition(loadedLang))
|
||||
{
|
||||
fpath = rootBin;
|
||||
fpath += "/CMake";
|
||||
@ -518,9 +518,9 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
||||
std::string compilerEnv = "CMAKE_";
|
||||
compilerEnv += lang;
|
||||
compilerEnv += "_COMPILER_ENV_VAR";
|
||||
std::string envVar = mf->GetRequiredDefinition(compilerEnv.c_str());
|
||||
std::string envVar = mf->GetRequiredDefinition(compilerEnv);
|
||||
std::string envVarValue =
|
||||
mf->GetRequiredDefinition(compilerName.c_str());
|
||||
mf->GetRequiredDefinition(compilerName);
|
||||
std::string env = envVar;
|
||||
env += "=";
|
||||
env += envVarValue;
|
||||
@ -578,7 +578,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
||||
compilerEnv += lang;
|
||||
compilerEnv += "_COMPILER_ENV_VAR";
|
||||
cmOStringStream noCompiler;
|
||||
const char* compilerFile = mf->GetDefinition(compilerName.c_str());
|
||||
const char* compilerFile = mf->GetDefinition(compilerName);
|
||||
if(!compilerFile || !*compilerFile ||
|
||||
cmSystemTools::IsNOTFOUND(compilerFile))
|
||||
{
|
||||
@ -621,7 +621,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
||||
if(!this->CMakeInstance->GetIsInTryCompile())
|
||||
{
|
||||
this->PrintCompilerAdvice(noCompiler, lang,
|
||||
mf->GetDefinition(compilerEnv.c_str()));
|
||||
mf->GetDefinition(compilerEnv));
|
||||
mf->IssueMessage(cmake::FATAL_ERROR, noCompiler.str());
|
||||
fatalError = true;
|
||||
}
|
||||
@ -631,7 +631,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
||||
std::string langLoadedVar = "CMAKE_";
|
||||
langLoadedVar += lang;
|
||||
langLoadedVar += "_INFORMATION_LOADED";
|
||||
if (!mf->GetDefinition(langLoadedVar.c_str()))
|
||||
if (!mf->GetDefinition(langLoadedVar))
|
||||
{
|
||||
fpath = "CMake";
|
||||
fpath += lang;
|
||||
@ -678,7 +678,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
||||
// if the compiler did not work, then remove the
|
||||
// CMake(LANG)Compiler.cmake file so that it will get tested the
|
||||
// next time cmake is run
|
||||
if(!mf->IsOn(compilerWorks.c_str()))
|
||||
if(!mf->IsOn(compilerWorks))
|
||||
{
|
||||
std::string compilerLangFile = rootBin;
|
||||
compilerLangFile += "/CMake";
|
||||
@ -693,7 +693,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
||||
sharedLibFlagsVar += lang;
|
||||
sharedLibFlagsVar += "_FLAGS";
|
||||
const char* sharedLibFlags =
|
||||
mf->GetSafeDefinition(sharedLibFlagsVar.c_str());
|
||||
mf->GetSafeDefinition(sharedLibFlagsVar);
|
||||
if (sharedLibFlags)
|
||||
{
|
||||
this->LanguageToOriginalSharedLibFlags[lang] = sharedLibFlags;
|
||||
@ -753,7 +753,7 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf,
|
||||
std::string const& lang) const
|
||||
{
|
||||
std::string compilerIdVar = "CMAKE_" + lang + "_COMPILER_ID";
|
||||
const char* compilerId = mf->GetDefinition(compilerIdVar.c_str());
|
||||
const char* compilerId = mf->GetDefinition(compilerIdVar);
|
||||
if(!compilerId)
|
||||
{
|
||||
return;
|
||||
@ -776,7 +776,7 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf,
|
||||
}
|
||||
case cmPolicies::OLD:
|
||||
// OLD behavior is to convert AppleClang to Clang.
|
||||
mf->AddDefinition(compilerIdVar.c_str(), "Clang");
|
||||
mf->AddDefinition(compilerIdVar, "Clang");
|
||||
break;
|
||||
case cmPolicies::REQUIRED_IF_USED:
|
||||
case cmPolicies::REQUIRED_ALWAYS:
|
||||
@ -807,7 +807,7 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf,
|
||||
}
|
||||
case cmPolicies::OLD:
|
||||
// OLD behavior is to convert QCC to GNU.
|
||||
mf->AddDefinition(compilerIdVar.c_str(), "GNU");
|
||||
mf->AddDefinition(compilerIdVar, "GNU");
|
||||
break;
|
||||
case cmPolicies::REQUIRED_IF_USED:
|
||||
case cmPolicies::REQUIRED_ALWAYS:
|
||||
@ -917,7 +917,7 @@ void cmGlobalGenerator::SetLanguageEnabledMaps(const std::string& l,
|
||||
|
||||
std::string linkerPrefVar = std::string("CMAKE_") +
|
||||
std::string(l) + std::string("_LINKER_PREFERENCE");
|
||||
const char* linkerPref = mf->GetDefinition(linkerPrefVar.c_str());
|
||||
const char* linkerPref = mf->GetDefinition(linkerPrefVar);
|
||||
int preference = 0;
|
||||
if(linkerPref)
|
||||
{
|
||||
@ -950,7 +950,7 @@ void cmGlobalGenerator::SetLanguageEnabledMaps(const std::string& l,
|
||||
|
||||
std::string outputExtensionVar = std::string("CMAKE_") +
|
||||
std::string(l) + std::string("_OUTPUT_EXTENSION");
|
||||
const char* outputExtension = mf->GetDefinition(outputExtensionVar.c_str());
|
||||
const char* outputExtension = mf->GetDefinition(outputExtensionVar);
|
||||
if(outputExtension)
|
||||
{
|
||||
this->LanguageToOutputExtension[l] = outputExtension;
|
||||
@ -968,7 +968,7 @@ void cmGlobalGenerator::SetLanguageEnabledMaps(const std::string& l,
|
||||
|
||||
std::string ignoreExtensionsVar = std::string("CMAKE_") +
|
||||
std::string(l) + std::string("_IGNORE_EXTENSIONS");
|
||||
std::string ignoreExts = mf->GetSafeDefinition(ignoreExtensionsVar.c_str());
|
||||
std::string ignoreExts = mf->GetSafeDefinition(ignoreExtensionsVar);
|
||||
std::vector<std::string> extensionList;
|
||||
cmSystemTools::ExpandListArgument(ignoreExts, extensionList);
|
||||
for(std::vector<std::string>::iterator i = extensionList.begin();
|
||||
@ -984,7 +984,7 @@ void cmGlobalGenerator::FillExtensionToLanguageMap(const std::string& l,
|
||||
{
|
||||
std::string extensionsVar = std::string("CMAKE_") +
|
||||
std::string(l) + std::string("_SOURCE_FILE_EXTENSIONS");
|
||||
std::string exts = mf->GetSafeDefinition(extensionsVar.c_str());
|
||||
std::string exts = mf->GetSafeDefinition(extensionsVar);
|
||||
std::vector<std::string> extensionList;
|
||||
cmSystemTools::ExpandListArgument(exts, extensionList);
|
||||
for(std::vector<std::string>::iterator i = extensionList.begin();
|
||||
@ -1389,8 +1389,8 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo()
|
||||
{
|
||||
std::string defPropName = "COMPILE_DEFINITIONS_";
|
||||
defPropName += cmSystemTools::UpperCase(*ci);
|
||||
t->AppendProperty(defPropName.c_str(),
|
||||
mf->GetProperty(defPropName.c_str()));
|
||||
t->AppendProperty(defPropName,
|
||||
mf->GetProperty(defPropName));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1572,7 +1572,7 @@ void cmGlobalGenerator::CheckLocalGenerators()
|
||||
std::string incDirs = cmGeneratorExpression::Preprocess(incDirProp,
|
||||
cmGeneratorExpression::StripAllGeneratorExpressions);
|
||||
|
||||
cmSystemTools::ExpandListArgument(incDirs.c_str(), incs);
|
||||
cmSystemTools::ExpandListArgument(incDirs, incs);
|
||||
|
||||
for( std::vector<std::string>::const_iterator incDir = incs.begin();
|
||||
incDir != incs.end(); ++incDir)
|
||||
@ -1665,7 +1665,7 @@ int cmGlobalGenerator::TryCompile(const std::string& srcdir,
|
||||
std::string config =
|
||||
mf->GetSafeDefinition("CMAKE_TRY_COMPILE_CONFIGURATION");
|
||||
return this->Build(srcdir,bindir,projectName,
|
||||
newTarget.c_str(),
|
||||
newTarget,
|
||||
output,"",config,false,fast,
|
||||
this->TryCompileTimeout);
|
||||
}
|
||||
@ -2115,7 +2115,7 @@ cmGlobalGenerator::NameResolvesToFramework(const std::string& libname) const
|
||||
return true;
|
||||
}
|
||||
|
||||
if(cmTarget* tgt = this->FindTarget(libname.c_str()))
|
||||
if(cmTarget* tgt = this->FindTarget(libname))
|
||||
{
|
||||
if(tgt->IsFrameworkOnApple())
|
||||
{
|
||||
@ -2325,7 +2325,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
|
||||
{
|
||||
ostr << "Only default component available";
|
||||
}
|
||||
singleLine.push_back(ostr.str().c_str());
|
||||
singleLine.push_back(ostr.str());
|
||||
(*targets)["list_install_components"]
|
||||
= this->CreateGlobalTarget("list_install_components",
|
||||
ostr.str().c_str(),
|
||||
@ -2356,7 +2356,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
|
||||
// automatically convert this name to the build-time location.
|
||||
cmd = "cmake";
|
||||
}
|
||||
singleLine.push_back(cmd.c_str());
|
||||
singleLine.push_back(cmd);
|
||||
if ( cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.' )
|
||||
{
|
||||
std::string cfgArg = "-DBUILD_TYPE=";
|
||||
@ -2494,7 +2494,7 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(
|
||||
std::vector<std::string>::iterator dit;
|
||||
for ( dit = depends.begin(); dit != depends.end(); ++ dit )
|
||||
{
|
||||
target.AddUtility(dit->c_str());
|
||||
target.AddUtility(*dit);
|
||||
}
|
||||
|
||||
// Organize in the "predefined targets" folder:
|
||||
@ -2754,7 +2754,7 @@ cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs,
|
||||
|
||||
// Shorten the output name (in expected use case).
|
||||
cmLocalGenerator* lg = this->GetLocalGenerators()[0];
|
||||
std::string fname = lg->Convert(outputs[0].c_str(),
|
||||
std::string fname = lg->Convert(outputs[0],
|
||||
cmLocalGenerator::HOME_OUTPUT);
|
||||
|
||||
// Associate the hash with this output.
|
||||
|
@ -183,7 +183,7 @@ bool cmGlobalKdevelopGenerator
|
||||
(strstr(tmp.c_str(),
|
||||
cmake::GetCMakeFilesDirectoryPostSlash())==0))
|
||||
{
|
||||
files.insert(tmp.c_str());
|
||||
files.insert(tmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1159,7 +1159,7 @@ void cmGlobalNinjaGenerator::WriteTargetClean(std::ostream& os)
|
||||
{
|
||||
WriteRule(*this->RulesFileStream,
|
||||
"CLEAN",
|
||||
(ninjaCmd() + " -t clean").c_str(),
|
||||
ninjaCmd() + " -t clean",
|
||||
"Cleaning all built files...",
|
||||
"Rule for cleaning all built files.",
|
||||
/*depfile=*/ "",
|
||||
@ -1182,7 +1182,7 @@ void cmGlobalNinjaGenerator::WriteTargetHelp(std::ostream& os)
|
||||
{
|
||||
WriteRule(*this->RulesFileStream,
|
||||
"HELP",
|
||||
(ninjaCmd() + " -t targets").c_str(),
|
||||
ninjaCmd() + " -t targets",
|
||||
"All primary targets available:",
|
||||
"Rule for printing all primary targets available.",
|
||||
/*depfile=*/ "",
|
||||
|
@ -356,14 +356,14 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||
<< "# The top level Makefile was generated from the following files:\n"
|
||||
<< "set(CMAKE_MAKEFILE_DEPENDS\n"
|
||||
<< " \""
|
||||
<< lg->Convert(cache.c_str(),
|
||||
<< lg->Convert(cache,
|
||||
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n";
|
||||
for(std::vector<std::string>::const_iterator i = lfiles.begin();
|
||||
i != lfiles.end(); ++i)
|
||||
{
|
||||
cmakefileStream
|
||||
<< " \""
|
||||
<< lg->Convert(i->c_str(), cmLocalGenerator::START_OUTPUT).c_str()
|
||||
<< lg->Convert(*i, cmLocalGenerator::START_OUTPUT).c_str()
|
||||
<< "\"\n";
|
||||
}
|
||||
cmakefileStream
|
||||
@ -379,10 +379,10 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||
<< "# The corresponding makefile is:\n"
|
||||
<< "set(CMAKE_MAKEFILE_OUTPUTS\n"
|
||||
<< " \""
|
||||
<< lg->Convert(makefileName.c_str(),
|
||||
<< lg->Convert(makefileName,
|
||||
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n"
|
||||
<< " \""
|
||||
<< lg->Convert(check.c_str(),
|
||||
<< lg->Convert(check,
|
||||
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n";
|
||||
cmakefileStream << " )\n\n";
|
||||
|
||||
@ -397,7 +397,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||
k != outfiles.end(); ++k)
|
||||
{
|
||||
cmakefileStream << " \"" <<
|
||||
lg->Convert(k->c_str(),cmLocalGenerator::HOME_OUTPUT).c_str()
|
||||
lg->Convert(*k,cmLocalGenerator::HOME_OUTPUT).c_str()
|
||||
<< "\"\n";
|
||||
}
|
||||
|
||||
@ -411,7 +411,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||
tmpStr += cmake::GetCMakeFilesDirectory();
|
||||
tmpStr += "/CMakeDirectoryInformation.cmake";
|
||||
cmakefileStream << " \"" <<
|
||||
lg->Convert(tmpStr.c_str(),cmLocalGenerator::HOME_OUTPUT).c_str()
|
||||
lg->Convert(tmpStr,cmLocalGenerator::HOME_OUTPUT).c_str()
|
||||
<< "\"\n";
|
||||
}
|
||||
cmakefileStream << " )\n\n";
|
||||
@ -494,7 +494,7 @@ cmGlobalUnixMakefileGenerator3
|
||||
if((!check_all || !gtarget->GetPropertyAsBool("EXCLUDE_FROM_ALL")) &&
|
||||
(!check_relink ||
|
||||
gtarget->Target
|
||||
->NeedRelinkBeforeInstall(lg->ConfigurationName.c_str())))
|
||||
->NeedRelinkBeforeInstall(lg->ConfigurationName)))
|
||||
{
|
||||
std::string tname = lg->GetRelativeTargetDirectory(*gtarget->Target);
|
||||
tname += "/";
|
||||
@ -530,7 +530,7 @@ cmGlobalUnixMakefileGenerator3
|
||||
doc += "\" pass in the directory.";
|
||||
std::vector<std::string> no_commands;
|
||||
lg->WriteMakeRule(ruleFileStream, doc.c_str(),
|
||||
makeTarget.c_str(), depends, no_commands, true);
|
||||
makeTarget, depends, no_commands, true);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@ -547,7 +547,7 @@ cmGlobalUnixMakefileGenerator3
|
||||
|
||||
// Begin the directory-level rules section.
|
||||
std::string dir = lg->GetMakefile()->GetStartOutputDirectory();
|
||||
dir = lg->Convert(dir.c_str(), cmLocalGenerator::HOME_OUTPUT,
|
||||
dir = lg->Convert(dir, cmLocalGenerator::HOME_OUTPUT,
|
||||
cmLocalGenerator::MAKEFILE);
|
||||
lg->WriteDivider(ruleFileStream);
|
||||
ruleFileStream
|
||||
@ -612,7 +612,7 @@ void cmGlobalUnixMakefileGenerator3
|
||||
{
|
||||
tname += "/fast";
|
||||
}
|
||||
tname = lg->Convert(tname.c_str(),cmLocalGenerator::HOME_OUTPUT);
|
||||
tname = lg->Convert(tname,cmLocalGenerator::HOME_OUTPUT);
|
||||
cmSystemTools::ConvertToOutputSlashes(tname);
|
||||
makeCommand.push_back(tname);
|
||||
if (!this->LocalGenerators.size())
|
||||
@ -697,14 +697,14 @@ cmGlobalUnixMakefileGenerator3
|
||||
localName = name;
|
||||
localName += "/fast";
|
||||
commands.push_back(lg->GetRecursiveMakeCall
|
||||
(makefileName.c_str(), makeTargetName.c_str()));
|
||||
(makefileName.c_str(), makeTargetName));
|
||||
lg->WriteMakeRule(ruleFileStream, "fast build rule for target.",
|
||||
localName.c_str(), depends, commands, true);
|
||||
localName, depends, commands, true);
|
||||
|
||||
// Add a local name for the rule to relink the target before
|
||||
// installation.
|
||||
if(gtarget->Target
|
||||
->NeedRelinkBeforeInstall(lg->ConfigurationName.c_str()))
|
||||
->NeedRelinkBeforeInstall(lg->ConfigurationName))
|
||||
{
|
||||
makeTargetName = lg->GetRelativeTargetDirectory(*gtarget->Target);
|
||||
makeTargetName += "/preinstall";
|
||||
@ -713,10 +713,10 @@ cmGlobalUnixMakefileGenerator3
|
||||
depends.clear();
|
||||
commands.clear();
|
||||
commands.push_back(lg->GetRecursiveMakeCall
|
||||
(makefileName.c_str(), makeTargetName.c_str()));
|
||||
(makefileName.c_str(), makeTargetName));
|
||||
lg->WriteMakeRule(ruleFileStream,
|
||||
"Manual pre-install relink rule for target.",
|
||||
localName.c_str(), depends, commands, true);
|
||||
localName, depends, commands, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -778,7 +778,7 @@ cmGlobalUnixMakefileGenerator3
|
||||
makeTargetName = localName;
|
||||
makeTargetName += "/depend";
|
||||
commands.push_back(lg->GetRecursiveMakeCall
|
||||
(makefileName.c_str(),makeTargetName.c_str()));
|
||||
(makefileName.c_str(),makeTargetName));
|
||||
|
||||
// add requires if we need it for this generator
|
||||
if (needRequiresStep)
|
||||
@ -786,12 +786,12 @@ cmGlobalUnixMakefileGenerator3
|
||||
makeTargetName = localName;
|
||||
makeTargetName += "/requires";
|
||||
commands.push_back(lg->GetRecursiveMakeCall
|
||||
(makefileName.c_str(),makeTargetName.c_str()));
|
||||
(makefileName.c_str(),makeTargetName));
|
||||
}
|
||||
makeTargetName = localName;
|
||||
makeTargetName += "/build";
|
||||
commands.push_back(lg->GetRecursiveMakeCall
|
||||
(makefileName.c_str(),makeTargetName.c_str()));
|
||||
(makefileName.c_str(),makeTargetName));
|
||||
|
||||
// Write the rule.
|
||||
localName += "/all";
|
||||
@ -804,7 +804,7 @@ cmGlobalUnixMakefileGenerator3
|
||||
cmOStringStream progCmd;
|
||||
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report ";
|
||||
// all target counts
|
||||
progCmd << lg->Convert(progressDir.c_str(),
|
||||
progCmd << lg->Convert(progressDir,
|
||||
cmLocalGenerator::FULL,
|
||||
cmLocalGenerator::SHELL);
|
||||
progCmd << " ";
|
||||
@ -823,7 +823,7 @@ cmGlobalUnixMakefileGenerator3
|
||||
|
||||
this->AppendGlobalTargetDepends(depends,*gtarget->Target);
|
||||
lg->WriteMakeRule(ruleFileStream, "All Build rule for target.",
|
||||
localName.c_str(), depends, commands, true);
|
||||
localName, depends, commands, true);
|
||||
|
||||
// add the all/all dependency
|
||||
if(!this->IsExcluded(this->LocalGenerators[0], *gtarget->Target))
|
||||
@ -845,7 +845,7 @@ cmGlobalUnixMakefileGenerator3
|
||||
cmOStringStream progCmd;
|
||||
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
|
||||
// # in target
|
||||
progCmd << lg->Convert(progressDir.c_str(),
|
||||
progCmd << lg->Convert(progressDir,
|
||||
cmLocalGenerator::FULL,
|
||||
cmLocalGenerator::SHELL);
|
||||
//
|
||||
@ -857,11 +857,11 @@ cmGlobalUnixMakefileGenerator3
|
||||
std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
|
||||
tmp += "Makefile2";
|
||||
commands.push_back(lg->GetRecursiveMakeCall
|
||||
(tmp.c_str(),localName.c_str()));
|
||||
(tmp.c_str(),localName));
|
||||
{
|
||||
cmOStringStream progCmd;
|
||||
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
|
||||
progCmd << lg->Convert(progressDir.c_str(),
|
||||
progCmd << lg->Convert(progressDir,
|
||||
cmLocalGenerator::FULL,
|
||||
cmLocalGenerator::SHELL);
|
||||
progCmd << " 0";
|
||||
@ -873,7 +873,7 @@ cmGlobalUnixMakefileGenerator3
|
||||
localName += "/rule";
|
||||
lg->WriteMakeRule(ruleFileStream,
|
||||
"Build rule for subdir invocation for target.",
|
||||
localName.c_str(), depends, commands, true);
|
||||
localName, depends, commands, true);
|
||||
|
||||
// Add a target with the canonical name (no prefix, suffix or path).
|
||||
commands.clear();
|
||||
@ -884,17 +884,17 @@ cmGlobalUnixMakefileGenerator3
|
||||
|
||||
// Add rules to prepare the target for installation.
|
||||
if(gtarget->Target
|
||||
->NeedRelinkBeforeInstall(lg->ConfigurationName.c_str()))
|
||||
->NeedRelinkBeforeInstall(lg->ConfigurationName))
|
||||
{
|
||||
localName = lg->GetRelativeTargetDirectory(*gtarget->Target);
|
||||
localName += "/preinstall";
|
||||
depends.clear();
|
||||
commands.clear();
|
||||
commands.push_back(lg->GetRecursiveMakeCall
|
||||
(makefileName.c_str(), localName.c_str()));
|
||||
(makefileName.c_str(), localName));
|
||||
lg->WriteMakeRule(ruleFileStream,
|
||||
"Pre-install relink rule for target.",
|
||||
localName.c_str(), depends, commands, true);
|
||||
localName, depends, commands, true);
|
||||
|
||||
if(!this->IsExcluded(this->LocalGenerators[0], *gtarget->Target))
|
||||
{
|
||||
@ -913,9 +913,9 @@ cmGlobalUnixMakefileGenerator3
|
||||
depends.clear();
|
||||
commands.clear();
|
||||
commands.push_back(lg->GetRecursiveMakeCall
|
||||
(makefileName.c_str(), makeTargetName.c_str()));
|
||||
(makefileName.c_str(), makeTargetName));
|
||||
lg->WriteMakeRule(ruleFileStream, "clean rule for target.",
|
||||
makeTargetName.c_str(), depends, commands, true);
|
||||
makeTargetName, depends, commands, true);
|
||||
commands.clear();
|
||||
depends.push_back(makeTargetName);
|
||||
lg->WriteMakeRule(ruleFileStream, "clean rule for target.",
|
||||
@ -1121,7 +1121,7 @@ bool cmGlobalUnixMakefileGenerator3
|
||||
std::string var = "CMAKE_NEEDS_REQUIRES_STEP_";
|
||||
var += *l;
|
||||
var += "_FLAG";
|
||||
if(target.GetMakefile()->GetDefinition(var.c_str()))
|
||||
if(target.GetMakefile()->GetDefinition(var))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ void cmGraphVizWriter::WriteTargetDependersFiles(const char* fileName)
|
||||
std::cout << "Writing " << currentFilename << "..." << std::endl;
|
||||
this->WriteHeader(str);
|
||||
|
||||
this->WriteDependerConnections(ptrIt->first.c_str(),
|
||||
this->WriteDependerConnections(ptrIt->first,
|
||||
insertedNodes, insertedConnections, str);
|
||||
|
||||
this->WriteFooter(str);
|
||||
@ -241,7 +241,7 @@ void cmGraphVizWriter::WritePerTargetFiles(const char* fileName)
|
||||
std::cout << "Writing " << currentFilename << "..." << std::endl;
|
||||
this->WriteHeader(str);
|
||||
|
||||
this->WriteConnections(ptrIt->first.c_str(),
|
||||
this->WriteConnections(ptrIt->first,
|
||||
insertedNodes, insertedConnections, str);
|
||||
this->WriteFooter(str);
|
||||
}
|
||||
@ -280,7 +280,7 @@ void cmGraphVizWriter::WriteGlobalFile(const char* fileName)
|
||||
continue;
|
||||
}
|
||||
|
||||
this->WriteConnections(ptrIt->first.c_str(),
|
||||
this->WriteConnections(ptrIt->first,
|
||||
insertedNodes, insertedConnections, str);
|
||||
}
|
||||
this->WriteFooter(str);
|
||||
@ -407,7 +407,7 @@ void cmGraphVizWriter::WriteDependerConnections(const std::string& targetName,
|
||||
llit != ll->end();
|
||||
++ llit )
|
||||
{
|
||||
std::string libName = llit->first.c_str();
|
||||
std::string libName = llit->first;
|
||||
if (libName == targetName)
|
||||
{
|
||||
// So this target links against targetName.
|
||||
@ -424,13 +424,13 @@ void cmGraphVizWriter::WriteDependerConnections(const std::string& targetName,
|
||||
insertedConnections.end())
|
||||
{
|
||||
insertedConnections.insert(connectionName);
|
||||
this->WriteNode(dependerIt->first.c_str(), dependerIt->second,
|
||||
this->WriteNode(dependerIt->first, dependerIt->second,
|
||||
insertedNodes, str);
|
||||
|
||||
str << " \"" << dependerNodeNameIt->second << "\" -> \""
|
||||
<< myNodeName << "\"";
|
||||
str << " // " <<targetName<< " -> " <<dependerIt->first<<std::endl;
|
||||
this->WriteDependerConnections(dependerIt->first.c_str(),
|
||||
this->WriteDependerConnections(dependerIt->first,
|
||||
insertedNodes, insertedConnections, str);
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ static std::string cmIfCommandError(
|
||||
i != args.end(); ++i)
|
||||
{
|
||||
err += " ";
|
||||
err += lg->EscapeForCMake(i->c_str());
|
||||
err += lg->EscapeForCMake(*i);
|
||||
}
|
||||
err += "\n";
|
||||
return err;
|
||||
@ -199,7 +199,7 @@ bool cmIfCommand
|
||||
err += errorString;
|
||||
if (status == cmake::FATAL_ERROR)
|
||||
{
|
||||
this->SetError(err.c_str());
|
||||
this->SetError(err);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
return false;
|
||||
}
|
||||
@ -261,7 +261,7 @@ namespace
|
||||
}
|
||||
|
||||
// Check definition.
|
||||
const char* def = mf->GetDefinition(arg.c_str());
|
||||
const char* def = mf->GetDefinition(arg);
|
||||
return !cmSystemTools::IsOff(def);
|
||||
}
|
||||
|
||||
@ -277,12 +277,12 @@ namespace
|
||||
else if(arg == "1")
|
||||
{ return true; }
|
||||
else
|
||||
{ return !cmSystemTools::IsOff(mf->GetDefinition(arg.c_str())); }
|
||||
{ return !cmSystemTools::IsOff(mf->GetDefinition(arg)); }
|
||||
}
|
||||
else
|
||||
{
|
||||
// Old GetVariableOrNumber behavior.
|
||||
const char* def = mf->GetDefinition(arg.c_str());
|
||||
const char* def = mf->GetDefinition(arg);
|
||||
if(!def && atoi(arg.c_str()))
|
||||
{
|
||||
def = arg.c_str();
|
||||
@ -559,7 +559,7 @@ namespace
|
||||
}
|
||||
else
|
||||
{
|
||||
bdef = makefile->IsDefinitionSet((argP1)->c_str());
|
||||
bdef = makefile->IsDefinitionSet(*(argP1));
|
||||
}
|
||||
HandlePredicate(bdef, reducible, arg, newArgs, argP1, argP2);
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ bool cmIncludeCommand
|
||||
{
|
||||
std::string errorText = "called with invalid argument: ";
|
||||
errorText += args[i];
|
||||
this->SetError(errorText.c_str());
|
||||
this->SetError(errorText);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -121,7 +121,7 @@ bool cmIncludeCommand
|
||||
"command. It " << modal << " not be used as the argument to the "
|
||||
"include() command. Use ALIAS targets instead to refer to targets "
|
||||
"by alternative names.\n";
|
||||
this->Makefile->IssueMessage(messageType, e.str().c_str());
|
||||
this->Makefile->IssueMessage(messageType, e.str());
|
||||
if (messageType == cmake::FATAL_ERROR)
|
||||
{
|
||||
return false;
|
||||
@ -139,7 +139,7 @@ bool cmIncludeCommand
|
||||
// add the location of the included file if a result variable was given
|
||||
if (resultVarName.size())
|
||||
{
|
||||
this->Makefile->AddDefinition(resultVarName.c_str(),
|
||||
this->Makefile->AddDefinition(resultVarName,
|
||||
readit?fullFilePath.c_str():"NOTFOUND");
|
||||
}
|
||||
|
||||
@ -149,7 +149,7 @@ bool cmIncludeCommand
|
||||
"could not find load file:\n"
|
||||
" ";
|
||||
m += fname;
|
||||
this->SetError(m.c_str());
|
||||
this->SetError(m);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -24,7 +24,7 @@ bool cmIncludeRegularExpressionCommand
|
||||
|
||||
if(args.size() > 1)
|
||||
{
|
||||
this->Makefile->SetComplainRegularExpression(args[1].c_str());
|
||||
this->Makefile->SetComplainRegularExpression(args[1]);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -99,7 +99,7 @@ bool cmInstallCommand::InitialPass(std::vector<std::string> const& args,
|
||||
// Unknown mode.
|
||||
std::string e = "called with unknown mode ";
|
||||
e += args[0];
|
||||
this->SetError(e.c_str());
|
||||
this->SetError(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -269,7 +269,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
// Unknown argument.
|
||||
cmOStringStream e;
|
||||
e << "TARGETS given unknown argument \"" << unknownArgs[0] << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -370,7 +370,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "TARGETS given target \"" << (*targetIt)
|
||||
<< "\" which is an alias.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
// Lookup this target in the current directory.
|
||||
@ -387,7 +387,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "TARGETS given target \"" << (*targetIt)
|
||||
<< "\" which is not an executable, library, or module.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
else if(target->GetType() == cmTarget::OBJECT_LIBRARY)
|
||||
@ -395,7 +395,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "TARGETS given OBJECT library \"" << (*targetIt)
|
||||
<< "\" which may not be installed.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
// Store the target in the list to be installed.
|
||||
@ -407,7 +407,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "TARGETS given target \"" << (*targetIt)
|
||||
<< "\" which does not exist in this directory.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -499,7 +499,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "TARGETS given no FRAMEWORK DESTINATION for shared library "
|
||||
"FRAMEWORK target \"" << target.GetName() << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -519,7 +519,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "TARGETS given no LIBRARY DESTINATION for shared library "
|
||||
"target \"" << target.GetName() << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -539,7 +539,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "TARGETS given no ARCHIVE DESTINATION for static library "
|
||||
"target \"" << target.GetName() << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -560,7 +560,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "TARGETS given no LIBRARY DESTINATION for module target \""
|
||||
<< target.GetName() << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -595,7 +595,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE "
|
||||
"executable target \"" << target.GetName() << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -612,7 +612,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << "TARGETS given no RUNTIME DESTINATION for executable "
|
||||
"target \"" << target.GetName() << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -851,7 +851,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args)
|
||||
// Unknown argument.
|
||||
cmOStringStream e;
|
||||
e << args[0] << " given unknown argument \"" << unknownArgs[0] << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -866,7 +866,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args)
|
||||
// The rename option works only with one file.
|
||||
cmOStringStream e;
|
||||
e << args[0] << " given RENAME option with more than one file.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -886,7 +886,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args)
|
||||
// A destination is required.
|
||||
cmOStringStream e;
|
||||
e << args[0] << " given no DESTINATION!";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -927,7 +927,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << args[0] << " does not allow \""
|
||||
<< args[i] << "\" after PATTERN or REGEX.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -941,7 +941,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << args[0] << " does not allow \""
|
||||
<< args[i] << "\" after PATTERN or REGEX.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -969,7 +969,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << args[0] << " does not allow \""
|
||||
<< args[i] << "\" before a PATTERN or REGEX is given.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
literal_args += " EXCLUDE";
|
||||
@ -982,7 +982,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << args[0] << " does not allow \""
|
||||
<< args[i] << "\" before a PATTERN or REGEX is given.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -997,7 +997,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << args[0] << " does not allow \""
|
||||
<< args[i] << "\" after PATTERN or REGEX.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1011,7 +1011,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << args[0] << " does not allow \""
|
||||
<< args[i] << "\" after PATTERN or REGEX.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1025,7 +1025,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << args[0] << " does not allow \""
|
||||
<< args[i] << "\" after PATTERN or REGEX.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1040,7 +1040,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << args[0] << " does not allow \""
|
||||
<< args[i] << "\" after PATTERN or REGEX.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1055,7 +1055,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << args[0] << " does not allow \""
|
||||
<< args[i] << "\" after PATTERN or REGEX.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1069,7 +1069,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << args[0] << " does not allow \""
|
||||
<< args[i] << "\" after PATTERN or REGEX.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1094,7 +1094,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << args[0] << " given non-directory \""
|
||||
<< args[i] << "\" to install.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1150,7 +1150,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << args[0] << " given invalid file permission \""
|
||||
<< args[i] << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1162,7 +1162,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << args[0] << " given invalid directory permission \""
|
||||
<< args[i] << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1174,7 +1174,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << args[0] << " given invalid permission \""
|
||||
<< args[i] << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1183,7 +1183,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||
// Unknown argument.
|
||||
cmOStringStream e;
|
||||
e << args[0] << " given unknown argument \"" << args[i] << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1204,7 +1204,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||
// A destination is required.
|
||||
cmOStringStream e;
|
||||
e << args[0] << " given no DESTINATION!";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1247,7 +1247,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
|
||||
// Unknown argument.
|
||||
cmOStringStream e;
|
||||
e << args[0] << " given unknown argument \"" << unknownArgs[0] << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1262,7 +1262,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
|
||||
// A destination is required.
|
||||
cmOStringStream e;
|
||||
e << args[0] << " given no DESTINATION!";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1274,7 +1274,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
|
||||
e << args[0] << " given invalid export file name \"" << fname << "\". "
|
||||
<< "The FILE argument may not contain a path. "
|
||||
<< "Specify the path in the DESTINATION argument.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1285,7 +1285,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
|
||||
cmOStringStream e;
|
||||
e << args[0] << " given invalid export file name \"" << fname << "\". "
|
||||
<< "The FILE argument must specify a name ending in \".cmake\".";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1302,7 +1302,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
|
||||
<< "This name cannot be safely converted to a file name. "
|
||||
<< "Specify a different export name or use the FILE option to set "
|
||||
<< "a file name explicitly.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1327,7 +1327,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
|
||||
<< "EXPORT_LINK_INTERFACE_LIBRARIES" << "\", but target \""
|
||||
<< te->Target->GetName()
|
||||
<< "\" does not have policy CMP0022 set to NEW.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1368,7 +1368,7 @@ bool cmInstallCommand::MakeFilesFullPath(const char* modeName,
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << modeName << " given directory \"" << (*fileIt) << "\" to install.";
|
||||
this->SetError(e.str().c_str());
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
// Store the file for installation.
|
||||
|
@ -94,7 +94,7 @@ void cmInstallExportGenerator::ComputeTempDir()
|
||||
{
|
||||
// Replace the destination path with a hash to keep it short.
|
||||
this->TempDir +=
|
||||
cmSystemTools::ComputeStringMD5(this->Destination.c_str());
|
||||
cmSystemTools::ComputeStringMD5(this->Destination);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -138,7 +138,7 @@ void cmInstallExportGenerator::GenerateScript(std::ostream& os)
|
||||
|
||||
// Generate the import file for this export set.
|
||||
this->EFGen->SetExportFile(this->MainImportFile.c_str());
|
||||
this->EFGen->SetNamespace(this->Namespace.c_str());
|
||||
this->EFGen->SetNamespace(this->Namespace);
|
||||
this->EFGen->SetExportOld(this->ExportOld);
|
||||
if(this->ConfigurationTypes->empty())
|
||||
{
|
||||
@ -157,7 +157,7 @@ void cmInstallExportGenerator::GenerateScript(std::ostream& os)
|
||||
ci = this->ConfigurationTypes->begin();
|
||||
ci != this->ConfigurationTypes->end(); ++ci)
|
||||
{
|
||||
this->EFGen->AddConfiguration(ci->c_str());
|
||||
this->EFGen->AddConfiguration(*ci);
|
||||
}
|
||||
}
|
||||
this->EFGen->GenerateImportFile();
|
||||
@ -182,7 +182,7 @@ cmInstallExportGenerator::GenerateScriptConfigs(std::ostream& os,
|
||||
i != this->EFGen->GetConfigImportFiles().end(); ++i)
|
||||
{
|
||||
files.push_back(i->second);
|
||||
std::string config_test = this->CreateConfigTest(i->first.c_str());
|
||||
std::string config_test = this->CreateConfigTest(i->first);
|
||||
os << indent << "if(" << config_test << ")\n";
|
||||
this->AddInstallRule(os, cmInstallType_FILES, files, false,
|
||||
this->FilePermissions.c_str(), 0, 0, 0,
|
||||
|
@ -100,9 +100,9 @@ void cmInstallFilesCommand::FinalPass()
|
||||
else // reg exp list
|
||||
{
|
||||
std::vector<std::string> files;
|
||||
std::string regex = this->FinalArgs[0].c_str();
|
||||
std::string regex = this->FinalArgs[0];
|
||||
cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(),
|
||||
regex.c_str(), files);
|
||||
regex, files);
|
||||
|
||||
std::vector<std::string>::iterator s = files.begin();
|
||||
// for each argument, get the files
|
||||
|
@ -68,7 +68,7 @@ void cmInstallProgramsCommand::FinalPass()
|
||||
{
|
||||
std::vector<std::string> programs;
|
||||
cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(),
|
||||
this->FinalArgs[0].c_str(), programs);
|
||||
this->FinalArgs[0], programs);
|
||||
|
||||
std::vector<std::string>::iterator s = programs.begin();
|
||||
// for each argument, get the programs
|
||||
|
@ -52,7 +52,7 @@ bool cmInstallTargetsCommand
|
||||
else
|
||||
{
|
||||
std::string str = "Cannot find target: \"" + *s + "\" to install.";
|
||||
this->SetError(str.c_str());
|
||||
this->SetError(str);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -66,5 +66,5 @@ void cmLinkDirectoriesCommand::AddLinkDir(std::string const& dir)
|
||||
unixPath = tmp;
|
||||
}
|
||||
}
|
||||
this->Makefile->AddLinkDirectory(unixPath.c_str());
|
||||
this->Makefile->AddLinkDirectory(unixPath);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user