Merge topic 'remove-c_str-calls'
3be265b3
Workaround Sun C++ 5.9 compiler crashaf8a1643
Remove c_str calls when using stream APIs.21c573f6
Remove some c_str() calls.
This commit is contained in:
commit
cb8f87f622
|
@ -444,13 +444,13 @@ int cmCPackDebGenerator::createDeb()
|
|||
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
||||
tmpFile += "/Deb.log";
|
||||
cmGeneratedFileStream ofs(tmpFile.c_str());
|
||||
ofs << "# Run command: " << cmd.c_str() << std::endl
|
||||
ofs << "# Run command: " << cmd << std::endl
|
||||
<< "# Working directory: " << toplevel << std::endl
|
||||
<< "# Output:" << std::endl
|
||||
<< output.c_str() << std::endl;
|
||||
<< output << std::endl;
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running tar command: "
|
||||
<< cmd.c_str() << std::endl
|
||||
<< "Please check " << tmpFile.c_str() << " for errors" << std::endl);
|
||||
<< cmd << std::endl
|
||||
<< "Please check " << tmpFile << " for errors" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -528,13 +528,13 @@ int cmCPackDebGenerator::createDeb()
|
|||
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
||||
tmpFile += "/Deb.log";
|
||||
cmGeneratedFileStream ofs(tmpFile.c_str());
|
||||
ofs << "# Run command: " << cmd.c_str() << std::endl
|
||||
ofs << "# Run command: " << cmd << std::endl
|
||||
<< "# Working directory: " << toplevel << std::endl
|
||||
<< "# Output:" << std::endl
|
||||
<< output.c_str() << std::endl;
|
||||
<< output << std::endl;
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running tar command: "
|
||||
<< cmd.c_str() << std::endl
|
||||
<< "Please check " << tmpFile.c_str() << " for errors" << std::endl);
|
||||
<< cmd << std::endl
|
||||
<< "Please check " << tmpFile << " for errors" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
|
|
@ -285,7 +285,7 @@ int cmCPackGenerator::InstallProjectViaInstallCommands(
|
|||
it != installCommandsVector.end();
|
||||
++it )
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << it->c_str()
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << *it
|
||||
<< std::endl);
|
||||
std::string output;
|
||||
int retVal = 1;
|
||||
|
@ -296,12 +296,12 @@ int cmCPackGenerator::InstallProjectViaInstallCommands(
|
|||
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
||||
tmpFile += "/InstallOutput.log";
|
||||
cmGeneratedFileStream ofs(tmpFile.c_str());
|
||||
ofs << "# Run command: " << it->c_str() << std::endl
|
||||
ofs << "# Run command: " << *it << std::endl
|
||||
<< "# Output:" << std::endl
|
||||
<< output.c_str() << std::endl;
|
||||
<< output << std::endl;
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem running install command: " << it->c_str() << std::endl
|
||||
<< "Please check " << tmpFile.c_str() << " for errors"
|
||||
"Problem running install command: " << *it << std::endl
|
||||
<< "Please check " << tmpFile << " for errors"
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
|||
++it )
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||
"Create ignore files regex for: " << it->c_str() << std::endl);
|
||||
"Create ignore files regex for: " << *it << std::endl);
|
||||
ignoreFilesRegex.push_back(it->c_str());
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -385,7 +385,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
|||
if ( regIt->find(inFile.c_str()) )
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Ignore file: "
|
||||
<< inFile.c_str() << std::endl);
|
||||
<< inFile << std::endl);
|
||||
skip = true;
|
||||
}
|
||||
}
|
||||
|
@ -397,7 +397,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
|||
filePath += "/" + subdir + "/"
|
||||
+ cmSystemTools::RelativePath(top.c_str(), gfit->c_str());
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Copy file: "
|
||||
<< inFile.c_str() << " -> " << filePath.c_str() << std::endl);
|
||||
<< inFile << " -> " << filePath << std::endl);
|
||||
/* If the file is a symlink we will have to re-create it */
|
||||
if ( cmSystemTools::FileIsSymlink(inFile.c_str()))
|
||||
{
|
||||
|
@ -416,7 +416,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
|||
) )
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying file: "
|
||||
<< inFile.c_str() << " -> " << filePath.c_str() << std::endl);
|
||||
<< inFile << " -> " << filePath << std::endl);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -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 =
|
||||
|
@ -663,14 +663,14 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
|||
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
||||
tmpFile += "/PreinstallOutput.log";
|
||||
cmGeneratedFileStream ofs(tmpFile.c_str());
|
||||
ofs << "# Run command: " << buildCommandStr.c_str() << std::endl
|
||||
<< "# Directory: " << installDirectory.c_str() << std::endl
|
||||
ofs << "# Run command: " << buildCommandStr << std::endl
|
||||
<< "# Directory: " << installDirectory << std::endl
|
||||
<< "# Output:" << std::endl
|
||||
<< output.c_str() << std::endl;
|
||||
<< output << std::endl;
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem running install command: " << buildCommandStr.c_str()
|
||||
"Problem running install command: " << buildCommandStr
|
||||
<< std::endl
|
||||
<< "Please check " << tmpFile.c_str() << " for errors"
|
||||
<< "Please check " << tmpFile << " for errors"
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
@ -1001,7 +1001,7 @@ void cmCPackGenerator::SetOption(const std::string& op, const char* value)
|
|||
int cmCPackGenerator::DoPackage()
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||
"Create package using " << this->Name.c_str() << std::endl);
|
||||
"Create package using " << this->Name << std::endl);
|
||||
|
||||
// Prepare CPack internal name and check
|
||||
// values for many CPACK_xxx vars
|
||||
|
@ -1269,7 +1269,7 @@ std::string cmCPackGenerator::FindTemplate(const char* name)
|
|||
<< (name ? name : "(NULL)") << std::endl);
|
||||
std::string ffile = this->MakefileMap->GetModulesFile(name);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Found template: "
|
||||
<< ffile.c_str() << std::endl);
|
||||
<< ffile << std::endl);
|
||||
return ffile;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
|
|
@ -169,27 +169,27 @@ void cmCPackLog::Log(int tag, const char* file, int line,
|
|||
{
|
||||
if ( error && !this->ErrorPrefix.empty() )
|
||||
{
|
||||
*this->DefaultError << this->ErrorPrefix.c_str();
|
||||
*this->DefaultError << this->ErrorPrefix;
|
||||
}
|
||||
else if ( warning && !this->WarningPrefix.empty() )
|
||||
{
|
||||
*this->DefaultError << this->WarningPrefix.c_str();
|
||||
*this->DefaultError << this->WarningPrefix;
|
||||
}
|
||||
else if ( output && !this->OutputPrefix.empty() )
|
||||
{
|
||||
*this->DefaultOutput << this->OutputPrefix.c_str();
|
||||
*this->DefaultOutput << this->OutputPrefix;
|
||||
}
|
||||
else if ( verbose && !this->VerbosePrefix.empty() )
|
||||
{
|
||||
*this->DefaultOutput << this->VerbosePrefix.c_str();
|
||||
*this->DefaultOutput << this->VerbosePrefix;
|
||||
}
|
||||
else if ( debug && !this->DebugPrefix.empty() )
|
||||
{
|
||||
*this->DefaultOutput << this->DebugPrefix.c_str();
|
||||
*this->DefaultOutput << this->DebugPrefix;
|
||||
}
|
||||
else if ( !this->Prefix.empty() )
|
||||
{
|
||||
*this->DefaultOutput << this->Prefix.c_str();
|
||||
*this->DefaultOutput << this->Prefix;
|
||||
}
|
||||
if ( useFileAndLine )
|
||||
{
|
||||
|
|
|
@ -83,10 +83,10 @@ int cmCPackNSISGenerator::PackageFiles()
|
|||
fileN = fileN.substr(fileN.find('/')+1, std::string::npos);
|
||||
}
|
||||
cmSystemTools::ReplaceString(fileN, "/", "\\");
|
||||
str << " Delete \"$INSTDIR\\" << fileN.c_str() << "\"" << std::endl;
|
||||
str << " Delete \"$INSTDIR\\" << fileN << "\"" << std::endl;
|
||||
}
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Files: "
|
||||
<< str.str().c_str() << std::endl);
|
||||
<< str.str() << std::endl);
|
||||
this->SetOptionIfNotSet("CPACK_NSIS_DELETE_FILES", str.str().c_str());
|
||||
std::vector<std::string> dirs;
|
||||
this->GetListOfSubdirectories(toplevel.c_str(), dirs);
|
||||
|
@ -117,14 +117,14 @@ int cmCPackNSISGenerator::PackageFiles()
|
|||
}
|
||||
}
|
||||
cmSystemTools::ReplaceString(fileN, "/", "\\");
|
||||
dstr << " RMDir \"$INSTDIR\\" << fileN.c_str() << "\"" << std::endl;
|
||||
dstr << " RMDir \"$INSTDIR\\" << fileN << "\"" << std::endl;
|
||||
if (!componentName.empty())
|
||||
{
|
||||
this->Components[componentName].Directories.push_back(fileN);
|
||||
}
|
||||
}
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Dirs: "
|
||||
<< dstr.str().c_str() << std::endl);
|
||||
<< dstr.str() << std::endl);
|
||||
this->SetOptionIfNotSet("CPACK_NSIS_DELETE_DIRECTORIES",
|
||||
dstr.str().c_str());
|
||||
|
||||
|
@ -320,7 +320,7 @@ int cmCPackNSISGenerator::PackageFiles()
|
|||
std::string nsisCmd = "\"";
|
||||
nsisCmd += this->GetOption("CPACK_INSTALLER_PROGRAM");
|
||||
nsisCmd += "\" \"" + nsisFileName + "\"";
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << nsisCmd.c_str()
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << nsisCmd
|
||||
<< std::endl);
|
||||
std::string output;
|
||||
int retVal = 1;
|
||||
|
@ -329,12 +329,12 @@ int cmCPackNSISGenerator::PackageFiles()
|
|||
if ( !res || retVal )
|
||||
{
|
||||
cmGeneratedFileStream ofs(tmpFile.c_str());
|
||||
ofs << "# Run command: " << nsisCmd.c_str() << std::endl
|
||||
ofs << "# Run command: " << nsisCmd << std::endl
|
||||
<< "# Output:" << std::endl
|
||||
<< output.c_str() << std::endl;
|
||||
<< output << std::endl;
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running NSIS command: "
|
||||
<< nsisCmd.c_str() << std::endl
|
||||
<< "Please check " << tmpFile.c_str() << " for errors" << std::endl);
|
||||
<< nsisCmd << std::endl
|
||||
<< "Please check " << tmpFile << " for errors" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
|
@ -427,7 +427,7 @@ int cmCPackNSISGenerator::InitializeInternal()
|
|||
|
||||
std::string nsisCmd = "\"" + nsisPath + "\" " NSIS_OPT "VERSION";
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Test NSIS version: "
|
||||
<< nsisCmd.c_str() << std::endl);
|
||||
<< nsisCmd << std::endl);
|
||||
std::string output;
|
||||
int retVal = 1;
|
||||
bool resS = cmSystemTools::RunSingleCommand(nsisCmd.c_str(),
|
||||
|
@ -442,13 +442,13 @@ int cmCPackNSISGenerator::InitializeInternal()
|
|||
std::string tmpFile = topDir ? topDir : ".";
|
||||
tmpFile += "/NSISOutput.log";
|
||||
cmGeneratedFileStream ofs(tmpFile.c_str());
|
||||
ofs << "# Run command: " << nsisCmd.c_str() << std::endl
|
||||
ofs << "# Run command: " << nsisCmd << std::endl
|
||||
<< "# Output:" << std::endl
|
||||
<< output.c_str() << std::endl;
|
||||
<< output << std::endl;
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem checking NSIS version with command: "
|
||||
<< nsisCmd.c_str() << std::endl
|
||||
<< "Please check " << tmpFile.c_str() << " for errors" << std::endl);
|
||||
<< nsisCmd << std::endl
|
||||
<< "Please check " << tmpFile << " for errors" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
if ( versionRex.find(output))
|
||||
|
@ -470,7 +470,7 @@ int cmCPackNSISGenerator::InitializeInternal()
|
|||
{
|
||||
// No version check for NSIS cvs build
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: CVS "
|
||||
<< versionRexCVS.match(1).c_str() << std::endl);
|
||||
<< versionRexCVS.match(1) << std::endl);
|
||||
}
|
||||
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", nsisPath.c_str());
|
||||
this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLES_DIRECTORY", "bin");
|
||||
|
@ -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\\"
|
||||
|
@ -844,12 +844,12 @@ CreateComponentDescription(cmCPackComponent *component,
|
|||
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
||||
tmpFile += "/CompressZip.log";
|
||||
cmGeneratedFileStream ofs(tmpFile.c_str());
|
||||
ofs << "# Run command: " << cmd.c_str() << std::endl
|
||||
ofs << "# Run command: " << cmd << std::endl
|
||||
<< "# Output:" << std::endl
|
||||
<< output.c_str() << std::endl;
|
||||
<< output << std::endl;
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running zip command: "
|
||||
<< cmd.c_str() << std::endl
|
||||
<< "Please check " << tmpFile.c_str() << " for errors" << std::endl);
|
||||
<< cmd << std::endl
|
||||
<< "Please check " << tmpFile << " for errors" << std::endl);
|
||||
return "";
|
||||
}
|
||||
|
||||
|
@ -891,7 +891,7 @@ CreateComponentDescription(cmCPackComponent *component,
|
|||
path = *pathIt;
|
||||
cmSystemTools::ReplaceString(path, "/", "\\");
|
||||
macrosOut << " Delete \"$INSTDIR\\"
|
||||
<< path.c_str()
|
||||
<< path
|
||||
<< "\"\n";
|
||||
}
|
||||
for (pathIt = component->Directories.begin();
|
||||
|
@ -901,7 +901,7 @@ CreateComponentDescription(cmCPackComponent *component,
|
|||
path = *pathIt;
|
||||
cmSystemTools::ReplaceString(path, "/", "\\");
|
||||
macrosOut << " RMDir \"$INSTDIR\\"
|
||||
<< path.c_str()
|
||||
<< path
|
||||
<< "\"\n";
|
||||
}
|
||||
macrosOut << " noremove_" << component->Name << ":\n";
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -43,7 +43,7 @@ int cmCPackSTGZGenerator::InitializeInternal()
|
|||
if ( inFile.empty() )
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find template file: "
|
||||
<< inFile.c_str() << std::endl);
|
||||
<< inFile << std::endl);
|
||||
return 0;
|
||||
}
|
||||
this->SetOptionIfNotSet("CPACK_STGZ_HEADER_FILE", inFile.c_str());
|
||||
|
@ -134,6 +134,6 @@ int cmCPackSTGZGenerator::GenerateHeader(std::ostream* os)
|
|||
cmSystemTools::ReplaceString(res, headerLengthTag, buffer);
|
||||
|
||||
// Write in file
|
||||
*os << res.c_str();
|
||||
*os << res;
|
||||
return this->Superclass::GenerateHeader(os);
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ int cpackDefinitionArgument(const char* argument, const char* cValue,
|
|||
value = value.c_str() + pos + 1;
|
||||
def->Map[key] = value;
|
||||
cmCPack_Log(def->Log, cmCPackLog::LOG_DEBUG, "Set CPack variable: "
|
||||
<< key.c_str() << " to \"" << value.c_str() << "\"" << std::endl);
|
||||
<< key << " to \"" << value << "\"" << std::endl);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,7 @@ int main (int argc, char const* const* argv)
|
|||
}
|
||||
|
||||
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
|
||||
"Read CPack config file: " << cpackConfigFile.c_str() << std::endl);
|
||||
"Read CPack config file: " << cpackConfigFile << std::endl);
|
||||
|
||||
cmake cminst;
|
||||
cminst.RemoveUnscriptableCommands();
|
||||
|
@ -262,21 +262,21 @@ int main (int argc, char const* const* argv)
|
|||
cpackConfigFile =
|
||||
cmSystemTools::CollapseFullPath(cpackConfigFile.c_str());
|
||||
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
|
||||
"Read CPack configuration file: " << cpackConfigFile.c_str()
|
||||
"Read CPack configuration file: " << cpackConfigFile
|
||||
<< std::endl);
|
||||
if ( !globalMF->ReadListFile(0, cpackConfigFile.c_str()) )
|
||||
{
|
||||
cmCPack_Log(&log, cmCPackLog::LOG_ERROR,
|
||||
"Problem reading CPack config file: \""
|
||||
<< cpackConfigFile.c_str() << "\"" << std::endl);
|
||||
<< cpackConfigFile << "\"" << std::endl);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if ( cpackConfigFileSpecified )
|
||||
{
|
||||
cmCPack_Log(&log, cmCPackLog::LOG_ERROR,
|
||||
"Cannot find CPack config file: \"" << cpackConfigFile.c_str()
|
||||
<< "\"" << std::endl);
|
||||
"Cannot find CPack config file: \"" <<
|
||||
cpackConfigFile << "\"" << std::endl);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
|
|
@ -134,7 +134,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
|
|||
cmakeBuildAdditionalFlags ? cmakeBuildAdditionalFlags : "", true);
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"SetMakeCommand:"
|
||||
<< buildCommand.c_str() << "\n");
|
||||
<< buildCommand << "\n");
|
||||
this->CTest->SetCTestConfiguration("MakeCommand", buildCommand.c_str());
|
||||
}
|
||||
else
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -409,7 +409,7 @@ int cmCTestBuildHandler::ProcessHandler()
|
|||
for ( it = strings.begin(); it != strings.end(); ++it ) \
|
||||
{ \
|
||||
cmCTestLog(this->CTest, DEBUG, "Add " #strings ": " \
|
||||
<< it->c_str() << std::endl); \
|
||||
<< *it << std::endl); \
|
||||
regexes.push_back(it->c_str()); \
|
||||
}
|
||||
cmCTestBuildHandlerPopulateRegexVector(
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ int cmCTestConfigureHandler::ProcessHandler()
|
|||
cmGeneratedFileStream ofs;
|
||||
this->StartLogFile("Configure", ofs);
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Configure with command: "
|
||||
<< cCommand.c_str() << std::endl);
|
||||
<< cCommand << std::endl);
|
||||
res = this->CTest->RunMakeCommand(cCommand.c_str(), &output,
|
||||
&retVal, buildDirectory.c_str(),
|
||||
0, ofs);
|
||||
|
@ -99,7 +99,7 @@ int cmCTestConfigureHandler::ProcessHandler()
|
|||
{
|
||||
os << retVal;
|
||||
}
|
||||
os << "<ConfigureCommand>" << cCommand.c_str() << "</ConfigureCommand>"
|
||||
os << "<ConfigureCommand>" << cCommand << "</ConfigureCommand>"
|
||||
<< std::endl;
|
||||
cmCTestLog(this->CTest, DEBUG, "End" << std::endl);
|
||||
os << "<Log>" << cmXMLSafe(output) << "</Log>" << std::endl;
|
||||
|
|
|
@ -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.
|
||||
|
@ -269,7 +269,7 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file,
|
|||
fFile.c_str(), checkDir.c_str());
|
||||
if ( ndc.size() )
|
||||
{
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found: " << ndc.c_str()
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found: " << ndc
|
||||
<< " so skip coverage of " << file << std::endl);
|
||||
return false;
|
||||
}
|
||||
|
@ -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 )
|
||||
{
|
||||
|
@ -308,7 +308,7 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file,
|
|||
fFile.c_str(), checkDir.c_str());
|
||||
if ( ndc.size() )
|
||||
{
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found: " << ndc.c_str()
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found: " << ndc
|
||||
<< " so skip coverage of: " << file << std::endl);
|
||||
return false;
|
||||
}
|
||||
|
@ -477,7 +477,7 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||
{
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
".NoDartCoverage found, so skip coverage check for: "
|
||||
<< fullFileName.c_str()
|
||||
<< fullFileName
|
||||
<< std::endl);
|
||||
continue;
|
||||
}
|
||||
|
@ -488,7 +488,7 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||
if ( !cmSystemTools::FileExists(fullFileName.c_str()) )
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot find file: "
|
||||
<< fullFileName.c_str() << std::endl);
|
||||
<< fullFileName << std::endl);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -516,7 +516,7 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||
if ( !ifs)
|
||||
{
|
||||
cmOStringStream ostr;
|
||||
ostr << "Cannot open source file: " << fullFileName.c_str();
|
||||
ostr << "Cannot open source file: " << fullFileName;
|
||||
errorsWhileAccumulating.push_back(ostr.str());
|
||||
error ++;
|
||||
continue;
|
||||
|
@ -535,7 +535,7 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||
cc != fcov.size() -1 )
|
||||
{
|
||||
cmOStringStream ostr;
|
||||
ostr << "Problem reading source file: " << fullFileName.c_str()
|
||||
ostr << "Problem reading source file: " << fullFileName
|
||||
<< " line:" << cc << " out total: " << fcov.size()-1;
|
||||
errorsWhileAccumulating.push_back(ostr.str());
|
||||
error ++;
|
||||
|
@ -605,7 +605,7 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||
if (!ifs)
|
||||
{
|
||||
cmOStringStream ostr;
|
||||
ostr << "Cannot open source file: " << fullPath.c_str();
|
||||
ostr << "Cannot open source file: " << fullPath;
|
||||
errorsWhileAccumulating.push_back(ostr.str());
|
||||
error ++;
|
||||
continue;
|
||||
|
@ -613,7 +613,7 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||
int untested = 0;
|
||||
std::string line;
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"Actually performing coverage for: " << i->c_str() << std::endl);
|
||||
"Actually performing coverage for: " << *i << std::endl);
|
||||
while (cmSystemTools::GetLineFromStream(ifs, line))
|
||||
{
|
||||
covLogFile << "\t\t<Line Number=\"" << untested << "\" Count=\"0\">"
|
||||
|
@ -647,7 +647,7 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||
++ erIt )
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
" " << erIt->c_str() << std::endl);
|
||||
" " << *erIt << std::endl);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -719,13 +719,13 @@ void cmCTestCoverageHandler::PopulateCustomVectors(cmMakefile *mf)
|
|||
++ it )
|
||||
{
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Add coverage exclude: "
|
||||
<< it->c_str() << std::endl);
|
||||
<< *it << std::endl);
|
||||
}
|
||||
for ( it = this->ExtraCoverageGlobs.begin();
|
||||
it != this->ExtraCoverageGlobs.end(); ++it)
|
||||
{
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Add coverage glob: "
|
||||
<< it->c_str() << std::endl);
|
||||
<< *it << std::endl);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 + "\" " +
|
||||
|
@ -959,17 +959,17 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||
std::string output = "";
|
||||
std::string errors = "";
|
||||
int retVal = 0;
|
||||
*cont->OFS << "* Run coverage for: " << fileDir.c_str() << std::endl;
|
||||
*cont->OFS << " Command: " << command.c_str() << std::endl;
|
||||
*cont->OFS << "* Run coverage for: " << fileDir << std::endl;
|
||||
*cont->OFS << " Command: " << command << std::endl;
|
||||
int res = this->CTest->RunCommand(command.c_str(), &output, &errors,
|
||||
&retVal, tempDir.c_str(), 0 /*this->TimeOut*/);
|
||||
|
||||
*cont->OFS << " Output: " << output.c_str() << std::endl;
|
||||
*cont->OFS << " Errors: " << errors.c_str() << std::endl;
|
||||
*cont->OFS << " Output: " << output << std::endl;
|
||||
*cont->OFS << " Errors: " << errors << std::endl;
|
||||
if ( ! res )
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Problem running coverage on file: " << it->c_str() << std::endl);
|
||||
"Problem running coverage on file: " << *it << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Command produced error: " << errors << std::endl);
|
||||
cont->Error ++;
|
||||
|
@ -978,7 +978,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||
if ( retVal != 0 )
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Coverage command returned: "
|
||||
<< retVal << " while processing: " << it->c_str() << std::endl);
|
||||
<< retVal << " while processing: " << *it << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Command produced error: " << cont->Error << std::endl);
|
||||
}
|
||||
|
@ -999,7 +999,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||
std::string sourceFile;
|
||||
std::string gcovFile;
|
||||
|
||||
cmCTestLog(this->CTest, DEBUG, "Line: [" << line->c_str() << "]"
|
||||
cmCTestLog(this->CTest, DEBUG, "Line: [" << *line << "]"
|
||||
<< std::endl);
|
||||
|
||||
if ( line->size() == 0 )
|
||||
|
@ -1145,7 +1145,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||
!cmSystemTools::StringStartsWith(line->c_str(), "Removing "))
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Unknown gcov output line: [" << line->c_str() << "]"
|
||||
"Unknown gcov output line: [" << *line << "]"
|
||||
<< std::endl);
|
||||
cont->Error ++;
|
||||
//abort();
|
||||
|
@ -1238,8 +1238,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||
if ( IsFileInDir(sourceFile, cont->SourceDir) )
|
||||
{
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " produced s: "
|
||||
<< sourceFile.c_str() << std::endl);
|
||||
*cont->OFS << " produced in source dir: " << sourceFile.c_str()
|
||||
<< sourceFile << std::endl);
|
||||
*cont->OFS << " produced in source dir: " << sourceFile
|
||||
<< std::endl;
|
||||
actualSourceFile
|
||||
= cmSystemTools::CollapseFullPath(sourceFile.c_str());
|
||||
|
@ -1247,8 +1247,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||
else if ( IsFileInDir(sourceFile, cont->BinaryDir) )
|
||||
{
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " produced b: "
|
||||
<< sourceFile.c_str() << std::endl);
|
||||
*cont->OFS << " produced in binary dir: " << sourceFile.c_str()
|
||||
<< sourceFile << std::endl);
|
||||
*cont->OFS << " produced in binary dir: " << sourceFile
|
||||
<< std::endl;
|
||||
actualSourceFile
|
||||
= cmSystemTools::CollapseFullPath(sourceFile.c_str());
|
||||
|
@ -1262,19 +1262,19 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||
"Something went wrong" << std::endl);
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"Cannot find file: ["
|
||||
<< sourceFile.c_str() << "]" << std::endl);
|
||||
<< sourceFile << "]" << std::endl);
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
" in source dir: ["
|
||||
<< cont->SourceDir.c_str() << "]"
|
||||
<< cont->SourceDir << "]"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
" or binary dir: ["
|
||||
<< cont->BinaryDir.size() << "]"
|
||||
<< std::endl);
|
||||
*cont->OFS << " Something went wrong. Cannot find file: "
|
||||
<< sourceFile.c_str()
|
||||
<< " in source dir: " << cont->SourceDir.c_str()
|
||||
<< " or binary dir: " << cont->BinaryDir.c_str() << std::endl;
|
||||
<< sourceFile
|
||||
<< " in source dir: " << cont->SourceDir
|
||||
<< " or binary dir: " << cont->BinaryDir << std::endl;
|
||||
|
||||
missingFiles.insert(sourceFile);
|
||||
}
|
||||
|
@ -1364,24 +1364,24 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
|
|||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot find source Python file corresponding to: "
|
||||
<< fileIt->c_str() << std::endl);
|
||||
<< *fileIt << std::endl);
|
||||
continue;
|
||||
}
|
||||
|
||||
std::string actualSourceFile
|
||||
= cmSystemTools::CollapseFullPath(fileName.c_str());
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
" Check coverage for file: " << actualSourceFile.c_str()
|
||||
" Check coverage for file: " << actualSourceFile
|
||||
<< std::endl);
|
||||
cmCTestCoverageHandlerContainer::SingleFileCoverageVector* vec
|
||||
= &cont->TotalCoverage[actualSourceFile];
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
" in file: " << fileIt->c_str() << std::endl);
|
||||
" in file: " << *fileIt << std::endl);
|
||||
cmsys::ifstream ifile(fileIt->c_str());
|
||||
if ( ! ifile )
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open file: "
|
||||
<< fileIt->c_str() << std::endl);
|
||||
<< *fileIt << std::endl);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1429,7 +1429,7 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
|
|||
// So, this will be set to 0.
|
||||
cov = 0;
|
||||
}
|
||||
cmCTestLog(this->CTest, DEBUG, "Prefix: " << prefix.c_str()
|
||||
cmCTestLog(this->CTest, DEBUG, "Prefix: " << prefix
|
||||
<< " cov: " << cov
|
||||
<< std::endl);
|
||||
// Read the line number starting at the 10th character of the gcov
|
||||
|
@ -1542,7 +1542,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
|
|||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot open coverage file: " <<
|
||||
outputFile.c_str() << std::endl);
|
||||
outputFile << std::endl);
|
||||
return 0;
|
||||
}
|
||||
std::map<std::string, std::string> fileMap;
|
||||
|
@ -1602,7 +1602,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
|
|||
count++;
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"Produce coverage for file: "
|
||||
<< file.c_str() << " " << count
|
||||
<< file << " " << count
|
||||
<< std::endl);
|
||||
// start the file output
|
||||
covLogFile << "\t<File Name=\""
|
||||
|
@ -1663,12 +1663,12 @@ int cmCTestCoverageHandler::RunBullseyeCommand(
|
|||
if(arg)
|
||||
{
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"Run : " << program.c_str() << " " << arg << "\n");
|
||||
"Run : " << program << " " << arg << "\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"Run : " << program.c_str() << "\n");
|
||||
"Run : " << program << "\n");
|
||||
}
|
||||
// create a process object and start it
|
||||
cmCTestRunProcess runCoverageSrc;
|
||||
|
@ -1686,7 +1686,7 @@ int cmCTestCoverageHandler::RunBullseyeCommand(
|
|||
if(!runCoverageSrc.StartProcess())
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Could not run : "
|
||||
<< program.c_str() << " " << arg << "\n"
|
||||
<< program << " " << arg << "\n"
|
||||
<< "kwsys process state : "
|
||||
<< runCoverageSrc.GetProcessState());
|
||||
return 0;
|
||||
|
@ -1755,7 +1755,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
|
|||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot open coverage summary file: " <<
|
||||
outputFile.c_str() << std::endl);
|
||||
outputFile << std::endl);
|
||||
return 0;
|
||||
}
|
||||
std::set<std::string> coveredFileNames;
|
||||
|
@ -1796,14 +1796,14 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
|
|||
{
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
".NoDartCoverage found, so skip coverage check for: "
|
||||
<< file.c_str()
|
||||
<< file
|
||||
<< std::endl);
|
||||
continue;
|
||||
}
|
||||
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"Doing coverage for: "
|
||||
<< file.c_str()
|
||||
<< file
|
||||
<< std::endl);
|
||||
|
||||
coveredFiles.push_back(sourceFile);
|
||||
|
@ -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());
|
||||
|
||||
|
@ -1830,7 +1830,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
|
|||
cmet /= 2.0f;
|
||||
}
|
||||
cmet /= 100.0f;
|
||||
tmpLog << stdline.c_str() << "\n";
|
||||
tmpLog << stdline << "\n";
|
||||
tmpLog << fileName << "\n";
|
||||
tmpLog << "functionsCalled: " << functionsCalled/100 << "\n";
|
||||
tmpLog << "totalFunctions: " << totalFunctions/100 << "\n";
|
||||
|
@ -1957,7 +1957,7 @@ bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine(
|
|||
if(pos == inputLine.npos)
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing string : "
|
||||
<< inputLine.c_str() << "\n");
|
||||
<< inputLine << "\n");
|
||||
return false;
|
||||
}
|
||||
// the source file has "" around it so extract out the file name
|
||||
|
@ -1991,7 +1991,7 @@ bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine(
|
|||
if(pos != inputLine.npos)
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing input : "
|
||||
<< inputLine.c_str() << " last pos not npos = " << pos <<
|
||||
<< inputLine << " last pos not npos = " << pos <<
|
||||
"\n");
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -25,8 +25,8 @@ bool cmCTestEmptyBinaryDirectoryCommand
|
|||
if ( !cmCTestScriptHandler::EmptyBinaryDirectory(args[0].c_str()) )
|
||||
{
|
||||
cmOStringStream ostr;
|
||||
ostr << "problem removing the binary directory: " << args[0].c_str();
|
||||
this->SetError(ostr.str().c_str());
|
||||
ostr << "problem removing the binary directory: " << args[0];
|
||||
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,10 +121,10 @@ 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()
|
||||
"Cannot create resulting XML file: " << ostr.str()
|
||||
<< std::endl);
|
||||
return false;
|
||||
}
|
||||
|
@ -153,10 +153,10 @@ 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);
|
||||
<< ostr.str() << std::endl);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -514,7 +514,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
|
|||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot find memory checker suppression file: "
|
||||
<< this->CTest->GetCTestConfiguration(
|
||||
"MemoryCheckSuppressionFile").c_str() << std::endl);
|
||||
"MemoryCheckSuppressionFile") << std::endl);
|
||||
return false;
|
||||
}
|
||||
std::string suppressions = "--suppressions="
|
||||
|
@ -569,7 +569,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
|
|||
}
|
||||
default:
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Do not understand memory checker: " << this->MemoryTester.c_str()
|
||||
"Do not understand memory checker: " << this->MemoryTester
|
||||
<< std::endl);
|
||||
return false;
|
||||
}
|
||||
|
@ -885,7 +885,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput(
|
|||
else if(!parser.ParseChunk(theLine.c_str(), theLine.size()))
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Error in ParseChunk: " << theLine.c_str()
|
||||
"Error in ParseChunk: " << theLine
|
||||
<< std::endl);
|
||||
}
|
||||
}
|
||||
|
@ -916,7 +916,7 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res,
|
|||
{
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"PostProcessBoundsCheckerTest for : "
|
||||
<< res.Name.c_str() << std::endl);
|
||||
<< res.Name << std::endl);
|
||||
std::string ofile = testOutputFileName(test);
|
||||
if ( ofile.empty() )
|
||||
{
|
||||
|
@ -943,10 +943,10 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res,
|
|||
cmSystemTools::Delay(1000);
|
||||
cmSystemTools::RemoveFile(this->BoundsCheckerDPBDFile.c_str());
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "
|
||||
<< this->BoundsCheckerDPBDFile.c_str() << std::endl);
|
||||
<< this->BoundsCheckerDPBDFile << std::endl);
|
||||
cmSystemTools::RemoveFile(this->BoundsCheckerXMLFile.c_str());
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "
|
||||
<< this->BoundsCheckerXMLFile.c_str() << std::endl);
|
||||
<< this->BoundsCheckerXMLFile << std::endl);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -955,7 +955,7 @@ cmCTestMemCheckHandler::PostProcessPurifyTest(cmCTestTestResult& res,
|
|||
{
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"PostProcessPurifyTest for : "
|
||||
<< res.Name.c_str() << std::endl);
|
||||
<< res.Name << std::endl);
|
||||
appendMemTesterOutput(res, test);
|
||||
}
|
||||
|
||||
|
@ -965,7 +965,7 @@ cmCTestMemCheckHandler::PostProcessValgrindTest(cmCTestTestResult& res,
|
|||
{
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"PostProcessValgrindTest for : "
|
||||
<< res.Name.c_str() << std::endl);
|
||||
<< res.Name << std::endl);
|
||||
appendMemTesterOutput(res, test);
|
||||
}
|
||||
|
||||
|
|
|
@ -672,7 +672,7 @@ void cmCTestMultiProcessHandler::PrintTestList()
|
|||
indexStr << " #" << p.Index << ":";
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
std::setw(3 + getNumWidth(this->TestHandler->GetMaxIndex()))
|
||||
<< indexStr.str().c_str());
|
||||
<< indexStr.str());
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, p.Name.c_str() << std::endl);
|
||||
//pop working dir
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -334,9 +334,9 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
|
|||
*this->TestHandler->LogFile << "Test Failed.\n";
|
||||
}
|
||||
}
|
||||
*this->TestHandler->LogFile << "\"" << this->TestProperties->Name.c_str()
|
||||
*this->TestHandler->LogFile << "\"" << this->TestProperties->Name
|
||||
<< "\" end time: " << this->CTest->CurrentTime() << std::endl
|
||||
<< "\"" << this->TestProperties->Name.c_str() << "\" time elapsed: "
|
||||
<< "\"" << this->TestProperties->Name << "\" time elapsed: "
|
||||
<< buffer << std::endl
|
||||
<< "----------------------------------------------------------"
|
||||
<< std::endl << std::endl;
|
||||
|
@ -388,8 +388,8 @@ void cmCTestRunTest::MemCheckPostProcess()
|
|||
}
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index
|
||||
<< ": process test output now: "
|
||||
<< this->TestProperties->Name.c_str() << " "
|
||||
<< this->TestResult.Name.c_str() << std::endl);
|
||||
<< this->TestProperties->Name << " "
|
||||
<< this->TestResult.Name << std::endl);
|
||||
cmCTestMemCheckHandler * handler = static_cast<cmCTestMemCheckHandler*>
|
||||
(this->TestHandler);
|
||||
switch ( handler->MemoryTesterStyle )
|
||||
|
@ -465,9 +465,9 @@ bool cmCTestRunTest::StartTest(size_t total)
|
|||
//Required file was not found
|
||||
this->TestProcess = new cmProcess;
|
||||
*this->TestHandler->LogFile << "Unable to find required file: "
|
||||
<< file.c_str() << std::endl;
|
||||
<< file << std::endl;
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unable to find required file: "
|
||||
<< file.c_str() << std::endl);
|
||||
<< file << std::endl);
|
||||
this->TestResult.Output = "Unable to find required file: " + file;
|
||||
this->TestResult.FullCommandLine = "";
|
||||
this->TestResult.CompletionStatus = "Not Run";
|
||||
|
@ -482,9 +482,9 @@ bool cmCTestRunTest::StartTest(size_t total)
|
|||
// that has that information
|
||||
this->TestProcess = new cmProcess;
|
||||
*this->TestHandler->LogFile << "Unable to find executable: "
|
||||
<< args[1].c_str() << std::endl;
|
||||
<< args[1] << std::endl;
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unable to find executable: "
|
||||
<< args[1].c_str() << std::endl);
|
||||
<< args[1] << std::endl);
|
||||
this->TestResult.Output = "Unable to find executable: " + args[1];
|
||||
this->TestResult.FullCommandLine = "";
|
||||
this->TestResult.CompletionStatus = "Not Run";
|
||||
|
@ -711,7 +711,7 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total)
|
|||
indexStr << " #" << this->Index << ":";
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
std::setw(3 + getNumWidth(this->TestHandler->GetMaxIndex()))
|
||||
<< indexStr.str().c_str());
|
||||
<< indexStr.str());
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
|
||||
const int maxTestNameWidth = this->CTest->GetMaxTestNameWidth();
|
||||
std::string outname = this->TestProperties->Name + " ";
|
||||
|
@ -722,18 +722,18 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total)
|
|||
<< this->TestProperties->Name << std::endl;
|
||||
*this->TestHandler->LogFile << this->TestProperties->Index << "/"
|
||||
<< this->TestHandler->TotalNumberOfTests
|
||||
<< " Test: " << this->TestProperties->Name.c_str() << std::endl;
|
||||
<< " Test: " << this->TestProperties->Name << std::endl;
|
||||
*this->TestHandler->LogFile << "Command: \"" << this->ActualCommand << "\"";
|
||||
|
||||
for (std::vector<std::string>::iterator i = this->Arguments.begin();
|
||||
i != this->Arguments.end(); ++i)
|
||||
{
|
||||
*this->TestHandler->LogFile
|
||||
<< " \"" << i->c_str() << "\"";
|
||||
<< " \"" << *i << "\"";
|
||||
}
|
||||
*this->TestHandler->LogFile << std::endl
|
||||
<< "Directory: " << this->TestProperties->Directory << std::endl
|
||||
<< "\"" << this->TestProperties->Name.c_str() << "\" start time: "
|
||||
<< "\"" << this->TestProperties->Name << "\" start time: "
|
||||
<< this->StartTime << std::endl;
|
||||
|
||||
*this->TestHandler->LogFile
|
||||
|
@ -741,9 +741,9 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total)
|
|||
<< "----------------------------------------------------------"
|
||||
<< std::endl;
|
||||
*this->TestHandler->LogFile
|
||||
<< this->ProcessOutput.c_str() << "<end of output>" << std::endl;
|
||||
<< this->ProcessOutput << "<end of output>" << std::endl;
|
||||
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, outname.c_str());
|
||||
cmCTestLog(this->CTest, DEBUG, "Testing "
|
||||
<< this->TestProperties->Name.c_str() << " ... ");
|
||||
<< this->TestProperties->Name << " ... ");
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
@ -426,7 +426,7 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
|
|||
cmSystemTools::GetErrorOccuredFlag())
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read:"
|
||||
<< systemFile.c_str() << "\n");
|
||||
<< systemFile << "\n");
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -444,7 +444,7 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
|
|||
cmSystemTools::GetErrorOccuredFlag())
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read script: "
|
||||
<< script.c_str()
|
||||
<< script
|
||||
<< std::endl);
|
||||
// Reset the error flag so that it can run more than
|
||||
// one script with an error when you
|
||||
|
@ -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;
|
||||
|
@ -781,7 +781,7 @@ int cmCTestScriptHandler::PerformExtraUpdates()
|
|||
output = "";
|
||||
retVal = 0;
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run Update: "
|
||||
<< fullCommand.c_str() << std::endl);
|
||||
<< fullCommand << std::endl);
|
||||
res = cmSystemTools::RunSingleCommand(fullCommand.c_str(), &output,
|
||||
&retVal, cvsArgs[0].c_str(),
|
||||
this->HandlerVerbose, 0 /*this->TimeOut*/);
|
||||
|
@ -902,7 +902,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
|
|||
command += "\"";
|
||||
retVal = 0;
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run cmake command: "
|
||||
<< command.c_str() << std::endl);
|
||||
<< command << std::endl);
|
||||
res = cmSystemTools::RunSingleCommand(command.c_str(), &output,
|
||||
&retVal, this->BinaryDir.c_str(),
|
||||
this->HandlerVerbose, 0 /*this->TimeOut*/);
|
||||
|
@ -916,7 +916,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
|
|||
}
|
||||
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"Write CMake output to file: " << cmakeOutputFile.c_str()
|
||||
"Write CMake output to file: " << cmakeOutputFile
|
||||
<< std::endl);
|
||||
cmGeneratedFileStream fout(cmakeOutputFile.c_str());
|
||||
if ( fout )
|
||||
|
@ -927,7 +927,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
|
|||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot open CMake output file: "
|
||||
<< cmakeOutputFile.c_str() << " for writing" << std::endl);
|
||||
<< cmakeOutputFile << " for writing" << std::endl);
|
||||
}
|
||||
}
|
||||
if (!res || retVal != 0)
|
||||
|
@ -948,7 +948,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
|
|||
output = "";
|
||||
retVal = 0;
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run ctest command: "
|
||||
<< command.c_str() << std::endl);
|
||||
<< command << std::endl);
|
||||
res = cmSystemTools::RunSingleCommand(command.c_str(), &output,
|
||||
&retVal, this->BinaryDir.c_str(), this->HandlerVerbose,
|
||||
0 /*this->TimeOut*/);
|
||||
|
@ -962,13 +962,13 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
|
|||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Unable to run cmake:" << std::endl
|
||||
<< cmakeFailedOuput.c_str() << std::endl);
|
||||
<< cmakeFailedOuput << std::endl);
|
||||
return 10;
|
||||
}
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Unable to run ctest:" << std::endl
|
||||
<< "command: " << command.c_str() << std::endl
|
||||
<< "output: " << output.c_str() << std::endl);
|
||||
<< "command: " << command << std::endl
|
||||
<< "output: " << output << std::endl);
|
||||
if (!res)
|
||||
{
|
||||
return 11;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -229,18 +229,18 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
|
|||
if ( ::stat(local_file.c_str(), &st) )
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot find file: "
|
||||
<< local_file.c_str() << std::endl);
|
||||
<< local_file << std::endl);
|
||||
::curl_easy_cleanup(curl);
|
||||
::curl_global_cleanup();
|
||||
return false;
|
||||
}
|
||||
|
||||
ftpfile = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
|
||||
*this->LogFile << "\tUpload file: " << local_file.c_str() << " to "
|
||||
<< upload_as.c_str() << std::endl;
|
||||
*this->LogFile << "\tUpload file: " << local_file << " to "
|
||||
<< upload_as << std::endl;
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: "
|
||||
<< local_file.c_str() << " to "
|
||||
<< upload_as.c_str() << std::endl);
|
||||
<< local_file << " to "
|
||||
<< upload_as << std::endl);
|
||||
|
||||
::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
|
||||
|
@ -290,11 +290,11 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
|
|||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
" Error when uploading file: "
|
||||
<< local_file.c_str() << std::endl);
|
||||
<< local_file << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error message was: "
|
||||
<< error_buffer << std::endl);
|
||||
*this->LogFile << " Error when uploading file: "
|
||||
<< local_file.c_str()
|
||||
<< local_file
|
||||
<< std::endl
|
||||
<< " Error message was: "
|
||||
<< error_buffer << std::endl
|
||||
|
@ -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();
|
||||
|
@ -422,8 +422,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||
std::string remote_file
|
||||
= remoteprefix + cmSystemTools::GetFilenameName(*file);
|
||||
|
||||
*this->LogFile << "\tUpload file: " << local_file.c_str() << " to "
|
||||
<< remote_file.c_str() << std::endl;
|
||||
*this->LogFile << "\tUpload file: " << local_file << " to "
|
||||
<< remote_file << std::endl;
|
||||
|
||||
std::string ofile = "";
|
||||
for ( kk = 0; kk < remote_file.size(); kk ++ )
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -470,7 +470,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||
if ( ::stat(local_file.c_str(), &st) )
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot find file: "
|
||||
<< local_file.c_str() << std::endl);
|
||||
<< local_file << std::endl);
|
||||
::curl_easy_cleanup(curl);
|
||||
::curl_global_cleanup();
|
||||
return false;
|
||||
|
@ -478,8 +478,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||
|
||||
ftpfile = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: "
|
||||
<< local_file.c_str() << " to "
|
||||
<< upload_as.c_str() << " Size: " << st.st_size << std::endl);
|
||||
<< local_file << " to "
|
||||
<< upload_as << " Size: " << st.st_size << std::endl);
|
||||
|
||||
// specify target
|
||||
::curl_easy_setopt(curl,CURLOPT_URL, upload_as.c_str());
|
||||
|
@ -595,11 +595,11 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
" Error when uploading file: "
|
||||
<< local_file.c_str() << std::endl);
|
||||
<< local_file << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error message was: "
|
||||
<< error_buffer << std::endl);
|
||||
*this->LogFile << " Error when uploading file: "
|
||||
<< local_file.c_str()
|
||||
<< local_file
|
||||
<< std::endl
|
||||
<< " Error message was: " << error_buffer
|
||||
<< std::endl;
|
||||
|
@ -750,15 +750,15 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(
|
|||
std::string turl
|
||||
= url + ((url.find("?",0) == std::string::npos) ? "?" : "&")
|
||||
+ "xmlfile=" + ofile;
|
||||
*this->LogFile << "Trigger url: " << turl.c_str() << std::endl;
|
||||
*this->LogFile << "Trigger url: " << turl << std::endl;
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Trigger url: "
|
||||
<< turl.c_str() << std::endl);
|
||||
<< turl << std::endl);
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
|
||||
curl_easy_setopt(curl, CURLOPT_URL, turl.c_str());
|
||||
if ( curl_easy_perform(curl) )
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error when triggering: "
|
||||
<< turl.c_str() << std::endl);
|
||||
<< turl << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error message was: "
|
||||
<< error_buffer << std::endl);
|
||||
*this->LogFile << "\tTriggering failed with error: " << error_buffer
|
||||
|
@ -932,8 +932,8 @@ bool cmCTestSubmitHandler::SubmitUsingCP(
|
|||
std::string rfname = destination + "/" + remoteprefix + *file;
|
||||
cmSystemTools::CopyFileAlways(lfname.c_str(), rfname.c_str());
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Copy file: "
|
||||
<< lfname.c_str() << " to "
|
||||
<< rfname.c_str() << std::endl);
|
||||
<< lfname << " to "
|
||||
<< rfname << std::endl);
|
||||
}
|
||||
std::string tagDoneFile = destination + "/" + remoteprefix + "DONE";
|
||||
cmSystemTools::Touch(tagDoneFile.c_str(), true);
|
||||
|
@ -1183,7 +1183,7 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||
= buildDirectory + "/Testing/" + this->CTest->GetCurrentTag();
|
||||
std::string::size_type glen = gpath.size() + 1;
|
||||
gpath = gpath + "/CoverageLog*";
|
||||
cmCTestLog(this->CTest, DEBUG, "Globbing for: " << gpath.c_str()
|
||||
cmCTestLog(this->CTest, DEBUG, "Globbing for: " << gpath
|
||||
<< std::endl);
|
||||
if ( cmSystemTools::SimpleGlob(gpath, gfiles, 1) )
|
||||
{
|
||||
|
@ -1191,7 +1191,7 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||
for ( cc = 0; cc < gfiles.size(); cc ++ )
|
||||
{
|
||||
gfiles[cc] = gfiles[cc].substr(glen);
|
||||
cmCTestLog(this->CTest, DEBUG, "Glob file: " << gfiles[cc].c_str()
|
||||
cmCTestLog(this->CTest, DEBUG, "Glob file: " << gfiles[cc]
|
||||
<< std::endl);
|
||||
this->CTest->AddSubmitFile(cmCTest::PartCoverage, gfiles[cc].c_str());
|
||||
}
|
||||
|
@ -1232,7 +1232,7 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||
cmCTest::SetOfStrings::iterator it;
|
||||
for ( it = files.begin(); it != files.end(); ++ it )
|
||||
{
|
||||
ofs << cnt << "\t" << it->c_str() << std::endl;
|
||||
ofs << cnt << "\t" << *it << std::endl;
|
||||
cnt ++;
|
||||
}
|
||||
}
|
||||
|
@ -1448,7 +1448,7 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||
oldWorkingDirectory = cmSystemTools::GetCurrentWorkingDirectory();
|
||||
cmSystemTools::ChangeDirectory(buildDirectory.c_str());
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Change directory: "
|
||||
<< buildDirectory.c_str() << std::endl);
|
||||
<< buildDirectory << std::endl);
|
||||
|
||||
if ( !this->SubmitUsingCP(
|
||||
"Testing/"+this->CTest->GetCurrentTag(),
|
||||
|
|
|
@ -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;
|
||||
|
@ -616,7 +616,7 @@ int cmCTestTestHandler::ProcessHandler()
|
|||
ofs << ftit->TestCount << ":" << ftit->Name << std::endl;
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "\t" << std::setw(3)
|
||||
<< ftit->TestCount << " - "
|
||||
<< ftit->Name.c_str() << " ("
|
||||
<< ftit->Name << " ("
|
||||
<< this->GetTestStatus(ftit->Status) << ")"
|
||||
<< std::endl);
|
||||
}
|
||||
|
@ -1022,7 +1022,7 @@ bool cmCTestTestHandler::GetValue(const char* tag,
|
|||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"parse error: missing tag: "
|
||||
<< tag << " found [" << line.c_str() << "]" << std::endl);
|
||||
<< tag << " found [" << line << "]" << std::endl);
|
||||
ret = false;
|
||||
}
|
||||
return ret;
|
||||
|
@ -1223,7 +1223,7 @@ void cmCTestTestHandler::GenerateDartOutput(std::ostream& os)
|
|||
{
|
||||
os
|
||||
<< "\t\t\t<NamedMeasurement type=\"text/string\" "
|
||||
<< "name=\"" << measureIt->first.c_str() << "\"><Value>"
|
||||
<< "name=\"" << measureIt->first << "\"><Value>"
|
||||
<< cmXMLSafe(measureIt->second)
|
||||
<< "</Value></NamedMeasurement>\n";
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1820,7 +1820,7 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed()
|
|||
else if ( !this->CTest->GetShowOnly() && !this->CTest->ShouldPrintLabels() )
|
||||
{
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Problem reading file: "
|
||||
<< lastTestsFailedLog.c_str() <<
|
||||
<< lastTestsFailedLog <<
|
||||
" while generating list of previously failed tests." << std::endl);
|
||||
}
|
||||
}
|
||||
|
@ -1960,7 +1960,7 @@ std::string cmCTestTestHandler::GenerateRegressionImages(
|
|||
<< " " << k1 << "=\"" << v1 << "\""
|
||||
<< " " << k2 << "=\"" << v2 << "\""
|
||||
<< " encoding=\"none\""
|
||||
<< "><Value>Image " << filename.c_str()
|
||||
<< "><Value>Image " << filename
|
||||
<< " is empty</Value></NamedMeasurement>";
|
||||
}
|
||||
else
|
||||
|
@ -2014,10 +2014,10 @@ std::string cmCTestTestHandler::GenerateRegressionImages(
|
|||
<< "\t\t\t<NamedMeasurement"
|
||||
<< " name=\"" << measurementfile.match(idx) << "\""
|
||||
<< " text=\"text/string\""
|
||||
<< "><Value>File " << filename.c_str()
|
||||
<< "><Value>File " << filename
|
||||
<< " not found</Value></NamedMeasurement>"
|
||||
<< std::endl;
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "File \"" << filename.c_str()
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "File \"" << filename
|
||||
<< "\" not found." << std::endl);
|
||||
}
|
||||
cxml.erase(measurementfile.start(),
|
||||
|
@ -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" )
|
||||
|
|
|
@ -331,7 +331,7 @@ int cmCTestUpdateHandler::DetectVCS(const char* dir)
|
|||
{
|
||||
std::string sourceDirectory = dir;
|
||||
cmCTestLog(this->CTest, DEBUG, "Check directory: "
|
||||
<< sourceDirectory.c_str() << std::endl);
|
||||
<< sourceDirectory << std::endl);
|
||||
sourceDirectory += "/.svn";
|
||||
if ( cmSystemTools::FileExists(sourceDirectory.c_str()) )
|
||||
{
|
||||
|
|
|
@ -64,7 +64,7 @@ int cmCTestUploadHandler::ProcessHandler()
|
|||
for ( it = this->Files.begin(); it != this->Files.end(); it ++ )
|
||||
{
|
||||
cmCTestLog(this->CTest, OUTPUT,
|
||||
"\tUpload file: " << it->c_str() << std::endl);
|
||||
"\tUpload file: " << *it << std::endl);
|
||||
ofs << "<File filename=\"" << cmXMLSafe(*it) << "\">\n"
|
||||
<< "<Content encoding=\"base64\">\n";
|
||||
ofs << this->CTest->Base64EncodeFile(*it);
|
||||
|
|
|
@ -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())
|
||||
{
|
||||
|
@ -286,9 +286,9 @@ bool cmAddCustomCommandCommand
|
|||
|
||||
// No command for this output exists.
|
||||
cmOStringStream e;
|
||||
e << "given APPEND option with output \"" << output[0].c_str()
|
||||
e << "given APPEND option with output \"" << output[0]
|
||||
<< "\" 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;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,8 +79,8 @@ bool cmCMakeMinimumRequired
|
|||
&required_patch, &required_tweak) < 2)
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "could not parse VERSION \"" << version_string.c_str() << "\".";
|
||||
this->SetError(e.str().c_str());
|
||||
e << "could not parse VERSION \"" << version_string << "\".";
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ bool cmCMakeMinimumRequired
|
|||
{
|
||||
// The current version is too low.
|
||||
cmOStringStream e;
|
||||
e << "CMake " << version_string.c_str()
|
||||
e << "CMake " << version_string
|
||||
<< " or higher is required. You are running version "
|
||||
<< cmVersion::GetCMakeVersion();
|
||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
|
||||
|
@ -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)
|
||||
|
|
|
@ -78,7 +78,7 @@ struct tm* cmCTest::GetNightlyTime(std::string str,
|
|||
lctime->tm_mday,
|
||||
str.c_str());
|
||||
cmCTestLog(this, OUTPUT, "Determine Nightly Start Time" << std::endl
|
||||
<< " Specified time: " << str.c_str() << std::endl);
|
||||
<< " Specified time: " << str << std::endl);
|
||||
//Convert the nightly start time to seconds. Since we are
|
||||
//providing only a time and a timezone, the current date of
|
||||
//the local machine is assumed. Consequently, nightlySeconds
|
||||
|
@ -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))
|
||||
|
@ -681,14 +681,14 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
|||
if ( !fname.empty() )
|
||||
{
|
||||
cmCTestLog(this, OUTPUT, " Reading ctest configuration file: "
|
||||
<< fname.c_str() << std::endl);
|
||||
<< fname << std::endl);
|
||||
bool readit = mf->ReadListFile(mf->GetCurrentListFile(),
|
||||
fname.c_str() );
|
||||
if(!readit)
|
||||
{
|
||||
std::string m = "Could not find include file: ";
|
||||
m += fname;
|
||||
command->SetError(m.c_str());
|
||||
command->SetError(m);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -696,10 +696,10 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
|||
{
|
||||
cmCTestLog(this, WARNING,
|
||||
"Cannot locate CTest configuration: in BuildDirectory: "
|
||||
<< bld_dir_fname.c_str() << std::endl);
|
||||
<< bld_dir_fname << std::endl);
|
||||
cmCTestLog(this, WARNING,
|
||||
"Cannot locate CTest configuration: in SourceDirectory: "
|
||||
<< src_dir_fname.c_str() << std::endl);
|
||||
<< src_dir_fname << std::endl);
|
||||
}
|
||||
|
||||
this->SetCTestConfigurationFromCMakeVariable(mf, "NightlyStartTime",
|
||||
|
@ -748,13 +748,13 @@ bool cmCTest::UpdateCTestConfiguration()
|
|||
}
|
||||
}
|
||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "UpdateCTestConfiguration from :"
|
||||
<< fileName.c_str() << "\n");
|
||||
<< fileName << "\n");
|
||||
if ( !cmSystemTools::FileExists(fileName.c_str()) )
|
||||
{
|
||||
// No need to exit if we are not producing XML
|
||||
if ( this->ProduceXML )
|
||||
{
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot find file: " << fileName.c_str()
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot find file: " << fileName
|
||||
<< std::endl);
|
||||
return false;
|
||||
}
|
||||
|
@ -762,7 +762,7 @@ bool cmCTest::UpdateCTestConfiguration()
|
|||
else
|
||||
{
|
||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Parse Config file:"
|
||||
<< fileName.c_str() << "\n");
|
||||
<< fileName << "\n");
|
||||
// parse the dart test file
|
||||
cmsys::ifstream fin(fileName.c_str());
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -1346,7 +1346,7 @@ int cmCTest::RunTest(std::vector<const char*> argv,
|
|||
*output += oss.str();
|
||||
if ( log )
|
||||
{
|
||||
*log << output->c_str();
|
||||
*log << *output;
|
||||
}
|
||||
cmSystemTools::ChangeDirectory(oldpath.c_str());
|
||||
|
||||
|
@ -1562,7 +1562,7 @@ void cmCTest::AddSiteProperties(std::ostream& ostr)
|
|||
for(std::vector<std::string>::iterator i = args.begin();
|
||||
i != args.end(); ++i)
|
||||
{
|
||||
ostr << " <Label>" << i->c_str() << "</Label>\n";
|
||||
ostr << " <Label>" << *i << "</Label>\n";
|
||||
}
|
||||
ostr << " </Labels>\n";
|
||||
}
|
||||
|
@ -1606,7 +1606,7 @@ int cmCTest::GenerateCTestNotesOutput(std::ostream& os,
|
|||
|
||||
for ( it = files.begin(); it != files.end(); it ++ )
|
||||
{
|
||||
cmCTestLog(this, OUTPUT, "\tAdd file: " << it->c_str() << std::endl);
|
||||
cmCTestLog(this, OUTPUT, "\tAdd file: " << *it << std::endl);
|
||||
std::string note_time = this->CurrentTime();
|
||||
os << "<Note Name=\"" << cmXMLSafe(*it) << "\">\n"
|
||||
<< "<Time>" << cmSystemTools::GetTime() << "</Time>\n"
|
||||
|
@ -1624,8 +1624,8 @@ int cmCTest::GenerateCTestNotesOutput(std::ostream& os,
|
|||
}
|
||||
else
|
||||
{
|
||||
os << "Problem reading file: " << it->c_str() << std::endl;
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Problem reading file: " << it->c_str()
|
||||
os << "Problem reading file: " << *it << std::endl;
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Problem reading file: " << *it
|
||||
<< " while creating notes" << std::endl);
|
||||
}
|
||||
os << "</Text>\n"
|
||||
|
@ -1732,7 +1732,7 @@ bool cmCTest::SubmitExtraFiles(const VectorOfStrings &files)
|
|||
if ( !cmSystemTools::FileExists(it->c_str()) )
|
||||
{
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot find extra file: "
|
||||
<< it->c_str() << " to submit."
|
||||
<< *it << " to submit."
|
||||
<< std::endl;);
|
||||
return false;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -2319,7 +2319,7 @@ int cmCTest::Run(std::vector<std::string> &args, std::string* output)
|
|||
executeTests = false;
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"CTest -T called with incorrect option: "
|
||||
<< args[i].c_str() << std::endl);
|
||||
<< args[i] << std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl
|
||||
<< " " << ctestExec << " -T all" << std::endl
|
||||
<< " " << ctestExec << " -T start" << std::endl
|
||||
|
@ -2356,7 +2356,7 @@ int cmCTest::Run(std::vector<std::string> &args, std::string* output)
|
|||
{
|
||||
executeTests = false;
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"CTest -M called with incorrect option: " << str.c_str()
|
||||
"CTest -M called with incorrect option: " << str
|
||||
<< std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl
|
||||
<< " " << ctestExec << " -M Continuous" << std::endl
|
||||
|
@ -2527,11 +2527,11 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
|
|||
std::string fname = dir;
|
||||
fname += "/CTestCustom.cmake";
|
||||
cmCTestLog(this, DEBUG, "* Check for file: "
|
||||
<< fname.c_str() << std::endl);
|
||||
<< fname << std::endl);
|
||||
if ( cmSystemTools::FileExists(fname.c_str()) )
|
||||
{
|
||||
cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: "
|
||||
<< fname.c_str() << std::endl);
|
||||
<< fname << std::endl);
|
||||
bool erroroc = cmSystemTools::GetErrorOccuredFlag();
|
||||
cmSystemTools::ResetErrorOccuredFlag();
|
||||
|
||||
|
@ -2540,7 +2540,7 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
|
|||
{
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Problem reading custom configuration: "
|
||||
<< fname.c_str() << std::endl);
|
||||
<< fname << std::endl);
|
||||
}
|
||||
found = true;
|
||||
if ( erroroc )
|
||||
|
@ -2552,7 +2552,7 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
|
|||
std::string rexpr = dir;
|
||||
rexpr += "/CTestCustom.ctest";
|
||||
cmCTestLog(this, DEBUG, "* Check for file: "
|
||||
<< rexpr.c_str() << std::endl);
|
||||
<< rexpr << std::endl);
|
||||
if ( !found && cmSystemTools::FileExists(rexpr.c_str()) )
|
||||
{
|
||||
cmsys::Glob gl;
|
||||
|
@ -2564,13 +2564,13 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
|
|||
++ fileIt )
|
||||
{
|
||||
cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: "
|
||||
<< fileIt->c_str() << std::endl);
|
||||
<< *fileIt << std::endl);
|
||||
if ( !mf->ReadListFile(0, fileIt->c_str()) ||
|
||||
cmSystemTools::GetErrorOccuredFlag() )
|
||||
{
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Problem reading custom configuration: "
|
||||
<< fileIt->c_str() << std::endl);
|
||||
<< *fileIt << std::endl);
|
||||
}
|
||||
}
|
||||
found = true;
|
||||
|
@ -2584,7 +2584,7 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
|
|||
{
|
||||
cmCTestLog(this, DEBUG,
|
||||
"* Read custom CTest configuration vectors for handler: "
|
||||
<< it->first.c_str() << " (" << it->second << ")" << std::endl);
|
||||
<< it->first << " (" << it->second << ")" << std::endl);
|
||||
it->second->PopulateCustomVectors(mf);
|
||||
}
|
||||
}
|
||||
|
@ -2610,8 +2610,8 @@ 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());
|
||||
cmCTestLog(this, DEBUG, " -- " << *it << std::endl);
|
||||
vec.push_back(*it);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2849,7 +2849,7 @@ void cmCTest::AddCTestConfigurationOverwrite(const std::string& overStr)
|
|||
"CTest configuration overwrite specified in the wrong format."
|
||||
<< std::endl
|
||||
<< "Valid format is: --overwrite key=value" << std::endl
|
||||
<< "The specified was: --overwrite " << overStr.c_str() << std::endl);
|
||||
<< "The specified was: --overwrite " << overStr << std::endl);
|
||||
return;
|
||||
}
|
||||
std::string key = overStr.substr(0, epos);
|
||||
|
|
|
@ -644,7 +644,7 @@ void cmCacheManager::OutputHelpString(std::ostream& fout,
|
|||
fout << "\\n";
|
||||
}
|
||||
oneLine = helpString.substr(pos, i - pos);
|
||||
fout << oneLine.c_str() << "\n";
|
||||
fout << oneLine << "\n";
|
||||
pos = i;
|
||||
}
|
||||
}
|
||||
|
@ -698,7 +698,7 @@ void cmCacheManager::PrintCache(std::ostream& out) const
|
|||
{
|
||||
if((*i).second.Type != INTERNAL)
|
||||
{
|
||||
out << (*i).first.c_str() << " = " << (*i).second.Value.c_str()
|
||||
out << (*i).first << " = " << (*i).second.Value
|
||||
<< std::endl;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
@ -293,7 +293,7 @@ int cmCommandArgumentParserHelper::ParseString(const char* str, int verb)
|
|||
if ( Verbose )
|
||||
{
|
||||
std::cerr << "Expanding [" << str << "] produced: ["
|
||||
<< this->Result.c_str() << "]" << std::endl;
|
||||
<< this->Result << "]" << std::endl;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -284,7 +284,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
|
|||
{
|
||||
cmOStringStream e;
|
||||
e << "Failed to open\n"
|
||||
<< " " << outFileName.c_str() << "\n"
|
||||
<< " " << outFileName << "\n"
|
||||
<< cmSystemTools::GetLastSystemError();
|
||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
|
||||
return -1;
|
||||
|
@ -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)
|
||||
|
@ -519,9 +519,9 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
|
|||
{
|
||||
cmOStringStream emsg;
|
||||
emsg << "Cannot copy output executable\n"
|
||||
<< " '" << this->OutputFile.c_str() << "'\n"
|
||||
<< " '" << this->OutputFile << "'\n"
|
||||
<< "to destination specified by COPY_FILE:\n"
|
||||
<< " '" << copyFile.c_str() << "'\n";
|
||||
<< " '" << copyFile << "'\n";
|
||||
if(!this->FindErrorMessage.empty())
|
||||
{
|
||||
emsg << this->FindErrorMessage.c_str();
|
||||
|
@ -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,11 +274,11 @@ 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;
|
||||
internalDepends << " " << i->c_str() << std::endl;
|
||||
internalDepends << " " << *i << std::endl;
|
||||
}
|
||||
makeDepends << 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,11 +449,11 @@ 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;
|
||||
internalDepends << " " << i->c_str() << std::endl;
|
||||
internalDepends << " " << *i << std::endl;
|
||||
}
|
||||
makeDepends << 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";
|
||||
|
@ -666,7 +666,7 @@ bool cmDependsFortran::CopyModule(const std::vector<std::string>& args)
|
|||
if(!cmSystemTools::CopyFileAlways(mod_upper.c_str(), stamp.c_str()))
|
||||
{
|
||||
std::cerr << "Error copying Fortran module from \""
|
||||
<< mod_upper.c_str() << "\" to \"" << stamp.c_str()
|
||||
<< mod_upper << "\" to \"" << stamp
|
||||
<< "\".\n";
|
||||
return false;
|
||||
}
|
||||
|
@ -681,7 +681,7 @@ bool cmDependsFortran::CopyModule(const std::vector<std::string>& args)
|
|||
if(!cmSystemTools::CopyFileAlways(mod_lower.c_str(), stamp.c_str()))
|
||||
{
|
||||
std::cerr << "Error copying Fortran module from \""
|
||||
<< mod_lower.c_str() << "\" to \"" << stamp.c_str()
|
||||
<< mod_lower << "\" to \"" << stamp
|
||||
<< "\".\n";
|
||||
return false;
|
||||
}
|
||||
|
@ -689,9 +689,9 @@ bool cmDependsFortran::CopyModule(const std::vector<std::string>& args)
|
|||
return true;
|
||||
}
|
||||
|
||||
std::cerr << "Error copying Fortran module \"" << args[2].c_str()
|
||||
<< "\". Tried \"" << mod_upper.c_str()
|
||||
<< "\" and \"" << mod_lower.c_str() << "\".\n";
|
||||
std::cerr << "Error copying Fortran module \"" << args[2]
|
||||
<< "\". Tried \"" << mod_upper
|
||||
<< "\" and \"" << mod_lower << "\".\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ void cmDependsJavaParserHelper::PrintClasses()
|
|||
sit != files.end();
|
||||
++ sit )
|
||||
{
|
||||
std::cout << " " << sit->c_str() << ".class" << std::endl;
|
||||
std::cout << " " << *sit << ".class" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -308,7 +308,7 @@ int cmDependsJavaParserHelper::ParseString(const char* str, int verb)
|
|||
if ( this->CurrentPackage.size() > 0 )
|
||||
{
|
||||
std::cout << "Current package is: " <<
|
||||
this->CurrentPackage.c_str() << std::endl;
|
||||
this->CurrentPackage << std::endl;
|
||||
}
|
||||
std::cout << "Imports packages:";
|
||||
if ( this->PackagesImport.size() > 0 )
|
||||
|
@ -318,7 +318,7 @@ int cmDependsJavaParserHelper::ParseString(const char* str, int verb)
|
|||
it != this->PackagesImport.end();
|
||||
++ it )
|
||||
{
|
||||
std::cout << " " << it->c_str();
|
||||
std::cout << " " << *it;
|
||||
}
|
||||
}
|
||||
std::cout << std::endl;
|
||||
|
@ -330,7 +330,7 @@ int cmDependsJavaParserHelper::ParseString(const char* str, int verb)
|
|||
it != this->ClassesFound.end();
|
||||
++ it )
|
||||
{
|
||||
std::cout << " " << it->c_str();
|
||||
std::cout << " " << *it;
|
||||
}
|
||||
}
|
||||
std::cout << std::endl;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
@ -693,7 +693,7 @@ bool cmDocumentation::PrintHelpOneManual(std::ostream& os)
|
|||
return true;
|
||||
}
|
||||
// Argument was not a manual. Complain.
|
||||
os << "Argument \"" << this->CurrentArgument.c_str()
|
||||
os << "Argument \"" << this->CurrentArgument
|
||||
<< "\" to --help-manual is not an available manual. "
|
||||
<< "Use --help-manual-list to see all available manuals.\n";
|
||||
return false;
|
||||
|
@ -715,7 +715,7 @@ bool cmDocumentation::PrintHelpOneCommand(std::ostream& os)
|
|||
return true;
|
||||
}
|
||||
// Argument was not a command. Complain.
|
||||
os << "Argument \"" << this->CurrentArgument.c_str()
|
||||
os << "Argument \"" << this->CurrentArgument
|
||||
<< "\" to --help-command is not a CMake command. "
|
||||
<< "Use --help-command-list to see all commands.\n";
|
||||
return false;
|
||||
|
@ -737,7 +737,7 @@ bool cmDocumentation::PrintHelpOneModule(std::ostream& os)
|
|||
return true;
|
||||
}
|
||||
// Argument was not a module. Complain.
|
||||
os << "Argument \"" << this->CurrentArgument.c_str()
|
||||
os << "Argument \"" << this->CurrentArgument
|
||||
<< "\" to --help-module is not a CMake module.\n";
|
||||
return false;
|
||||
}
|
||||
|
@ -772,7 +772,7 @@ bool cmDocumentation::PrintHelpOneProperty(std::ostream& os)
|
|||
return true;
|
||||
}
|
||||
// Argument was not a property. Complain.
|
||||
os << "Argument \"" << this->CurrentArgument.c_str()
|
||||
os << "Argument \"" << this->CurrentArgument
|
||||
<< "\" to --help-property is not a CMake property. "
|
||||
<< "Use --help-property-list to see all properties.\n";
|
||||
return false;
|
||||
|
@ -796,7 +796,7 @@ bool cmDocumentation::PrintHelpOnePolicy(std::ostream& os)
|
|||
}
|
||||
|
||||
// Argument was not a policy. Complain.
|
||||
os << "Argument \"" << this->CurrentArgument.c_str()
|
||||
os << "Argument \"" << this->CurrentArgument
|
||||
<< "\" to --help-policy is not a CMake policy.\n";
|
||||
return false;
|
||||
}
|
||||
|
@ -817,7 +817,7 @@ bool cmDocumentation::PrintHelpOneVariable(std::ostream& os)
|
|||
return true;
|
||||
}
|
||||
// Argument was not a variable. Complain.
|
||||
os << "Argument \"" << this->CurrentArgument.c_str()
|
||||
os << "Argument \"" << this->CurrentArgument
|
||||
<< "\" to --help-variable is not a defined variable. "
|
||||
<< "Use --help-variable-list to see all defined variables.\n";
|
||||
return false;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ cmExportInstallFileGenerator::GenerateImportFileConfig(
|
|||
{
|
||||
std::string se = cmSystemTools::GetLastSystemError();
|
||||
cmOStringStream e;
|
||||
e << "cannot write to file \"" << fileName.c_str()
|
||||
e << "cannot write to file \"" << fileName
|
||||
<< "\": " << se;
|
||||
cmSystemTools::Error(e.str().c_str());
|
||||
return 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;
|
||||
|
@ -499,7 +499,7 @@ void cmExtraCodeBlocksGenerator
|
|||
sit!=otherFiles.end();
|
||||
++sit)
|
||||
{
|
||||
fout<<" <Unit filename=\""<< sit->c_str() <<"\">\n"
|
||||
fout<<" <Unit filename=\""<< *sit <<"\">\n"
|
||||
" </Unit>\n";
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -653,7 +653,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
|
|||
dirIt != uniqIncludeDirs.end();
|
||||
++dirIt)
|
||||
{
|
||||
fout <<" <Add directory=\"" << dirIt->c_str() << "\" />\n";
|
||||
fout <<" <Add directory=\"" << *dirIt << "\" />\n";
|
||||
}
|
||||
|
||||
fout<<" </Compiler>\n";
|
||||
|
@ -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")
|
||||
{
|
||||
|
|
|
@ -311,7 +311,7 @@ void cmExtraCodeLiteGenerator
|
|||
{
|
||||
std::string relativePath =
|
||||
cmSystemTools::RelativePath(projectPath.c_str(), sit->first.c_str());
|
||||
fout<< " <File Name=\"" << relativePath.c_str() << "\"/>\n";
|
||||
fout<< " <File Name=\"" << relativePath << "\"/>\n";
|
||||
}
|
||||
fout<< " </VirtualDirectory>\n";
|
||||
fout<< " <VirtualDirectory Name=\"include\">\n";
|
||||
|
@ -322,7 +322,7 @@ void cmExtraCodeLiteGenerator
|
|||
{
|
||||
std::string relativePath =
|
||||
cmSystemTools::RelativePath(projectPath.c_str(), sit->c_str());
|
||||
fout << " <File Name=\"" << relativePath.c_str() << "\"/>\n";
|
||||
fout << " <File Name=\"" << relativePath << "\"/>\n";
|
||||
}
|
||||
fout << " </VirtualDirectory>\n";
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -1292,7 +1292,7 @@ void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout,
|
|||
std::string pathXml = cmExtraEclipseCDT4Generator::EscapeForXML(path);
|
||||
fout <<
|
||||
"<target name=\"" << prefix << targetXml << "\""
|
||||
" path=\"" << pathXml.c_str() << "\""
|
||||
" path=\"" << pathXml << "\""
|
||||
" targetID=\"org.eclipse.cdt.make.MakeTargetBuilder\">\n"
|
||||
"<buildCommand>"
|
||||
<< cmExtraEclipseCDT4Generator::GetEclipsePath(make)
|
||||
|
|
|
@ -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]);
|
||||
|
@ -268,8 +268,8 @@ bool cmFindPackageCommand
|
|||
else
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "called with invalid argument \"" << args[i].c_str() << "\"";
|
||||
this->SetError(e.str().c_str());
|
||||
e << "called with invalid argument \"" << args[i] << "\"";
|
||||
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())
|
||||
{
|
||||
|
@ -2318,14 +2318,14 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
|
|||
it != componentsSet->end();
|
||||
++ it )
|
||||
{
|
||||
ostr << " \"" << it->c_str() << "\"";
|
||||
ostr << " \"" << *it << "\"";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -360,7 +360,7 @@ void cmGlobalKdevelopGenerator
|
|||
if (strstr(line, "<general>"))
|
||||
{
|
||||
fout<< " <projectmanagement>KDevCustomProject</projectmanagement>\n";
|
||||
fout<< " <projectdirectory>" <<projectDir.c_str()
|
||||
fout<< " <projectdirectory>" <<projectDir
|
||||
<< "</projectdirectory>\n"; //this one is important
|
||||
fout<<" <absoluteprojectpath>true</absoluteprojectpath>\n";
|
||||
//and this one
|
||||
|
@ -368,14 +368,14 @@ void cmGlobalKdevelopGenerator
|
|||
// inside kdevcustomproject the <filelistdirectory> must be put
|
||||
if (strstr(line, "<kdevcustomproject>"))
|
||||
{
|
||||
fout<<" <filelistdirectory>"<<outputDir.c_str()
|
||||
fout<<" <filelistdirectory>"<<outputDir
|
||||
<<"</filelistdirectory>\n";
|
||||
}
|
||||
// buildtool and builddir go inside <build>
|
||||
if (strstr(line, "<build>"))
|
||||
{
|
||||
fout<<" <buildtool>make</buildtool>\n";
|
||||
fout<<" <builddir>"<<outputDir.c_str()<<"</builddir>\n";
|
||||
fout<<" <builddir>"<<outputDir<<"</builddir>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -417,7 +417,7 @@ void cmGlobalKdevelopGenerator
|
|||
" <projectmanagement>KDevCustomProject</projectmanagement>\n"
|
||||
" <primarylanguage>" << primaryLanguage << "</primarylanguage>\n"
|
||||
" <ignoreparts/>\n"
|
||||
" <projectdirectory>" << projectDir.c_str() <<
|
||||
" <projectdirectory>" << projectDir <<
|
||||
"</projectdirectory>\n"; //this one is important
|
||||
fout<<" <absoluteprojectpath>true</absoluteprojectpath>\n"; //and this one
|
||||
|
||||
|
@ -444,12 +444,12 @@ void cmGlobalKdevelopGenerator
|
|||
|
||||
fout<<" </general>\n"
|
||||
" <kdevcustomproject>\n"
|
||||
" <filelistdirectory>" << outputDir.c_str() <<
|
||||
" <filelistdirectory>" << outputDir <<
|
||||
"</filelistdirectory>\n"
|
||||
" <run>\n"
|
||||
" <mainprogram>" << executable.c_str() << "</mainprogram>\n"
|
||||
" <mainprogram>" << executable << "</mainprogram>\n"
|
||||
" <directoryradio>custom</directoryradio>\n"
|
||||
" <customdirectory>"<<outputDir.c_str()<<"</customdirectory>\n"
|
||||
" <customdirectory>"<<outputDir<<"</customdirectory>\n"
|
||||
" <programargs></programargs>\n"
|
||||
" <terminal>false</terminal>\n"
|
||||
" <autocompile>true</autocompile>\n"
|
||||
|
@ -457,7 +457,7 @@ void cmGlobalKdevelopGenerator
|
|||
" </run>\n"
|
||||
" <build>\n"
|
||||
" <buildtool>make</buildtool>\n"; //this one is important
|
||||
fout<<" <builddir>"<<outputDir.c_str()<<"</builddir>\n"; //and this one
|
||||
fout<<" <builddir>"<<outputDir<<"</builddir>\n"; //and this one
|
||||
fout<<" </build>\n"
|
||||
" <make>\n"
|
||||
" <abortonerror>false</abortonerror>\n"
|
||||
|
@ -480,7 +480,7 @@ void cmGlobalKdevelopGenerator
|
|||
dirIt != this->Blacklist.end();
|
||||
++dirIt)
|
||||
{
|
||||
fout<<" <path>" << dirIt->c_str() << "</path>\n";
|
||||
fout<<" <path>" << *dirIt << "</path>\n";
|
||||
}
|
||||
fout<<" </blacklist>\n";
|
||||
|
||||
|
@ -558,7 +558,7 @@ void cmGlobalKdevelopGenerator
|
|||
// command
|
||||
fout<<" <kdevfileview>\n"
|
||||
" <groups>\n"
|
||||
" <group pattern=\"" << cmakeFilePattern.c_str() <<
|
||||
" <group pattern=\"" << cmakeFilePattern <<
|
||||
"\" name=\"CMake\" />\n";
|
||||
|
||||
if (enableCxx)
|
||||
|
@ -601,7 +601,7 @@ void cmGlobalKdevelopGenerator
|
|||
"<!DOCTYPE KDevPrjSession>\n"
|
||||
"<KDevPrjSession>\n"
|
||||
" <DocsAndViews NumberOfDocuments=\"1\" >\n"
|
||||
" <Doc0 NumberOfViews=\"1\" URL=\"file://" << fileToOpen.c_str() <<
|
||||
" <Doc0 NumberOfViews=\"1\" URL=\"file://" << fileToOpen <<
|
||||
"\" >\n"
|
||||
" <View0 line=\"0\" Type=\"Source\" />\n"
|
||||
" </Doc0>\n"
|
||||
|
|
|
@ -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=*/ "",
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue