Merge topic 'remove-c_str-calls'
3be265b3 Workaround Sun C++ 5.9 compiler crash af8a1643 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");
|
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
||||||
tmpFile += "/Deb.log";
|
tmpFile += "/Deb.log";
|
||||||
cmGeneratedFileStream ofs(tmpFile.c_str());
|
cmGeneratedFileStream ofs(tmpFile.c_str());
|
||||||
ofs << "# Run command: " << cmd.c_str() << std::endl
|
ofs << "# Run command: " << cmd << std::endl
|
||||||
<< "# Working directory: " << toplevel << std::endl
|
<< "# Working directory: " << toplevel << std::endl
|
||||||
<< "# Output:" << std::endl
|
<< "# Output:" << std::endl
|
||||||
<< output.c_str() << std::endl;
|
<< output << std::endl;
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running tar command: "
|
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running tar command: "
|
||||||
<< cmd.c_str() << std::endl
|
<< cmd << std::endl
|
||||||
<< "Please check " << tmpFile.c_str() << " for errors" << std::endl);
|
<< "Please check " << tmpFile << " for errors" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -506,7 +506,7 @@ int cmCPackDebGenerator::createDeb()
|
|||||||
controlExtraList.begin(); i != controlExtraList.end(); ++i)
|
controlExtraList.begin(); i != controlExtraList.end(); ++i)
|
||||||
{
|
{
|
||||||
std::string filenamename =
|
std::string filenamename =
|
||||||
cmsys::SystemTools::GetFilenameName(i->c_str());
|
cmsys::SystemTools::GetFilenameName(*i);
|
||||||
std::string localcopy = this->GetOption("WDIR");
|
std::string localcopy = this->GetOption("WDIR");
|
||||||
localcopy += "/";
|
localcopy += "/";
|
||||||
localcopy += filenamename;
|
localcopy += filenamename;
|
||||||
@ -528,13 +528,13 @@ int cmCPackDebGenerator::createDeb()
|
|||||||
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
||||||
tmpFile += "/Deb.log";
|
tmpFile += "/Deb.log";
|
||||||
cmGeneratedFileStream ofs(tmpFile.c_str());
|
cmGeneratedFileStream ofs(tmpFile.c_str());
|
||||||
ofs << "# Run command: " << cmd.c_str() << std::endl
|
ofs << "# Run command: " << cmd << std::endl
|
||||||
<< "# Working directory: " << toplevel << std::endl
|
<< "# Working directory: " << toplevel << std::endl
|
||||||
<< "# Output:" << std::endl
|
<< "# Output:" << std::endl
|
||||||
<< output.c_str() << std::endl;
|
<< output << std::endl;
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running tar command: "
|
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running tar command: "
|
||||||
<< cmd.c_str() << std::endl
|
<< cmd << std::endl
|
||||||
<< "Please check " << tmpFile.c_str() << " for errors" << std::endl);
|
<< "Please check " << tmpFile << " for errors" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -588,9 +588,9 @@ std::string cmCPackDebGenerator::GetComponentInstallDirNameSuffix(
|
|||||||
// the current COMPONENT belongs to.
|
// the current COMPONENT belongs to.
|
||||||
std::string groupVar = "CPACK_COMPONENT_" +
|
std::string groupVar = "CPACK_COMPONENT_" +
|
||||||
cmSystemTools::UpperCase(componentName) + "_GROUP";
|
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
|
else
|
||||||
{
|
{
|
||||||
|
@ -285,7 +285,7 @@ int cmCPackGenerator::InstallProjectViaInstallCommands(
|
|||||||
it != installCommandsVector.end();
|
it != installCommandsVector.end();
|
||||||
++it )
|
++it )
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << it->c_str()
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << *it
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
std::string output;
|
std::string output;
|
||||||
int retVal = 1;
|
int retVal = 1;
|
||||||
@ -296,12 +296,12 @@ int cmCPackGenerator::InstallProjectViaInstallCommands(
|
|||||||
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
||||||
tmpFile += "/InstallOutput.log";
|
tmpFile += "/InstallOutput.log";
|
||||||
cmGeneratedFileStream ofs(tmpFile.c_str());
|
cmGeneratedFileStream ofs(tmpFile.c_str());
|
||||||
ofs << "# Run command: " << it->c_str() << std::endl
|
ofs << "# Run command: " << *it << std::endl
|
||||||
<< "# Output:" << std::endl
|
<< "# Output:" << std::endl
|
||||||
<< output.c_str() << std::endl;
|
<< output << std::endl;
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
"Problem running install command: " << it->c_str() << std::endl
|
"Problem running install command: " << *it << std::endl
|
||||||
<< "Please check " << tmpFile.c_str() << " for errors"
|
<< "Please check " << tmpFile << " for errors"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -329,7 +329,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
|||||||
++it )
|
++it )
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
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());
|
ignoreFilesRegex.push_back(it->c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -357,9 +357,9 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
|||||||
std::list<std::pair<std::string,std::string> > symlinkedFiles;
|
std::list<std::pair<std::string,std::string> > symlinkedFiles;
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Find files" << std::endl);
|
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Find files" << std::endl);
|
||||||
cmsys::Glob gl;
|
cmsys::Glob gl;
|
||||||
std::string top = it->c_str();
|
std::string top = *it;
|
||||||
it ++;
|
it ++;
|
||||||
std::string subdir = it->c_str();
|
std::string subdir = *it;
|
||||||
std::string findExpr = top;
|
std::string findExpr = top;
|
||||||
findExpr += "/*";
|
findExpr += "/*";
|
||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||||
@ -385,7 +385,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
|||||||
if ( regIt->find(inFile.c_str()) )
|
if ( regIt->find(inFile.c_str()) )
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Ignore file: "
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Ignore file: "
|
||||||
<< inFile.c_str() << std::endl);
|
<< inFile << std::endl);
|
||||||
skip = true;
|
skip = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -397,7 +397,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
|||||||
filePath += "/" + subdir + "/"
|
filePath += "/" + subdir + "/"
|
||||||
+ cmSystemTools::RelativePath(top.c_str(), gfit->c_str());
|
+ cmSystemTools::RelativePath(top.c_str(), gfit->c_str());
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Copy file: "
|
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 the file is a symlink we will have to re-create it */
|
||||||
if ( cmSystemTools::FileIsSymlink(inFile.c_str()))
|
if ( cmSystemTools::FileIsSymlink(inFile.c_str()))
|
||||||
{
|
{
|
||||||
@ -416,7 +416,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
|||||||
) )
|
) )
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying file: "
|
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying file: "
|
||||||
<< inFile.c_str() << " -> " << filePath.c_str() << std::endl);
|
<< inFile << " -> " << filePath << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -473,7 +473,7 @@ int cmCPackGenerator::InstallProjectViaInstallScript(
|
|||||||
it != cmakeScriptsVector.end();
|
it != cmakeScriptsVector.end();
|
||||||
++it )
|
++it )
|
||||||
{
|
{
|
||||||
std::string installScript = it->c_str();
|
std::string installScript = *it;
|
||||||
|
|
||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||||
"- Install script: " << installScript << std::endl);
|
"- Install script: " << installScript << std::endl);
|
||||||
@ -562,13 +562,13 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
|||||||
<< std::endl);
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
std::string installDirectory = it->c_str();
|
std::string installDirectory = *it;
|
||||||
++it;
|
++it;
|
||||||
std::string installProjectName = it->c_str();
|
std::string installProjectName = *it;
|
||||||
++it;
|
++it;
|
||||||
std::string installComponent = it->c_str();
|
std::string installComponent = *it;
|
||||||
++it;
|
++it;
|
||||||
std::string installSubDirectory = it->c_str();
|
std::string installSubDirectory = *it;
|
||||||
std::string installFile = installDirectory + "/cmake_install.cmake";
|
std::string installFile = installDirectory + "/cmake_install.cmake";
|
||||||
|
|
||||||
std::vector<std::string> componentsVector;
|
std::vector<std::string> componentsVector;
|
||||||
@ -586,7 +586,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
|||||||
// Determine the installation types for this project (if provided).
|
// Determine the installation types for this project (if provided).
|
||||||
std::string installTypesVar = "CPACK_"
|
std::string installTypesVar = "CPACK_"
|
||||||
+ cmSystemTools::UpperCase(installComponent) + "_INSTALL_TYPES";
|
+ cmSystemTools::UpperCase(installComponent) + "_INSTALL_TYPES";
|
||||||
const char *installTypes = this->GetOption(installTypesVar.c_str());
|
const char *installTypes = this->GetOption(installTypesVar);
|
||||||
if (installTypes && *installTypes)
|
if (installTypes && *installTypes)
|
||||||
{
|
{
|
||||||
std::vector<std::string> installTypesVector;
|
std::vector<std::string> installTypesVector;
|
||||||
@ -596,15 +596,15 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
|||||||
installTypeIt != installTypesVector.end();
|
installTypeIt != installTypesVector.end();
|
||||||
++installTypeIt)
|
++installTypeIt)
|
||||||
{
|
{
|
||||||
this->GetInstallationType(installProjectName.c_str(),
|
this->GetInstallationType(installProjectName,
|
||||||
installTypeIt->c_str());
|
*installTypeIt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine the set of components that will be used in this project
|
// Determine the set of components that will be used in this project
|
||||||
std::string componentsVar
|
std::string componentsVar
|
||||||
= "CPACK_COMPONENTS_" + cmSystemTools::UpperCase(installComponent);
|
= "CPACK_COMPONENTS_" + cmSystemTools::UpperCase(installComponent);
|
||||||
const char *components = this->GetOption(componentsVar.c_str());
|
const char *components = this->GetOption(componentsVar);
|
||||||
if (components && *components)
|
if (components && *components)
|
||||||
{
|
{
|
||||||
cmSystemTools::ExpandListArgument(components, componentsVector);
|
cmSystemTools::ExpandListArgument(components, componentsVector);
|
||||||
@ -613,7 +613,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
|||||||
compIt != componentsVector.end();
|
compIt != componentsVector.end();
|
||||||
++compIt)
|
++compIt)
|
||||||
{
|
{
|
||||||
GetComponent(installProjectName.c_str(), compIt->c_str());
|
GetComponent(installProjectName, *compIt);
|
||||||
}
|
}
|
||||||
componentInstall = true;
|
componentInstall = true;
|
||||||
}
|
}
|
||||||
@ -641,7 +641,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
|||||||
= this->MakefileMap->GetDefinition("CMAKE_MAKE_PROGRAM");
|
= this->MakefileMap->GetDefinition("CMAKE_MAKE_PROGRAM");
|
||||||
std::vector<std::string> buildCommand;
|
std::vector<std::string> buildCommand;
|
||||||
globalGenerator->GenerateBuildCommand(buildCommand, cmakeMakeProgram,
|
globalGenerator->GenerateBuildCommand(buildCommand, cmakeMakeProgram,
|
||||||
installProjectName.c_str(), installDirectory.c_str(),
|
installProjectName, installDirectory,
|
||||||
globalGenerator->GetPreinstallTargetName(),
|
globalGenerator->GetPreinstallTargetName(),
|
||||||
buildConfig, false);
|
buildConfig, false);
|
||||||
std::string buildCommandStr =
|
std::string buildCommandStr =
|
||||||
@ -663,14 +663,14 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
|||||||
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
||||||
tmpFile += "/PreinstallOutput.log";
|
tmpFile += "/PreinstallOutput.log";
|
||||||
cmGeneratedFileStream ofs(tmpFile.c_str());
|
cmGeneratedFileStream ofs(tmpFile.c_str());
|
||||||
ofs << "# Run command: " << buildCommandStr.c_str() << std::endl
|
ofs << "# Run command: " << buildCommandStr << std::endl
|
||||||
<< "# Directory: " << installDirectory.c_str() << std::endl
|
<< "# Directory: " << installDirectory << std::endl
|
||||||
<< "# Output:" << std::endl
|
<< "# Output:" << std::endl
|
||||||
<< output.c_str() << std::endl;
|
<< output << std::endl;
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
"Problem running install command: " << buildCommandStr.c_str()
|
"Problem running install command: " << buildCommandStr
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< "Please check " << tmpFile.c_str() << " for errors"
|
<< "Please check " << tmpFile << " for errors"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -932,19 +932,19 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
|||||||
std::string absoluteDestFileComponent =
|
std::string absoluteDestFileComponent =
|
||||||
std::string("CPACK_ABSOLUTE_DESTINATION_FILES")
|
std::string("CPACK_ABSOLUTE_DESTINATION_FILES")
|
||||||
+ "_" + GetComponentInstallDirNameSuffix(installComponent);
|
+ "_" + GetComponentInstallDirNameSuffix(installComponent);
|
||||||
if (NULL != this->GetOption(absoluteDestFileComponent.c_str()))
|
if (NULL != this->GetOption(absoluteDestFileComponent))
|
||||||
{
|
{
|
||||||
std::string absoluteDestFilesListComponent =
|
std::string absoluteDestFilesListComponent =
|
||||||
this->GetOption(absoluteDestFileComponent.c_str());
|
this->GetOption(absoluteDestFileComponent);
|
||||||
absoluteDestFilesListComponent +=";";
|
absoluteDestFilesListComponent +=";";
|
||||||
absoluteDestFilesListComponent +=
|
absoluteDestFilesListComponent +=
|
||||||
mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES");
|
mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES");
|
||||||
this->SetOption(absoluteDestFileComponent.c_str(),
|
this->SetOption(absoluteDestFileComponent,
|
||||||
absoluteDestFilesListComponent.c_str());
|
absoluteDestFilesListComponent.c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->SetOption(absoluteDestFileComponent.c_str(),
|
this->SetOption(absoluteDestFileComponent,
|
||||||
mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES"));
|
mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1001,7 +1001,7 @@ void cmCPackGenerator::SetOption(const std::string& op, const char* value)
|
|||||||
int cmCPackGenerator::DoPackage()
|
int cmCPackGenerator::DoPackage()
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
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
|
// Prepare CPack internal name and check
|
||||||
// values for many CPACK_xxx vars
|
// values for many CPACK_xxx vars
|
||||||
@ -1269,7 +1269,7 @@ std::string cmCPackGenerator::FindTemplate(const char* name)
|
|||||||
<< (name ? name : "(NULL)") << std::endl);
|
<< (name ? name : "(NULL)") << std::endl);
|
||||||
std::string ffile = this->MakefileMap->GetModulesFile(name);
|
std::string ffile = this->MakefileMap->GetModulesFile(name);
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Found template: "
|
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Found template: "
|
||||||
<< ffile.c_str() << std::endl);
|
<< ffile << std::endl);
|
||||||
return ffile;
|
return ffile;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1428,14 +1428,14 @@ std::string cmCPackGenerator::GetComponentPackageFileName(
|
|||||||
std::string suffix="-"+groupOrComponentName;
|
std::string suffix="-"+groupOrComponentName;
|
||||||
/* check if we should use DISPLAY name */
|
/* check if we should use DISPLAY name */
|
||||||
std::string dispNameVar = "CPACK_"+Name+"_USE_DISPLAY_NAME_IN_FILENAME";
|
std::string dispNameVar = "CPACK_"+Name+"_USE_DISPLAY_NAME_IN_FILENAME";
|
||||||
if (IsOn(dispNameVar.c_str()))
|
if (IsOn(dispNameVar))
|
||||||
{
|
{
|
||||||
/* the component Group case */
|
/* the component Group case */
|
||||||
if (isGroupName)
|
if (isGroupName)
|
||||||
{
|
{
|
||||||
std::string groupDispVar = "CPACK_COMPONENT_GROUP_"
|
std::string groupDispVar = "CPACK_COMPONENT_GROUP_"
|
||||||
+ cmSystemTools::UpperCase(groupOrComponentName) + "_DISPLAY_NAME";
|
+ cmSystemTools::UpperCase(groupOrComponentName) + "_DISPLAY_NAME";
|
||||||
const char* groupDispName = GetOption(groupDispVar.c_str());
|
const char* groupDispName = GetOption(groupDispVar);
|
||||||
if (groupDispName)
|
if (groupDispName)
|
||||||
{
|
{
|
||||||
suffix = "-"+std::string(groupDispName);
|
suffix = "-"+std::string(groupDispName);
|
||||||
@ -1446,7 +1446,7 @@ std::string cmCPackGenerator::GetComponentPackageFileName(
|
|||||||
{
|
{
|
||||||
std::string dispVar = "CPACK_COMPONENT_"
|
std::string dispVar = "CPACK_COMPONENT_"
|
||||||
+ cmSystemTools::UpperCase(groupOrComponentName) + "_DISPLAY_NAME";
|
+ cmSystemTools::UpperCase(groupOrComponentName) + "_DISPLAY_NAME";
|
||||||
const char* dispName = GetOption(dispVar.c_str());
|
const char* dispName = GetOption(dispVar);
|
||||||
if(dispName)
|
if(dispName)
|
||||||
{
|
{
|
||||||
suffix = "-"+std::string(dispName);
|
suffix = "-"+std::string(dispName);
|
||||||
@ -1497,7 +1497,7 @@ cmCPackGenerator::GetInstallationType(const std::string& projectName,
|
|||||||
installType->Name = name;
|
installType->Name = name;
|
||||||
|
|
||||||
const char* displayName
|
const char* displayName
|
||||||
= this->GetOption((macroPrefix + "_DISPLAY_NAME").c_str());
|
= this->GetOption(macroPrefix + "_DISPLAY_NAME");
|
||||||
if (displayName && *displayName)
|
if (displayName && *displayName)
|
||||||
{
|
{
|
||||||
installType->DisplayName = displayName;
|
installType->DisplayName = displayName;
|
||||||
@ -1527,7 +1527,7 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
|
|||||||
+ cmsys::SystemTools::UpperCase(name);
|
+ cmsys::SystemTools::UpperCase(name);
|
||||||
component->Name = name;
|
component->Name = name;
|
||||||
const char* displayName
|
const char* displayName
|
||||||
= this->GetOption((macroPrefix + "_DISPLAY_NAME").c_str());
|
= this->GetOption(macroPrefix + "_DISPLAY_NAME");
|
||||||
if (displayName && *displayName)
|
if (displayName && *displayName)
|
||||||
{
|
{
|
||||||
component->DisplayName = displayName;
|
component->DisplayName = displayName;
|
||||||
@ -1537,23 +1537,23 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
|
|||||||
component->DisplayName = component->Name;
|
component->DisplayName = component->Name;
|
||||||
}
|
}
|
||||||
component->IsHidden
|
component->IsHidden
|
||||||
= this->IsOn((macroPrefix + "_HIDDEN").c_str());
|
= this->IsOn(macroPrefix + "_HIDDEN");
|
||||||
component->IsRequired
|
component->IsRequired
|
||||||
= this->IsOn((macroPrefix + "_REQUIRED").c_str());
|
= this->IsOn(macroPrefix + "_REQUIRED");
|
||||||
component->IsDisabledByDefault
|
component->IsDisabledByDefault
|
||||||
= this->IsOn((macroPrefix + "_DISABLED").c_str());
|
= this->IsOn(macroPrefix + "_DISABLED");
|
||||||
component->IsDownloaded
|
component->IsDownloaded
|
||||||
= this->IsOn((macroPrefix + "_DOWNLOADED").c_str())
|
= this->IsOn(macroPrefix + "_DOWNLOADED")
|
||||||
|| cmSystemTools::IsOn(this->GetOption("CPACK_DOWNLOAD_ALL"));
|
|| cmSystemTools::IsOn(this->GetOption("CPACK_DOWNLOAD_ALL"));
|
||||||
|
|
||||||
const char* archiveFile = this->GetOption((macroPrefix +
|
const char* archiveFile = this->GetOption(macroPrefix +
|
||||||
"_ARCHIVE_FILE").c_str());
|
"_ARCHIVE_FILE");
|
||||||
if (archiveFile && *archiveFile)
|
if (archiveFile && *archiveFile)
|
||||||
{
|
{
|
||||||
component->ArchiveFile = archiveFile;
|
component->ArchiveFile = archiveFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* groupName = this->GetOption((macroPrefix + "_GROUP").c_str());
|
const char* groupName = this->GetOption(macroPrefix + "_GROUP");
|
||||||
if (groupName && *groupName)
|
if (groupName && *groupName)
|
||||||
{
|
{
|
||||||
component->Group = GetComponentGroup(projectName, groupName);
|
component->Group = GetComponentGroup(projectName, groupName);
|
||||||
@ -1565,7 +1565,7 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char* description
|
const char* description
|
||||||
= this->GetOption((macroPrefix + "_DESCRIPTION").c_str());
|
= this->GetOption(macroPrefix + "_DESCRIPTION");
|
||||||
if (description && *description)
|
if (description && *description)
|
||||||
{
|
{
|
||||||
component->Description = description;
|
component->Description = description;
|
||||||
@ -1573,7 +1573,7 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
|
|||||||
|
|
||||||
// Determine the installation types.
|
// Determine the installation types.
|
||||||
const char *installTypes
|
const char *installTypes
|
||||||
= this->GetOption((macroPrefix + "_INSTALL_TYPES").c_str());
|
= this->GetOption(macroPrefix + "_INSTALL_TYPES");
|
||||||
if (installTypes && *installTypes)
|
if (installTypes && *installTypes)
|
||||||
{
|
{
|
||||||
std::vector<std::string> installTypesVector;
|
std::vector<std::string> installTypesVector;
|
||||||
@ -1589,7 +1589,7 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Determine the component dependencies.
|
// Determine the component dependencies.
|
||||||
const char *depends = this->GetOption((macroPrefix + "_DEPENDS").c_str());
|
const char *depends = this->GetOption(macroPrefix + "_DEPENDS");
|
||||||
if (depends && *depends)
|
if (depends && *depends)
|
||||||
{
|
{
|
||||||
std::vector<std::string> dependsVector;
|
std::vector<std::string> dependsVector;
|
||||||
@ -1600,7 +1600,7 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
|
|||||||
++dependIt)
|
++dependIt)
|
||||||
{
|
{
|
||||||
cmCPackComponent *child = GetComponent(projectName,
|
cmCPackComponent *child = GetComponent(projectName,
|
||||||
dependIt->c_str());
|
*dependIt);
|
||||||
component->Dependencies.push_back(child);
|
component->Dependencies.push_back(child);
|
||||||
child->ReverseDependencies.push_back(component);
|
child->ReverseDependencies.push_back(component);
|
||||||
}
|
}
|
||||||
@ -1624,7 +1624,7 @@ cmCPackGenerator::GetComponentGroup(const std::string& projectName,
|
|||||||
// Define the group
|
// Define the group
|
||||||
group->Name = name;
|
group->Name = name;
|
||||||
const char* displayName
|
const char* displayName
|
||||||
= this->GetOption((macroPrefix + "_DISPLAY_NAME").c_str());
|
= this->GetOption(macroPrefix + "_DISPLAY_NAME");
|
||||||
if (displayName && *displayName)
|
if (displayName && *displayName)
|
||||||
{
|
{
|
||||||
group->DisplayName = displayName;
|
group->DisplayName = displayName;
|
||||||
@ -1635,17 +1635,17 @@ cmCPackGenerator::GetComponentGroup(const std::string& projectName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char* description
|
const char* description
|
||||||
= this->GetOption((macroPrefix + "_DESCRIPTION").c_str());
|
= this->GetOption(macroPrefix + "_DESCRIPTION");
|
||||||
if (description && *description)
|
if (description && *description)
|
||||||
{
|
{
|
||||||
group->Description = description;
|
group->Description = description;
|
||||||
}
|
}
|
||||||
group->IsBold
|
group->IsBold
|
||||||
= this->IsOn((macroPrefix + "_BOLD_TITLE").c_str());
|
= this->IsOn(macroPrefix + "_BOLD_TITLE");
|
||||||
group->IsExpandedByDefault
|
group->IsExpandedByDefault
|
||||||
= this->IsOn((macroPrefix + "_EXPANDED").c_str());
|
= this->IsOn(macroPrefix + "_EXPANDED");
|
||||||
const char* parentGroupName
|
const char* parentGroupName
|
||||||
= this->GetOption((macroPrefix + "_PARENT_GROUP").c_str());
|
= this->GetOption(macroPrefix + "_PARENT_GROUP");
|
||||||
if (parentGroupName && *parentGroupName)
|
if (parentGroupName && *parentGroupName)
|
||||||
{
|
{
|
||||||
group->ParentGroup = GetComponentGroup(projectName, 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() )
|
if ( error && !this->ErrorPrefix.empty() )
|
||||||
{
|
{
|
||||||
*this->DefaultError << this->ErrorPrefix.c_str();
|
*this->DefaultError << this->ErrorPrefix;
|
||||||
}
|
}
|
||||||
else if ( warning && !this->WarningPrefix.empty() )
|
else if ( warning && !this->WarningPrefix.empty() )
|
||||||
{
|
{
|
||||||
*this->DefaultError << this->WarningPrefix.c_str();
|
*this->DefaultError << this->WarningPrefix;
|
||||||
}
|
}
|
||||||
else if ( output && !this->OutputPrefix.empty() )
|
else if ( output && !this->OutputPrefix.empty() )
|
||||||
{
|
{
|
||||||
*this->DefaultOutput << this->OutputPrefix.c_str();
|
*this->DefaultOutput << this->OutputPrefix;
|
||||||
}
|
}
|
||||||
else if ( verbose && !this->VerbosePrefix.empty() )
|
else if ( verbose && !this->VerbosePrefix.empty() )
|
||||||
{
|
{
|
||||||
*this->DefaultOutput << this->VerbosePrefix.c_str();
|
*this->DefaultOutput << this->VerbosePrefix;
|
||||||
}
|
}
|
||||||
else if ( debug && !this->DebugPrefix.empty() )
|
else if ( debug && !this->DebugPrefix.empty() )
|
||||||
{
|
{
|
||||||
*this->DefaultOutput << this->DebugPrefix.c_str();
|
*this->DefaultOutput << this->DebugPrefix;
|
||||||
}
|
}
|
||||||
else if ( !this->Prefix.empty() )
|
else if ( !this->Prefix.empty() )
|
||||||
{
|
{
|
||||||
*this->DefaultOutput << this->Prefix.c_str();
|
*this->DefaultOutput << this->Prefix;
|
||||||
}
|
}
|
||||||
if ( useFileAndLine )
|
if ( useFileAndLine )
|
||||||
{
|
{
|
||||||
|
@ -83,10 +83,10 @@ int cmCPackNSISGenerator::PackageFiles()
|
|||||||
fileN = fileN.substr(fileN.find('/')+1, std::string::npos);
|
fileN = fileN.substr(fileN.find('/')+1, std::string::npos);
|
||||||
}
|
}
|
||||||
cmSystemTools::ReplaceString(fileN, "/", "\\");
|
cmSystemTools::ReplaceString(fileN, "/", "\\");
|
||||||
str << " Delete \"$INSTDIR\\" << fileN.c_str() << "\"" << std::endl;
|
str << " Delete \"$INSTDIR\\" << fileN << "\"" << std::endl;
|
||||||
}
|
}
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Files: "
|
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());
|
this->SetOptionIfNotSet("CPACK_NSIS_DELETE_FILES", str.str().c_str());
|
||||||
std::vector<std::string> dirs;
|
std::vector<std::string> dirs;
|
||||||
this->GetListOfSubdirectories(toplevel.c_str(), dirs);
|
this->GetListOfSubdirectories(toplevel.c_str(), dirs);
|
||||||
@ -117,14 +117,14 @@ int cmCPackNSISGenerator::PackageFiles()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmSystemTools::ReplaceString(fileN, "/", "\\");
|
cmSystemTools::ReplaceString(fileN, "/", "\\");
|
||||||
dstr << " RMDir \"$INSTDIR\\" << fileN.c_str() << "\"" << std::endl;
|
dstr << " RMDir \"$INSTDIR\\" << fileN << "\"" << std::endl;
|
||||||
if (!componentName.empty())
|
if (!componentName.empty())
|
||||||
{
|
{
|
||||||
this->Components[componentName].Directories.push_back(fileN);
|
this->Components[componentName].Directories.push_back(fileN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Dirs: "
|
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Dirs: "
|
||||||
<< dstr.str().c_str() << std::endl);
|
<< dstr.str() << std::endl);
|
||||||
this->SetOptionIfNotSet("CPACK_NSIS_DELETE_DIRECTORIES",
|
this->SetOptionIfNotSet("CPACK_NSIS_DELETE_DIRECTORIES",
|
||||||
dstr.str().c_str());
|
dstr.str().c_str());
|
||||||
|
|
||||||
@ -320,7 +320,7 @@ int cmCPackNSISGenerator::PackageFiles()
|
|||||||
std::string nsisCmd = "\"";
|
std::string nsisCmd = "\"";
|
||||||
nsisCmd += this->GetOption("CPACK_INSTALLER_PROGRAM");
|
nsisCmd += this->GetOption("CPACK_INSTALLER_PROGRAM");
|
||||||
nsisCmd += "\" \"" + nsisFileName + "\"";
|
nsisCmd += "\" \"" + nsisFileName + "\"";
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << nsisCmd.c_str()
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << nsisCmd
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
std::string output;
|
std::string output;
|
||||||
int retVal = 1;
|
int retVal = 1;
|
||||||
@ -329,12 +329,12 @@ int cmCPackNSISGenerator::PackageFiles()
|
|||||||
if ( !res || retVal )
|
if ( !res || retVal )
|
||||||
{
|
{
|
||||||
cmGeneratedFileStream ofs(tmpFile.c_str());
|
cmGeneratedFileStream ofs(tmpFile.c_str());
|
||||||
ofs << "# Run command: " << nsisCmd.c_str() << std::endl
|
ofs << "# Run command: " << nsisCmd << std::endl
|
||||||
<< "# Output:" << std::endl
|
<< "# Output:" << std::endl
|
||||||
<< output.c_str() << std::endl;
|
<< output << std::endl;
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running NSIS command: "
|
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running NSIS command: "
|
||||||
<< nsisCmd.c_str() << std::endl
|
<< nsisCmd << std::endl
|
||||||
<< "Please check " << tmpFile.c_str() << " for errors" << std::endl);
|
<< "Please check " << tmpFile << " for errors" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
@ -427,7 +427,7 @@ int cmCPackNSISGenerator::InitializeInternal()
|
|||||||
|
|
||||||
std::string nsisCmd = "\"" + nsisPath + "\" " NSIS_OPT "VERSION";
|
std::string nsisCmd = "\"" + nsisPath + "\" " NSIS_OPT "VERSION";
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Test NSIS version: "
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Test NSIS version: "
|
||||||
<< nsisCmd.c_str() << std::endl);
|
<< nsisCmd << std::endl);
|
||||||
std::string output;
|
std::string output;
|
||||||
int retVal = 1;
|
int retVal = 1;
|
||||||
bool resS = cmSystemTools::RunSingleCommand(nsisCmd.c_str(),
|
bool resS = cmSystemTools::RunSingleCommand(nsisCmd.c_str(),
|
||||||
@ -442,13 +442,13 @@ int cmCPackNSISGenerator::InitializeInternal()
|
|||||||
std::string tmpFile = topDir ? topDir : ".";
|
std::string tmpFile = topDir ? topDir : ".";
|
||||||
tmpFile += "/NSISOutput.log";
|
tmpFile += "/NSISOutput.log";
|
||||||
cmGeneratedFileStream ofs(tmpFile.c_str());
|
cmGeneratedFileStream ofs(tmpFile.c_str());
|
||||||
ofs << "# Run command: " << nsisCmd.c_str() << std::endl
|
ofs << "# Run command: " << nsisCmd << std::endl
|
||||||
<< "# Output:" << std::endl
|
<< "# Output:" << std::endl
|
||||||
<< output.c_str() << std::endl;
|
<< output << std::endl;
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
"Problem checking NSIS version with command: "
|
"Problem checking NSIS version with command: "
|
||||||
<< nsisCmd.c_str() << std::endl
|
<< nsisCmd << std::endl
|
||||||
<< "Please check " << tmpFile.c_str() << " for errors" << std::endl);
|
<< "Please check " << tmpFile << " for errors" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if ( versionRex.find(output))
|
if ( versionRex.find(output))
|
||||||
@ -470,7 +470,7 @@ int cmCPackNSISGenerator::InitializeInternal()
|
|||||||
{
|
{
|
||||||
// No version check for NSIS cvs build
|
// No version check for NSIS cvs build
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: CVS "
|
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_INSTALLER_PROGRAM", nsisPath.c_str());
|
||||||
this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLES_DIRECTORY", "bin");
|
this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLES_DIRECTORY", "bin");
|
||||||
@ -629,7 +629,7 @@ void cmCPackNSISGenerator::CreateMenuLinks( cmOStringStream& str,
|
|||||||
// if so add a desktop link
|
// if so add a desktop link
|
||||||
std::string desktop = "CPACK_CREATE_DESKTOP_LINK_";
|
std::string desktop = "CPACK_CREATE_DESKTOP_LINK_";
|
||||||
desktop += linkName;
|
desktop += linkName;
|
||||||
if(this->IsSet(desktop.c_str()))
|
if(this->IsSet(desktop))
|
||||||
{
|
{
|
||||||
str << " StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n";
|
str << " StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n";
|
||||||
str << " CreateShortCut \"$DESKTOP\\"
|
str << " CreateShortCut \"$DESKTOP\\"
|
||||||
@ -844,12 +844,12 @@ CreateComponentDescription(cmCPackComponent *component,
|
|||||||
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
||||||
tmpFile += "/CompressZip.log";
|
tmpFile += "/CompressZip.log";
|
||||||
cmGeneratedFileStream ofs(tmpFile.c_str());
|
cmGeneratedFileStream ofs(tmpFile.c_str());
|
||||||
ofs << "# Run command: " << cmd.c_str() << std::endl
|
ofs << "# Run command: " << cmd << std::endl
|
||||||
<< "# Output:" << std::endl
|
<< "# Output:" << std::endl
|
||||||
<< output.c_str() << std::endl;
|
<< output << std::endl;
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running zip command: "
|
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running zip command: "
|
||||||
<< cmd.c_str() << std::endl
|
<< cmd << std::endl
|
||||||
<< "Please check " << tmpFile.c_str() << " for errors" << std::endl);
|
<< "Please check " << tmpFile << " for errors" << std::endl);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -891,7 +891,7 @@ CreateComponentDescription(cmCPackComponent *component,
|
|||||||
path = *pathIt;
|
path = *pathIt;
|
||||||
cmSystemTools::ReplaceString(path, "/", "\\");
|
cmSystemTools::ReplaceString(path, "/", "\\");
|
||||||
macrosOut << " Delete \"$INSTDIR\\"
|
macrosOut << " Delete \"$INSTDIR\\"
|
||||||
<< path.c_str()
|
<< path
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
}
|
}
|
||||||
for (pathIt = component->Directories.begin();
|
for (pathIt = component->Directories.begin();
|
||||||
@ -901,7 +901,7 @@ CreateComponentDescription(cmCPackComponent *component,
|
|||||||
path = *pathIt;
|
path = *pathIt;
|
||||||
cmSystemTools::ReplaceString(path, "/", "\\");
|
cmSystemTools::ReplaceString(path, "/", "\\");
|
||||||
macrosOut << " RMDir \"$INSTDIR\\"
|
macrosOut << " RMDir \"$INSTDIR\\"
|
||||||
<< path.c_str()
|
<< path
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
}
|
}
|
||||||
macrosOut << " noremove_" << component->Name << ":\n";
|
macrosOut << " noremove_" << component->Name << ":\n";
|
||||||
|
@ -272,9 +272,9 @@ std::string cmCPackRPMGenerator::GetComponentInstallDirNameSuffix(
|
|||||||
// the current COMPONENT belongs to.
|
// the current COMPONENT belongs to.
|
||||||
std::string groupVar = "CPACK_COMPONENT_" +
|
std::string groupVar = "CPACK_COMPONENT_" +
|
||||||
cmSystemTools::UpperCase(componentName) + "_GROUP";
|
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
|
else
|
||||||
{
|
{
|
||||||
|
@ -43,7 +43,7 @@ int cmCPackSTGZGenerator::InitializeInternal()
|
|||||||
if ( inFile.empty() )
|
if ( inFile.empty() )
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find template file: "
|
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find template file: "
|
||||||
<< inFile.c_str() << std::endl);
|
<< inFile << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
this->SetOptionIfNotSet("CPACK_STGZ_HEADER_FILE", inFile.c_str());
|
this->SetOptionIfNotSet("CPACK_STGZ_HEADER_FILE", inFile.c_str());
|
||||||
@ -134,6 +134,6 @@ int cmCPackSTGZGenerator::GenerateHeader(std::ostream* os)
|
|||||||
cmSystemTools::ReplaceString(res, headerLengthTag, buffer);
|
cmSystemTools::ReplaceString(res, headerLengthTag, buffer);
|
||||||
|
|
||||||
// Write in file
|
// Write in file
|
||||||
*os << res.c_str();
|
*os << res;
|
||||||
return this->Superclass::GenerateHeader(os);
|
return this->Superclass::GenerateHeader(os);
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ int cpackDefinitionArgument(const char* argument, const char* cValue,
|
|||||||
value = value.c_str() + pos + 1;
|
value = value.c_str() + pos + 1;
|
||||||
def->Map[key] = value;
|
def->Map[key] = value;
|
||||||
cmCPack_Log(def->Log, cmCPackLog::LOG_DEBUG, "Set CPack variable: "
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,7 +195,7 @@ int main (int argc, char const* const* argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
|
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
|
||||||
"Read CPack config file: " << cpackConfigFile.c_str() << std::endl);
|
"Read CPack config file: " << cpackConfigFile << std::endl);
|
||||||
|
|
||||||
cmake cminst;
|
cmake cminst;
|
||||||
cminst.RemoveUnscriptableCommands();
|
cminst.RemoveUnscriptableCommands();
|
||||||
@ -262,21 +262,21 @@ int main (int argc, char const* const* argv)
|
|||||||
cpackConfigFile =
|
cpackConfigFile =
|
||||||
cmSystemTools::CollapseFullPath(cpackConfigFile.c_str());
|
cmSystemTools::CollapseFullPath(cpackConfigFile.c_str());
|
||||||
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
|
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
|
||||||
"Read CPack configuration file: " << cpackConfigFile.c_str()
|
"Read CPack configuration file: " << cpackConfigFile
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
if ( !globalMF->ReadListFile(0, cpackConfigFile.c_str()) )
|
if ( !globalMF->ReadListFile(0, cpackConfigFile.c_str()) )
|
||||||
{
|
{
|
||||||
cmCPack_Log(&log, cmCPackLog::LOG_ERROR,
|
cmCPack_Log(&log, cmCPackLog::LOG_ERROR,
|
||||||
"Problem reading CPack config file: \""
|
"Problem reading CPack config file: \""
|
||||||
<< cpackConfigFile.c_str() << "\"" << std::endl);
|
<< cpackConfigFile << "\"" << std::endl);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( cpackConfigFileSpecified )
|
else if ( cpackConfigFileSpecified )
|
||||||
{
|
{
|
||||||
cmCPack_Log(&log, cmCPackLog::LOG_ERROR,
|
cmCPack_Log(&log, cmCPackLog::LOG_ERROR,
|
||||||
"Cannot find CPack config file: \"" << cpackConfigFile.c_str()
|
"Cannot find CPack config file: \"" <<
|
||||||
<< "\"" << std::endl);
|
cpackConfigFile << "\"" << std::endl);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -326,7 +326,7 @@ int main (int argc, char const* const* argv)
|
|||||||
cdit != definitions.Map.end();
|
cdit != definitions.Map.end();
|
||||||
++cdit )
|
++cdit )
|
||||||
{
|
{
|
||||||
globalMF->AddDefinition(cdit->first.c_str(), cdit->second.c_str());
|
globalMF->AddDefinition(cdit->first, cdit->second.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* cpackModulesPath =
|
const char* cpackModulesPath =
|
||||||
|
@ -241,11 +241,11 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
|
|||||||
{
|
{
|
||||||
// Make the generator available for the Build call below.
|
// Make the generator available for the Build call below.
|
||||||
cm.SetGlobalGenerator(cm.CreateGlobalGenerator(
|
cm.SetGlobalGenerator(cm.CreateGlobalGenerator(
|
||||||
this->BuildGenerator.c_str()));
|
this->BuildGenerator));
|
||||||
cm.SetGeneratorToolset(this->BuildGeneratorToolset);
|
cm.SetGeneratorToolset(this->BuildGeneratorToolset);
|
||||||
|
|
||||||
// Load the cache to make CMAKE_MAKE_PROGRAM available.
|
// Load the cache to make CMAKE_MAKE_PROGRAM available.
|
||||||
cm.GetCacheManager()->LoadCache(this->BinaryDir.c_str());
|
cm.GetCacheManager()->LoadCache(this->BinaryDir);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -295,9 +295,9 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
|
|||||||
config = "Debug";
|
config = "Debug";
|
||||||
}
|
}
|
||||||
int retVal = cm.GetGlobalGenerator()->Build(
|
int retVal = cm.GetGlobalGenerator()->Build(
|
||||||
this->SourceDir.c_str(), this->BinaryDir.c_str(),
|
this->SourceDir, this->BinaryDir,
|
||||||
this->BuildProject.c_str(), tarIt->c_str(),
|
this->BuildProject, *tarIt,
|
||||||
&output, this->BuildMakeProgram.c_str(),
|
&output, this->BuildMakeProgram,
|
||||||
config,
|
config,
|
||||||
!this->BuildNoClean,
|
!this->BuildNoClean,
|
||||||
false, remainingTime);
|
false, remainingTime);
|
||||||
|
@ -134,7 +134,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
|
|||||||
cmakeBuildAdditionalFlags ? cmakeBuildAdditionalFlags : "", true);
|
cmakeBuildAdditionalFlags ? cmakeBuildAdditionalFlags : "", true);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"SetMakeCommand:"
|
"SetMakeCommand:"
|
||||||
<< buildCommand.c_str() << "\n");
|
<< buildCommand << "\n");
|
||||||
this->CTest->SetCTestConfiguration("MakeCommand", buildCommand.c_str());
|
this->CTest->SetCTestConfiguration("MakeCommand", buildCommand.c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -151,7 +151,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
|
|||||||
"\n"
|
"\n"
|
||||||
"Alternatively, set CTEST_BUILD_COMMAND to build the project "
|
"Alternatively, set CTEST_BUILD_COMMAND to build the project "
|
||||||
"with a custom command line.";
|
"with a custom command line.";
|
||||||
this->SetError(ostr.str().c_str());
|
this->SetError(ostr.str());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -409,7 +409,7 @@ int cmCTestBuildHandler::ProcessHandler()
|
|||||||
for ( it = strings.begin(); it != strings.end(); ++it ) \
|
for ( it = strings.begin(); it != strings.end(); ++it ) \
|
||||||
{ \
|
{ \
|
||||||
cmCTestLog(this->CTest, DEBUG, "Add " #strings ": " \
|
cmCTestLog(this->CTest, DEBUG, "Add " #strings ": " \
|
||||||
<< it->c_str() << std::endl); \
|
<< *it << std::endl); \
|
||||||
regexes.push_back(it->c_str()); \
|
regexes.push_back(it->c_str()); \
|
||||||
}
|
}
|
||||||
cmCTestBuildHandlerPopulateRegexVector(
|
cmCTestBuildHandlerPopulateRegexVector(
|
||||||
|
@ -69,7 +69,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "CMakeLists.txt file does not exist ["
|
e << "CMakeLists.txt file does not exist ["
|
||||||
<< cmakelists_file << "]";
|
<< cmakelists_file << "]";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ int cmCTestConfigureHandler::ProcessHandler()
|
|||||||
cmGeneratedFileStream ofs;
|
cmGeneratedFileStream ofs;
|
||||||
this->StartLogFile("Configure", ofs);
|
this->StartLogFile("Configure", ofs);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Configure with command: "
|
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,
|
res = this->CTest->RunMakeCommand(cCommand.c_str(), &output,
|
||||||
&retVal, buildDirectory.c_str(),
|
&retVal, buildDirectory.c_str(),
|
||||||
0, ofs);
|
0, ofs);
|
||||||
@ -99,7 +99,7 @@ int cmCTestConfigureHandler::ProcessHandler()
|
|||||||
{
|
{
|
||||||
os << retVal;
|
os << retVal;
|
||||||
}
|
}
|
||||||
os << "<ConfigureCommand>" << cCommand.c_str() << "</ConfigureCommand>"
|
os << "<ConfigureCommand>" << cCommand << "</ConfigureCommand>"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
cmCTestLog(this->CTest, DEBUG, "End" << std::endl);
|
cmCTestLog(this->CTest, DEBUG, "End" << std::endl);
|
||||||
os << "<Log>" << cmXMLSafe(output) << "</Log>" << std::endl;
|
os << "<Log>" << cmXMLSafe(output) << "</Log>" << std::endl;
|
||||||
|
@ -157,7 +157,7 @@ void cmCTestCoverageHandler::CleanCoverageLogFiles(std::ostream& log)
|
|||||||
logGlob += this->CTest->GetCurrentTag();
|
logGlob += this->CTest->GetCurrentTag();
|
||||||
logGlob += "/CoverageLog*";
|
logGlob += "/CoverageLog*";
|
||||||
cmsys::Glob gl;
|
cmsys::Glob gl;
|
||||||
gl.FindFiles(logGlob.c_str());
|
gl.FindFiles(logGlob);
|
||||||
std::vector<std::string> const& files = gl.GetFiles();
|
std::vector<std::string> const& files = gl.GetFiles();
|
||||||
for(std::vector<std::string>::const_iterator fi = files.begin();
|
for(std::vector<std::string>::const_iterator fi = files.begin();
|
||||||
fi != files.end(); ++fi)
|
fi != files.end(); ++fi)
|
||||||
@ -241,7 +241,7 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file,
|
|||||||
bool buildSubDir = cmSystemTools::IsSubDirectory(fFile.c_str(),
|
bool buildSubDir = cmSystemTools::IsSubDirectory(fFile.c_str(),
|
||||||
fBinDir.c_str());
|
fBinDir.c_str());
|
||||||
// Always check parent directory of the file.
|
// Always check parent directory of the file.
|
||||||
std::string fileDir = cmSystemTools::GetFilenamePath(fFile.c_str());
|
std::string fileDir = cmSystemTools::GetFilenamePath(fFile);
|
||||||
std::string checkDir;
|
std::string checkDir;
|
||||||
|
|
||||||
// We also need to check the binary/source directory pair.
|
// 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());
|
fFile.c_str(), checkDir.c_str());
|
||||||
if ( ndc.size() )
|
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);
|
<< " so skip coverage of " << file << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -296,7 +296,7 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file,
|
|||||||
checkDir = fSrcDir;
|
checkDir = fSrcDir;
|
||||||
}
|
}
|
||||||
fFile = checkDir + "/" + relPath;
|
fFile = checkDir + "/" + relPath;
|
||||||
fFile = cmSystemTools::GetFilenamePath(fFile.c_str());
|
fFile = cmSystemTools::GetFilenamePath(fFile);
|
||||||
|
|
||||||
if ( fileDir == fFile )
|
if ( fileDir == fFile )
|
||||||
{
|
{
|
||||||
@ -308,7 +308,7 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file,
|
|||||||
fFile.c_str(), checkDir.c_str());
|
fFile.c_str(), checkDir.c_str());
|
||||||
if ( ndc.size() )
|
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);
|
<< " so skip coverage of: " << file << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -477,7 +477,7 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
".NoDartCoverage found, so skip coverage check for: "
|
".NoDartCoverage found, so skip coverage check for: "
|
||||||
<< fullFileName.c_str()
|
<< fullFileName
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -488,7 +488,7 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
if ( !cmSystemTools::FileExists(fullFileName.c_str()) )
|
if ( !cmSystemTools::FileExists(fullFileName.c_str()) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot find file: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot find file: "
|
||||||
<< fullFileName.c_str() << std::endl);
|
<< fullFileName << std::endl);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -503,7 +503,7 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
}
|
}
|
||||||
|
|
||||||
const std::string fileName
|
const std::string fileName
|
||||||
= cmSystemTools::GetFilenameName(fullFileName.c_str());
|
= cmSystemTools::GetFilenameName(fullFileName);
|
||||||
std::string shortFileName =
|
std::string shortFileName =
|
||||||
this->CTest->GetShortPathToFile(fullFileName.c_str());
|
this->CTest->GetShortPathToFile(fullFileName.c_str());
|
||||||
const cmCTestCoverageHandlerContainer::SingleFileCoverageVector& fcov
|
const cmCTestCoverageHandlerContainer::SingleFileCoverageVector& fcov
|
||||||
@ -516,7 +516,7 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
if ( !ifs)
|
if ( !ifs)
|
||||||
{
|
{
|
||||||
cmOStringStream ostr;
|
cmOStringStream ostr;
|
||||||
ostr << "Cannot open source file: " << fullFileName.c_str();
|
ostr << "Cannot open source file: " << fullFileName;
|
||||||
errorsWhileAccumulating.push_back(ostr.str());
|
errorsWhileAccumulating.push_back(ostr.str());
|
||||||
error ++;
|
error ++;
|
||||||
continue;
|
continue;
|
||||||
@ -535,7 +535,7 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
cc != fcov.size() -1 )
|
cc != fcov.size() -1 )
|
||||||
{
|
{
|
||||||
cmOStringStream ostr;
|
cmOStringStream ostr;
|
||||||
ostr << "Problem reading source file: " << fullFileName.c_str()
|
ostr << "Problem reading source file: " << fullFileName
|
||||||
<< " line:" << cc << " out total: " << fcov.size()-1;
|
<< " line:" << cc << " out total: " << fcov.size()-1;
|
||||||
errorsWhileAccumulating.push_back(ostr.str());
|
errorsWhileAccumulating.push_back(ostr.str());
|
||||||
error ++;
|
error ++;
|
||||||
@ -605,7 +605,7 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
if (!ifs)
|
if (!ifs)
|
||||||
{
|
{
|
||||||
cmOStringStream ostr;
|
cmOStringStream ostr;
|
||||||
ostr << "Cannot open source file: " << fullPath.c_str();
|
ostr << "Cannot open source file: " << fullPath;
|
||||||
errorsWhileAccumulating.push_back(ostr.str());
|
errorsWhileAccumulating.push_back(ostr.str());
|
||||||
error ++;
|
error ++;
|
||||||
continue;
|
continue;
|
||||||
@ -613,7 +613,7 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
int untested = 0;
|
int untested = 0;
|
||||||
std::string line;
|
std::string line;
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
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))
|
while (cmSystemTools::GetLineFromStream(ifs, line))
|
||||||
{
|
{
|
||||||
covLogFile << "\t\t<Line Number=\"" << untested << "\" Count=\"0\">"
|
covLogFile << "\t\t<Line Number=\"" << untested << "\" Count=\"0\">"
|
||||||
@ -647,7 +647,7 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
++ erIt )
|
++ erIt )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
" " << erIt->c_str() << std::endl);
|
" " << *erIt << std::endl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -719,13 +719,13 @@ void cmCTestCoverageHandler::PopulateCustomVectors(cmMakefile *mf)
|
|||||||
++ it )
|
++ it )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Add coverage exclude: "
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Add coverage exclude: "
|
||||||
<< it->c_str() << std::endl);
|
<< *it << std::endl);
|
||||||
}
|
}
|
||||||
for ( it = this->ExtraCoverageGlobs.begin();
|
for ( it = this->ExtraCoverageGlobs.begin();
|
||||||
it != this->ExtraCoverageGlobs.end(); ++it)
|
it != this->ExtraCoverageGlobs.end(); ++it)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Add coverage glob: "
|
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:
|
// 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 + "\" " +
|
std::string command = "\"" + gcovCommand + "\" " +
|
||||||
gcovExtraFlags + " " +
|
gcovExtraFlags + " " +
|
||||||
"-o \"" + fileDir + "\" " +
|
"-o \"" + fileDir + "\" " +
|
||||||
@ -959,17 +959,17 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
std::string output = "";
|
std::string output = "";
|
||||||
std::string errors = "";
|
std::string errors = "";
|
||||||
int retVal = 0;
|
int retVal = 0;
|
||||||
*cont->OFS << "* Run coverage for: " << fileDir.c_str() << std::endl;
|
*cont->OFS << "* Run coverage for: " << fileDir << std::endl;
|
||||||
*cont->OFS << " Command: " << command.c_str() << std::endl;
|
*cont->OFS << " Command: " << command << std::endl;
|
||||||
int res = this->CTest->RunCommand(command.c_str(), &output, &errors,
|
int res = this->CTest->RunCommand(command.c_str(), &output, &errors,
|
||||||
&retVal, tempDir.c_str(), 0 /*this->TimeOut*/);
|
&retVal, tempDir.c_str(), 0 /*this->TimeOut*/);
|
||||||
|
|
||||||
*cont->OFS << " Output: " << output.c_str() << std::endl;
|
*cont->OFS << " Output: " << output << std::endl;
|
||||||
*cont->OFS << " Errors: " << errors.c_str() << std::endl;
|
*cont->OFS << " Errors: " << errors << std::endl;
|
||||||
if ( ! res )
|
if ( ! res )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
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,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Command produced error: " << errors << std::endl);
|
"Command produced error: " << errors << std::endl);
|
||||||
cont->Error ++;
|
cont->Error ++;
|
||||||
@ -978,7 +978,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
if ( retVal != 0 )
|
if ( retVal != 0 )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Coverage command returned: "
|
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,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Command produced error: " << cont->Error << std::endl);
|
"Command produced error: " << cont->Error << std::endl);
|
||||||
}
|
}
|
||||||
@ -999,7 +999,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
std::string sourceFile;
|
std::string sourceFile;
|
||||||
std::string gcovFile;
|
std::string gcovFile;
|
||||||
|
|
||||||
cmCTestLog(this->CTest, DEBUG, "Line: [" << line->c_str() << "]"
|
cmCTestLog(this->CTest, DEBUG, "Line: [" << *line << "]"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
|
|
||||||
if ( line->size() == 0 )
|
if ( line->size() == 0 )
|
||||||
@ -1145,7 +1145,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
!cmSystemTools::StringStartsWith(line->c_str(), "Removing "))
|
!cmSystemTools::StringStartsWith(line->c_str(), "Removing "))
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Unknown gcov output line: [" << line->c_str() << "]"
|
"Unknown gcov output line: [" << *line << "]"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
cont->Error ++;
|
cont->Error ++;
|
||||||
//abort();
|
//abort();
|
||||||
@ -1238,8 +1238,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
if ( IsFileInDir(sourceFile, cont->SourceDir) )
|
if ( IsFileInDir(sourceFile, cont->SourceDir) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " produced s: "
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " produced s: "
|
||||||
<< sourceFile.c_str() << std::endl);
|
<< sourceFile << std::endl);
|
||||||
*cont->OFS << " produced in source dir: " << sourceFile.c_str()
|
*cont->OFS << " produced in source dir: " << sourceFile
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
actualSourceFile
|
actualSourceFile
|
||||||
= cmSystemTools::CollapseFullPath(sourceFile.c_str());
|
= cmSystemTools::CollapseFullPath(sourceFile.c_str());
|
||||||
@ -1247,8 +1247,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
else if ( IsFileInDir(sourceFile, cont->BinaryDir) )
|
else if ( IsFileInDir(sourceFile, cont->BinaryDir) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " produced b: "
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " produced b: "
|
||||||
<< sourceFile.c_str() << std::endl);
|
<< sourceFile << std::endl);
|
||||||
*cont->OFS << " produced in binary dir: " << sourceFile.c_str()
|
*cont->OFS << " produced in binary dir: " << sourceFile
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
actualSourceFile
|
actualSourceFile
|
||||||
= cmSystemTools::CollapseFullPath(sourceFile.c_str());
|
= cmSystemTools::CollapseFullPath(sourceFile.c_str());
|
||||||
@ -1262,19 +1262,19 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
"Something went wrong" << std::endl);
|
"Something went wrong" << std::endl);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Cannot find file: ["
|
"Cannot find file: ["
|
||||||
<< sourceFile.c_str() << "]" << std::endl);
|
<< sourceFile << "]" << std::endl);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" in source dir: ["
|
" in source dir: ["
|
||||||
<< cont->SourceDir.c_str() << "]"
|
<< cont->SourceDir << "]"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" or binary dir: ["
|
" or binary dir: ["
|
||||||
<< cont->BinaryDir.size() << "]"
|
<< cont->BinaryDir.size() << "]"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
*cont->OFS << " Something went wrong. Cannot find file: "
|
*cont->OFS << " Something went wrong. Cannot find file: "
|
||||||
<< sourceFile.c_str()
|
<< sourceFile
|
||||||
<< " in source dir: " << cont->SourceDir.c_str()
|
<< " in source dir: " << cont->SourceDir
|
||||||
<< " or binary dir: " << cont->BinaryDir.c_str() << std::endl;
|
<< " or binary dir: " << cont->BinaryDir << std::endl;
|
||||||
|
|
||||||
missingFiles.insert(sourceFile);
|
missingFiles.insert(sourceFile);
|
||||||
}
|
}
|
||||||
@ -1364,24 +1364,24 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
|
|||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Cannot find source Python file corresponding to: "
|
"Cannot find source Python file corresponding to: "
|
||||||
<< fileIt->c_str() << std::endl);
|
<< *fileIt << std::endl);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string actualSourceFile
|
std::string actualSourceFile
|
||||||
= cmSystemTools::CollapseFullPath(fileName.c_str());
|
= cmSystemTools::CollapseFullPath(fileName.c_str());
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" Check coverage for file: " << actualSourceFile.c_str()
|
" Check coverage for file: " << actualSourceFile
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
cmCTestCoverageHandlerContainer::SingleFileCoverageVector* vec
|
cmCTestCoverageHandlerContainer::SingleFileCoverageVector* vec
|
||||||
= &cont->TotalCoverage[actualSourceFile];
|
= &cont->TotalCoverage[actualSourceFile];
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" in file: " << fileIt->c_str() << std::endl);
|
" in file: " << *fileIt << std::endl);
|
||||||
cmsys::ifstream ifile(fileIt->c_str());
|
cmsys::ifstream ifile(fileIt->c_str());
|
||||||
if ( ! ifile )
|
if ( ! ifile )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open file: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open file: "
|
||||||
<< fileIt->c_str() << std::endl);
|
<< *fileIt << std::endl);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1429,7 +1429,7 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
|
|||||||
// So, this will be set to 0.
|
// So, this will be set to 0.
|
||||||
cov = 0;
|
cov = 0;
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, DEBUG, "Prefix: " << prefix.c_str()
|
cmCTestLog(this->CTest, DEBUG, "Prefix: " << prefix
|
||||||
<< " cov: " << cov
|
<< " cov: " << cov
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
// Read the line number starting at the 10th character of the gcov
|
// Read the line number starting at the 10th character of the gcov
|
||||||
@ -1542,7 +1542,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
|
|||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Cannot open coverage file: " <<
|
"Cannot open coverage file: " <<
|
||||||
outputFile.c_str() << std::endl);
|
outputFile << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
std::map<std::string, std::string> fileMap;
|
std::map<std::string, std::string> fileMap;
|
||||||
@ -1602,7 +1602,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
|
|||||||
count++;
|
count++;
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Produce coverage for file: "
|
"Produce coverage for file: "
|
||||||
<< file.c_str() << " " << count
|
<< file << " " << count
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
// start the file output
|
// start the file output
|
||||||
covLogFile << "\t<File Name=\""
|
covLogFile << "\t<File Name=\""
|
||||||
@ -1663,12 +1663,12 @@ int cmCTestCoverageHandler::RunBullseyeCommand(
|
|||||||
if(arg)
|
if(arg)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Run : " << program.c_str() << " " << arg << "\n");
|
"Run : " << program << " " << arg << "\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Run : " << program.c_str() << "\n");
|
"Run : " << program << "\n");
|
||||||
}
|
}
|
||||||
// create a process object and start it
|
// create a process object and start it
|
||||||
cmCTestRunProcess runCoverageSrc;
|
cmCTestRunProcess runCoverageSrc;
|
||||||
@ -1686,7 +1686,7 @@ int cmCTestCoverageHandler::RunBullseyeCommand(
|
|||||||
if(!runCoverageSrc.StartProcess())
|
if(!runCoverageSrc.StartProcess())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Could not run : "
|
cmCTestLog(this->CTest, ERROR_MESSAGE, "Could not run : "
|
||||||
<< program.c_str() << " " << arg << "\n"
|
<< program << " " << arg << "\n"
|
||||||
<< "kwsys process state : "
|
<< "kwsys process state : "
|
||||||
<< runCoverageSrc.GetProcessState());
|
<< runCoverageSrc.GetProcessState());
|
||||||
return 0;
|
return 0;
|
||||||
@ -1755,7 +1755,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
|
|||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Cannot open coverage summary file: " <<
|
"Cannot open coverage summary file: " <<
|
||||||
outputFile.c_str() << std::endl);
|
outputFile << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
std::set<std::string> coveredFileNames;
|
std::set<std::string> coveredFileNames;
|
||||||
@ -1796,14 +1796,14 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
|
|||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
".NoDartCoverage found, so skip coverage check for: "
|
".NoDartCoverage found, so skip coverage check for: "
|
||||||
<< file.c_str()
|
<< file
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Doing coverage for: "
|
"Doing coverage for: "
|
||||||
<< file.c_str()
|
<< file
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
|
|
||||||
coveredFiles.push_back(sourceFile);
|
coveredFiles.push_back(sourceFile);
|
||||||
@ -1814,7 +1814,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
|
|||||||
total_tested += functionsCalled;
|
total_tested += functionsCalled;
|
||||||
total_untested += (totalFunctions - functionsCalled);
|
total_untested += (totalFunctions - functionsCalled);
|
||||||
|
|
||||||
std::string fileName = cmSystemTools::GetFilenameName(file.c_str());
|
std::string fileName = cmSystemTools::GetFilenameName(file);
|
||||||
std::string shortFileName =
|
std::string shortFileName =
|
||||||
this->CTest->GetShortPathToFile(file.c_str());
|
this->CTest->GetShortPathToFile(file.c_str());
|
||||||
|
|
||||||
@ -1830,7 +1830,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
|
|||||||
cmet /= 2.0f;
|
cmet /= 2.0f;
|
||||||
}
|
}
|
||||||
cmet /= 100.0f;
|
cmet /= 100.0f;
|
||||||
tmpLog << stdline.c_str() << "\n";
|
tmpLog << stdline << "\n";
|
||||||
tmpLog << fileName << "\n";
|
tmpLog << fileName << "\n";
|
||||||
tmpLog << "functionsCalled: " << functionsCalled/100 << "\n";
|
tmpLog << "functionsCalled: " << functionsCalled/100 << "\n";
|
||||||
tmpLog << "totalFunctions: " << totalFunctions/100 << "\n";
|
tmpLog << "totalFunctions: " << totalFunctions/100 << "\n";
|
||||||
@ -1957,7 +1957,7 @@ bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine(
|
|||||||
if(pos == inputLine.npos)
|
if(pos == inputLine.npos)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing string : "
|
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing string : "
|
||||||
<< inputLine.c_str() << "\n");
|
<< inputLine << "\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// the source file has "" around it so extract out the file name
|
// the source file has "" around it so extract out the file name
|
||||||
@ -1991,7 +1991,7 @@ bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine(
|
|||||||
if(pos != inputLine.npos)
|
if(pos != inputLine.npos)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing input : "
|
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing input : "
|
||||||
<< inputLine.c_str() << " last pos not npos = " << pos <<
|
<< inputLine << " last pos not npos = " << pos <<
|
||||||
"\n");
|
"\n");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -25,8 +25,8 @@ bool cmCTestEmptyBinaryDirectoryCommand
|
|||||||
if ( !cmCTestScriptHandler::EmptyBinaryDirectory(args[0].c_str()) )
|
if ( !cmCTestScriptHandler::EmptyBinaryDirectory(args[0].c_str()) )
|
||||||
{
|
{
|
||||||
cmOStringStream ostr;
|
cmOStringStream ostr;
|
||||||
ostr << "problem removing the binary directory: " << args[0].c_str();
|
ostr << "problem removing the binary directory: " << args[0];
|
||||||
this->SetError(ostr.str().c_str());
|
this->SetError(ostr.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ void cmCTestGenericHandler::Initialize()
|
|||||||
it != this->PersistentOptions.end();
|
it != this->PersistentOptions.end();
|
||||||
++ it )
|
++ 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;
|
return false;
|
||||||
}
|
}
|
||||||
if( !this->CTest->OpenOutputFile(this->CTest->GetCurrentTag(),
|
if( !this->CTest->OpenOutputFile(this->CTest->GetCurrentTag(),
|
||||||
ostr.str().c_str(), xofs, true) )
|
ostr.str(), xofs, true) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Cannot create resulting XML file: " << ostr.str().c_str()
|
"Cannot create resulting XML file: " << ostr.str()
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -153,10 +153,10 @@ bool cmCTestGenericHandler::StartLogFile(const char* name,
|
|||||||
ostr << "_" << this->CTest->GetCurrentTag();
|
ostr << "_" << this->CTest->GetCurrentTag();
|
||||||
}
|
}
|
||||||
ostr << ".log";
|
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: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create log file: "
|
||||||
<< ostr.str().c_str() << std::endl);
|
<< ostr.str() << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -48,7 +48,7 @@ bool cmCTestHandlerCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "called with unknown argument \"" << args[i] << "\".";
|
e << "called with unknown argument \"" << args[i] << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -680,8 +680,8 @@ bool cmCTestLaunch::ScrapeLog(std::string const& fname)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this->Match(line.c_str(), this->RegexWarning) &&
|
if(this->Match(line, this->RegexWarning) &&
|
||||||
!this->Match(line.c_str(), this->RegexWarningSuppress))
|
!this->Match(line, this->RegexWarningSuppress))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -514,7 +514,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
|
|||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Cannot find memory checker suppression file: "
|
"Cannot find memory checker suppression file: "
|
||||||
<< this->CTest->GetCTestConfiguration(
|
<< this->CTest->GetCTestConfiguration(
|
||||||
"MemoryCheckSuppressionFile").c_str() << std::endl);
|
"MemoryCheckSuppressionFile") << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
std::string suppressions = "--suppressions="
|
std::string suppressions = "--suppressions="
|
||||||
@ -569,7 +569,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
|
|||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Do not understand memory checker: " << this->MemoryTester.c_str()
|
"Do not understand memory checker: " << this->MemoryTester
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -885,7 +885,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput(
|
|||||||
else if(!parser.ParseChunk(theLine.c_str(), theLine.size()))
|
else if(!parser.ParseChunk(theLine.c_str(), theLine.size()))
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Error in ParseChunk: " << theLine.c_str()
|
"Error in ParseChunk: " << theLine
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -916,7 +916,7 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res,
|
|||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"PostProcessBoundsCheckerTest for : "
|
"PostProcessBoundsCheckerTest for : "
|
||||||
<< res.Name.c_str() << std::endl);
|
<< res.Name << std::endl);
|
||||||
std::string ofile = testOutputFileName(test);
|
std::string ofile = testOutputFileName(test);
|
||||||
if ( ofile.empty() )
|
if ( ofile.empty() )
|
||||||
{
|
{
|
||||||
@ -943,10 +943,10 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res,
|
|||||||
cmSystemTools::Delay(1000);
|
cmSystemTools::Delay(1000);
|
||||||
cmSystemTools::RemoveFile(this->BoundsCheckerDPBDFile.c_str());
|
cmSystemTools::RemoveFile(this->BoundsCheckerDPBDFile.c_str());
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "
|
||||||
<< this->BoundsCheckerDPBDFile.c_str() << std::endl);
|
<< this->BoundsCheckerDPBDFile << std::endl);
|
||||||
cmSystemTools::RemoveFile(this->BoundsCheckerXMLFile.c_str());
|
cmSystemTools::RemoveFile(this->BoundsCheckerXMLFile.c_str());
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "
|
||||||
<< this->BoundsCheckerXMLFile.c_str() << std::endl);
|
<< this->BoundsCheckerXMLFile << std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -955,7 +955,7 @@ cmCTestMemCheckHandler::PostProcessPurifyTest(cmCTestTestResult& res,
|
|||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"PostProcessPurifyTest for : "
|
"PostProcessPurifyTest for : "
|
||||||
<< res.Name.c_str() << std::endl);
|
<< res.Name << std::endl);
|
||||||
appendMemTesterOutput(res, test);
|
appendMemTesterOutput(res, test);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -965,7 +965,7 @@ cmCTestMemCheckHandler::PostProcessValgrindTest(cmCTestTestResult& res,
|
|||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"PostProcessValgrindTest for : "
|
"PostProcessValgrindTest for : "
|
||||||
<< res.Name.c_str() << std::endl);
|
<< res.Name << std::endl);
|
||||||
appendMemTesterOutput(res, test);
|
appendMemTesterOutput(res, test);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -672,7 +672,7 @@ void cmCTestMultiProcessHandler::PrintTestList()
|
|||||||
indexStr << " #" << p.Index << ":";
|
indexStr << " #" << p.Index << ":";
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
std::setw(3 + getNumWidth(this->TestHandler->GetMaxIndex()))
|
std::setw(3 + getNumWidth(this->TestHandler->GetMaxIndex()))
|
||||||
<< indexStr.str().c_str());
|
<< indexStr.str());
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
|
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, p.Name.c_str() << std::endl);
|
cmCTestLog(this->CTest, HANDLER_OUTPUT, p.Name.c_str() << std::endl);
|
||||||
//pop working dir
|
//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();
|
for(std::vector<std::string>::const_iterator ai = args.begin();
|
||||||
ai != args.end(); ++ai)
|
ai != args.end(); ++ai)
|
||||||
{
|
{
|
||||||
P4Options.push_back(ai->c_str());
|
P4Options.push_back(*ai);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ bool cmCTestRunScriptCommand
|
|||||||
&ret);
|
&ret);
|
||||||
cmOStringStream str;
|
cmOStringStream str;
|
||||||
str << ret;
|
str << ret;
|
||||||
this->Makefile->AddDefinition(returnVariable.c_str(), str.str().c_str());
|
this->Makefile->AddDefinition(returnVariable, str.str().c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
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 << "Test Failed.\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*this->TestHandler->LogFile << "\"" << this->TestProperties->Name.c_str()
|
*this->TestHandler->LogFile << "\"" << this->TestProperties->Name
|
||||||
<< "\" end time: " << this->CTest->CurrentTime() << std::endl
|
<< "\" end time: " << this->CTest->CurrentTime() << std::endl
|
||||||
<< "\"" << this->TestProperties->Name.c_str() << "\" time elapsed: "
|
<< "\"" << this->TestProperties->Name << "\" time elapsed: "
|
||||||
<< buffer << std::endl
|
<< buffer << std::endl
|
||||||
<< "----------------------------------------------------------"
|
<< "----------------------------------------------------------"
|
||||||
<< std::endl << std::endl;
|
<< std::endl << std::endl;
|
||||||
@ -388,8 +388,8 @@ void cmCTestRunTest::MemCheckPostProcess()
|
|||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index
|
||||||
<< ": process test output now: "
|
<< ": process test output now: "
|
||||||
<< this->TestProperties->Name.c_str() << " "
|
<< this->TestProperties->Name << " "
|
||||||
<< this->TestResult.Name.c_str() << std::endl);
|
<< this->TestResult.Name << std::endl);
|
||||||
cmCTestMemCheckHandler * handler = static_cast<cmCTestMemCheckHandler*>
|
cmCTestMemCheckHandler * handler = static_cast<cmCTestMemCheckHandler*>
|
||||||
(this->TestHandler);
|
(this->TestHandler);
|
||||||
switch ( handler->MemoryTesterStyle )
|
switch ( handler->MemoryTesterStyle )
|
||||||
@ -465,9 +465,9 @@ bool cmCTestRunTest::StartTest(size_t total)
|
|||||||
//Required file was not found
|
//Required file was not found
|
||||||
this->TestProcess = new cmProcess;
|
this->TestProcess = new cmProcess;
|
||||||
*this->TestHandler->LogFile << "Unable to find required file: "
|
*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: "
|
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.Output = "Unable to find required file: " + file;
|
||||||
this->TestResult.FullCommandLine = "";
|
this->TestResult.FullCommandLine = "";
|
||||||
this->TestResult.CompletionStatus = "Not Run";
|
this->TestResult.CompletionStatus = "Not Run";
|
||||||
@ -482,9 +482,9 @@ bool cmCTestRunTest::StartTest(size_t total)
|
|||||||
// that has that information
|
// that has that information
|
||||||
this->TestProcess = new cmProcess;
|
this->TestProcess = new cmProcess;
|
||||||
*this->TestHandler->LogFile << "Unable to find executable: "
|
*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: "
|
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.Output = "Unable to find executable: " + args[1];
|
||||||
this->TestResult.FullCommandLine = "";
|
this->TestResult.FullCommandLine = "";
|
||||||
this->TestResult.CompletionStatus = "Not Run";
|
this->TestResult.CompletionStatus = "Not Run";
|
||||||
@ -711,7 +711,7 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total)
|
|||||||
indexStr << " #" << this->Index << ":";
|
indexStr << " #" << this->Index << ":";
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
std::setw(3 + getNumWidth(this->TestHandler->GetMaxIndex()))
|
std::setw(3 + getNumWidth(this->TestHandler->GetMaxIndex()))
|
||||||
<< indexStr.str().c_str());
|
<< indexStr.str());
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
|
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
|
||||||
const int maxTestNameWidth = this->CTest->GetMaxTestNameWidth();
|
const int maxTestNameWidth = this->CTest->GetMaxTestNameWidth();
|
||||||
std::string outname = this->TestProperties->Name + " ";
|
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->TestProperties->Name << std::endl;
|
||||||
*this->TestHandler->LogFile << this->TestProperties->Index << "/"
|
*this->TestHandler->LogFile << this->TestProperties->Index << "/"
|
||||||
<< this->TestHandler->TotalNumberOfTests
|
<< this->TestHandler->TotalNumberOfTests
|
||||||
<< " Test: " << this->TestProperties->Name.c_str() << std::endl;
|
<< " Test: " << this->TestProperties->Name << std::endl;
|
||||||
*this->TestHandler->LogFile << "Command: \"" << this->ActualCommand << "\"";
|
*this->TestHandler->LogFile << "Command: \"" << this->ActualCommand << "\"";
|
||||||
|
|
||||||
for (std::vector<std::string>::iterator i = this->Arguments.begin();
|
for (std::vector<std::string>::iterator i = this->Arguments.begin();
|
||||||
i != this->Arguments.end(); ++i)
|
i != this->Arguments.end(); ++i)
|
||||||
{
|
{
|
||||||
*this->TestHandler->LogFile
|
*this->TestHandler->LogFile
|
||||||
<< " \"" << i->c_str() << "\"";
|
<< " \"" << *i << "\"";
|
||||||
}
|
}
|
||||||
*this->TestHandler->LogFile << std::endl
|
*this->TestHandler->LogFile << std::endl
|
||||||
<< "Directory: " << this->TestProperties->Directory << 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->StartTime << std::endl;
|
||||||
|
|
||||||
*this->TestHandler->LogFile
|
*this->TestHandler->LogFile
|
||||||
@ -741,9 +741,9 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total)
|
|||||||
<< "----------------------------------------------------------"
|
<< "----------------------------------------------------------"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
*this->TestHandler->LogFile
|
*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, HANDLER_OUTPUT, outname.c_str());
|
||||||
cmCTestLog(this->CTest, DEBUG, "Testing "
|
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.
|
// Set CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR.
|
||||||
// Also, some commands need Makefile->GetCurrentDirectory().
|
// Also, some commands need Makefile->GetCurrentDirectory().
|
||||||
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
||||||
this->Makefile->SetStartDirectory(cwd.c_str());
|
this->Makefile->SetStartDirectory(cwd);
|
||||||
this->Makefile->SetStartOutputDirectory(cwd.c_str());
|
this->Makefile->SetStartOutputDirectory(cwd);
|
||||||
|
|
||||||
// remove all cmake commands which are not scriptable, since they can't be
|
// remove all cmake commands which are not scriptable, since they can't be
|
||||||
// used in ctest scripts
|
// used in ctest scripts
|
||||||
@ -426,7 +426,7 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
|
|||||||
cmSystemTools::GetErrorOccuredFlag())
|
cmSystemTools::GetErrorOccuredFlag())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read:"
|
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read:"
|
||||||
<< systemFile.c_str() << "\n");
|
<< systemFile << "\n");
|
||||||
return 2;
|
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();
|
for (std::map<std::string, std::string>::const_iterator it = defs.begin();
|
||||||
it != defs.end(); ++it)
|
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
|
// finally read in the script
|
||||||
@ -444,7 +444,7 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
|
|||||||
cmSystemTools::GetErrorOccuredFlag())
|
cmSystemTools::GetErrorOccuredFlag())
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read script: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read script: "
|
||||||
<< script.c_str()
|
<< script
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
// Reset the error flag so that it can run more than
|
// Reset the error flag so that it can run more than
|
||||||
// one script with an error when you
|
// one script with an error when you
|
||||||
@ -646,7 +646,7 @@ int cmCTestScriptHandler::RunCurrentScript()
|
|||||||
if (!this->CTestEnv.empty())
|
if (!this->CTestEnv.empty())
|
||||||
{
|
{
|
||||||
std::vector<std::string> envArgs;
|
std::vector<std::string> envArgs;
|
||||||
cmSystemTools::ExpandListArgument(this->CTestEnv.c_str(),envArgs);
|
cmSystemTools::ExpandListArgument(this->CTestEnv,envArgs);
|
||||||
cmSystemTools::AppendEnv(envArgs);
|
cmSystemTools::AppendEnv(envArgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -772,7 +772,7 @@ int cmCTestScriptHandler::PerformExtraUpdates()
|
|||||||
++ it )
|
++ it )
|
||||||
{
|
{
|
||||||
std::vector<std::string> cvsArgs;
|
std::vector<std::string> cvsArgs;
|
||||||
cmSystemTools::ExpandListArgument(it->c_str(),cvsArgs);
|
cmSystemTools::ExpandListArgument(*it,cvsArgs);
|
||||||
if (cvsArgs.size() == 2)
|
if (cvsArgs.size() == 2)
|
||||||
{
|
{
|
||||||
std::string fullCommand = command;
|
std::string fullCommand = command;
|
||||||
@ -781,7 +781,7 @@ int cmCTestScriptHandler::PerformExtraUpdates()
|
|||||||
output = "";
|
output = "";
|
||||||
retVal = 0;
|
retVal = 0;
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run Update: "
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run Update: "
|
||||||
<< fullCommand.c_str() << std::endl);
|
<< fullCommand << std::endl);
|
||||||
res = cmSystemTools::RunSingleCommand(fullCommand.c_str(), &output,
|
res = cmSystemTools::RunSingleCommand(fullCommand.c_str(), &output,
|
||||||
&retVal, cvsArgs[0].c_str(),
|
&retVal, cvsArgs[0].c_str(),
|
||||||
this->HandlerVerbose, 0 /*this->TimeOut*/);
|
this->HandlerVerbose, 0 /*this->TimeOut*/);
|
||||||
@ -902,7 +902,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
|
|||||||
command += "\"";
|
command += "\"";
|
||||||
retVal = 0;
|
retVal = 0;
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run cmake command: "
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run cmake command: "
|
||||||
<< command.c_str() << std::endl);
|
<< command << std::endl);
|
||||||
res = cmSystemTools::RunSingleCommand(command.c_str(), &output,
|
res = cmSystemTools::RunSingleCommand(command.c_str(), &output,
|
||||||
&retVal, this->BinaryDir.c_str(),
|
&retVal, this->BinaryDir.c_str(),
|
||||||
this->HandlerVerbose, 0 /*this->TimeOut*/);
|
this->HandlerVerbose, 0 /*this->TimeOut*/);
|
||||||
@ -916,7 +916,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
"Write CMake output to file: " << cmakeOutputFile.c_str()
|
"Write CMake output to file: " << cmakeOutputFile
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
cmGeneratedFileStream fout(cmakeOutputFile.c_str());
|
cmGeneratedFileStream fout(cmakeOutputFile.c_str());
|
||||||
if ( fout )
|
if ( fout )
|
||||||
@ -927,7 +927,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
|
|||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Cannot open CMake output file: "
|
"Cannot open CMake output file: "
|
||||||
<< cmakeOutputFile.c_str() << " for writing" << std::endl);
|
<< cmakeOutputFile << " for writing" << std::endl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!res || retVal != 0)
|
if (!res || retVal != 0)
|
||||||
@ -948,7 +948,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
|
|||||||
output = "";
|
output = "";
|
||||||
retVal = 0;
|
retVal = 0;
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run ctest command: "
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run ctest command: "
|
||||||
<< command.c_str() << std::endl);
|
<< command << std::endl);
|
||||||
res = cmSystemTools::RunSingleCommand(command.c_str(), &output,
|
res = cmSystemTools::RunSingleCommand(command.c_str(), &output,
|
||||||
&retVal, this->BinaryDir.c_str(), this->HandlerVerbose,
|
&retVal, this->BinaryDir.c_str(), this->HandlerVerbose,
|
||||||
0 /*this->TimeOut*/);
|
0 /*this->TimeOut*/);
|
||||||
@ -962,13 +962,13 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
|
|||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Unable to run cmake:" << std::endl
|
"Unable to run cmake:" << std::endl
|
||||||
<< cmakeFailedOuput.c_str() << std::endl);
|
<< cmakeFailedOuput << std::endl);
|
||||||
return 10;
|
return 10;
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Unable to run ctest:" << std::endl
|
"Unable to run ctest:" << std::endl
|
||||||
<< "command: " << command.c_str() << std::endl
|
<< "command: " << command << std::endl
|
||||||
<< "output: " << output.c_str() << std::endl);
|
<< "output: " << output << std::endl);
|
||||||
if (!res)
|
if (!res)
|
||||||
{
|
{
|
||||||
return 11;
|
return 11;
|
||||||
|
@ -131,7 +131,7 @@ bool cmCTestStartCommand
|
|||||||
<< " " << sourceDir << "\n"
|
<< " " << sourceDir << "\n"
|
||||||
<< "which is not an existing directory. "
|
<< "which is not an existing directory. "
|
||||||
<< "Set CTEST_CHECKOUT_COMMAND to a command line to create it.";
|
<< "Set CTEST_CHECKOUT_COMMAND to a command line to create it.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ bool cmCTestStartCommand::InitialCheckout(
|
|||||||
{
|
{
|
||||||
// Use a generic VC object to run and log the command.
|
// Use a generic VC object to run and log the command.
|
||||||
cmCTestVC vc(this->CTest, ofs);
|
cmCTestVC vc(this->CTest, ofs);
|
||||||
vc.SetSourceDirectory(sourceDir.c_str());
|
vc.SetSourceDirectory(sourceDir);
|
||||||
if(!vc.InitialCheckout(initialCheckoutCommand))
|
if(!vc.InitialCheckout(initialCheckoutCommand))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -229,18 +229,18 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
|
|||||||
if ( ::stat(local_file.c_str(), &st) )
|
if ( ::stat(local_file.c_str(), &st) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot find file: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot find file: "
|
||||||
<< local_file.c_str() << std::endl);
|
<< local_file << std::endl);
|
||||||
::curl_easy_cleanup(curl);
|
::curl_easy_cleanup(curl);
|
||||||
::curl_global_cleanup();
|
::curl_global_cleanup();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ftpfile = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
|
ftpfile = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
|
||||||
*this->LogFile << "\tUpload file: " << local_file.c_str() << " to "
|
*this->LogFile << "\tUpload file: " << local_file << " to "
|
||||||
<< upload_as.c_str() << std::endl;
|
<< upload_as << std::endl;
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: "
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: "
|
||||||
<< local_file.c_str() << " to "
|
<< local_file << " to "
|
||||||
<< upload_as.c_str() << std::endl);
|
<< upload_as << std::endl);
|
||||||
|
|
||||||
::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||||
|
|
||||||
@ -290,11 +290,11 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
|
|||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
" Error when uploading file: "
|
" Error when uploading file: "
|
||||||
<< local_file.c_str() << std::endl);
|
<< local_file << std::endl);
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error message was: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error message was: "
|
||||||
<< error_buffer << std::endl);
|
<< error_buffer << std::endl);
|
||||||
*this->LogFile << " Error when uploading file: "
|
*this->LogFile << " Error when uploading file: "
|
||||||
<< local_file.c_str()
|
<< local_file
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< " Error message was: "
|
<< " Error message was: "
|
||||||
<< error_buffer << std::endl
|
<< error_buffer << std::endl
|
||||||
@ -339,7 +339,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
std::string dropMethod(this->CTest->GetCTestConfiguration("DropMethod"));
|
std::string dropMethod(this->CTest->GetCTestConfiguration("DropMethod"));
|
||||||
std::string curlopt(this->CTest->GetCTestConfiguration("CurlOptions"));
|
std::string curlopt(this->CTest->GetCTestConfiguration("CurlOptions"));
|
||||||
std::vector<std::string> args;
|
std::vector<std::string> args;
|
||||||
cmSystemTools::ExpandListArgument(curlopt.c_str(), args);
|
cmSystemTools::ExpandListArgument(curlopt, args);
|
||||||
bool verifyPeerOff = false;
|
bool verifyPeerOff = false;
|
||||||
bool verifyHostOff = false;
|
bool verifyHostOff = false;
|
||||||
for( std::vector<std::string>::iterator i = args.begin();
|
for( std::vector<std::string>::iterator i = args.begin();
|
||||||
@ -422,8 +422,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
std::string remote_file
|
std::string remote_file
|
||||||
= remoteprefix + cmSystemTools::GetFilenameName(*file);
|
= remoteprefix + cmSystemTools::GetFilenameName(*file);
|
||||||
|
|
||||||
*this->LogFile << "\tUpload file: " << local_file.c_str() << " to "
|
*this->LogFile << "\tUpload file: " << local_file << " to "
|
||||||
<< remote_file.c_str() << std::endl;
|
<< remote_file << std::endl;
|
||||||
|
|
||||||
std::string ofile = "";
|
std::string ofile = "";
|
||||||
for ( kk = 0; kk < remote_file.size(); kk ++ )
|
for ( kk = 0; kk < remote_file.size(); kk ++ )
|
||||||
@ -461,7 +461,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
char md5[33];
|
char md5[33];
|
||||||
cmSystemTools::ComputeFileMD5(local_file.c_str(), md5);
|
cmSystemTools::ComputeFileMD5(local_file, md5);
|
||||||
md5[32] = 0;
|
md5[32] = 0;
|
||||||
upload_as += md5;
|
upload_as += md5;
|
||||||
}
|
}
|
||||||
@ -470,7 +470,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
if ( ::stat(local_file.c_str(), &st) )
|
if ( ::stat(local_file.c_str(), &st) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot find file: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot find file: "
|
||||||
<< local_file.c_str() << std::endl);
|
<< local_file << std::endl);
|
||||||
::curl_easy_cleanup(curl);
|
::curl_easy_cleanup(curl);
|
||||||
::curl_global_cleanup();
|
::curl_global_cleanup();
|
||||||
return false;
|
return false;
|
||||||
@ -478,8 +478,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
|
|
||||||
ftpfile = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
|
ftpfile = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: "
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: "
|
||||||
<< local_file.c_str() << " to "
|
<< local_file << " to "
|
||||||
<< upload_as.c_str() << " Size: " << st.st_size << std::endl);
|
<< upload_as << " Size: " << st.st_size << std::endl);
|
||||||
|
|
||||||
// specify target
|
// specify target
|
||||||
::curl_easy_setopt(curl,CURLOPT_URL, upload_as.c_str());
|
::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,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
" Error when uploading file: "
|
" Error when uploading file: "
|
||||||
<< local_file.c_str() << std::endl);
|
<< local_file << std::endl);
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error message was: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error message was: "
|
||||||
<< error_buffer << std::endl);
|
<< error_buffer << std::endl);
|
||||||
*this->LogFile << " Error when uploading file: "
|
*this->LogFile << " Error when uploading file: "
|
||||||
<< local_file.c_str()
|
<< local_file
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< " Error message was: " << error_buffer
|
<< " Error message was: " << error_buffer
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
@ -750,15 +750,15 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(
|
|||||||
std::string turl
|
std::string turl
|
||||||
= url + ((url.find("?",0) == std::string::npos) ? "?" : "&")
|
= url + ((url.find("?",0) == std::string::npos) ? "?" : "&")
|
||||||
+ "xmlfile=" + ofile;
|
+ "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: "
|
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_HTTPAUTH, CURLAUTH_ANY);
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, turl.c_str());
|
curl_easy_setopt(curl, CURLOPT_URL, turl.c_str());
|
||||||
if ( curl_easy_perform(curl) )
|
if ( curl_easy_perform(curl) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error when triggering: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error when triggering: "
|
||||||
<< turl.c_str() << std::endl);
|
<< turl << std::endl);
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error message was: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error message was: "
|
||||||
<< error_buffer << std::endl);
|
<< error_buffer << std::endl);
|
||||||
*this->LogFile << "\tTriggering failed with error: " << error_buffer
|
*this->LogFile << "\tTriggering failed with error: " << error_buffer
|
||||||
@ -932,8 +932,8 @@ bool cmCTestSubmitHandler::SubmitUsingCP(
|
|||||||
std::string rfname = destination + "/" + remoteprefix + *file;
|
std::string rfname = destination + "/" + remoteprefix + *file;
|
||||||
cmSystemTools::CopyFileAlways(lfname.c_str(), rfname.c_str());
|
cmSystemTools::CopyFileAlways(lfname.c_str(), rfname.c_str());
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Copy file: "
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Copy file: "
|
||||||
<< lfname.c_str() << " to "
|
<< lfname << " to "
|
||||||
<< rfname.c_str() << std::endl);
|
<< rfname << std::endl);
|
||||||
}
|
}
|
||||||
std::string tagDoneFile = destination + "/" + remoteprefix + "DONE";
|
std::string tagDoneFile = destination + "/" + remoteprefix + "DONE";
|
||||||
cmSystemTools::Touch(tagDoneFile.c_str(), true);
|
cmSystemTools::Touch(tagDoneFile.c_str(), true);
|
||||||
@ -1183,7 +1183,7 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
= buildDirectory + "/Testing/" + this->CTest->GetCurrentTag();
|
= buildDirectory + "/Testing/" + this->CTest->GetCurrentTag();
|
||||||
std::string::size_type glen = gpath.size() + 1;
|
std::string::size_type glen = gpath.size() + 1;
|
||||||
gpath = gpath + "/CoverageLog*";
|
gpath = gpath + "/CoverageLog*";
|
||||||
cmCTestLog(this->CTest, DEBUG, "Globbing for: " << gpath.c_str()
|
cmCTestLog(this->CTest, DEBUG, "Globbing for: " << gpath
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
if ( cmSystemTools::SimpleGlob(gpath, gfiles, 1) )
|
if ( cmSystemTools::SimpleGlob(gpath, gfiles, 1) )
|
||||||
{
|
{
|
||||||
@ -1191,7 +1191,7 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
for ( cc = 0; cc < gfiles.size(); cc ++ )
|
for ( cc = 0; cc < gfiles.size(); cc ++ )
|
||||||
{
|
{
|
||||||
gfiles[cc] = gfiles[cc].substr(glen);
|
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);
|
<< std::endl);
|
||||||
this->CTest->AddSubmitFile(cmCTest::PartCoverage, gfiles[cc].c_str());
|
this->CTest->AddSubmitFile(cmCTest::PartCoverage, gfiles[cc].c_str());
|
||||||
}
|
}
|
||||||
@ -1232,7 +1232,7 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
cmCTest::SetOfStrings::iterator it;
|
cmCTest::SetOfStrings::iterator it;
|
||||||
for ( it = files.begin(); it != files.end(); ++ it )
|
for ( it = files.begin(); it != files.end(); ++ it )
|
||||||
{
|
{
|
||||||
ofs << cnt << "\t" << it->c_str() << std::endl;
|
ofs << cnt << "\t" << *it << std::endl;
|
||||||
cnt ++;
|
cnt ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1448,7 +1448,7 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
oldWorkingDirectory = cmSystemTools::GetCurrentWorkingDirectory();
|
oldWorkingDirectory = cmSystemTools::GetCurrentWorkingDirectory();
|
||||||
cmSystemTools::ChangeDirectory(buildDirectory.c_str());
|
cmSystemTools::ChangeDirectory(buildDirectory.c_str());
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Change directory: "
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Change directory: "
|
||||||
<< buildDirectory.c_str() << std::endl);
|
<< buildDirectory << std::endl);
|
||||||
|
|
||||||
if ( !this->SubmitUsingCP(
|
if ( !this->SubmitUsingCP(
|
||||||
"Testing/"+this->CTest->GetCurrentTag(),
|
"Testing/"+this->CTest->GetCurrentTag(),
|
||||||
|
@ -125,7 +125,7 @@ bool cmCTestSubdirCommand
|
|||||||
{
|
{
|
||||||
std::string m = "Could not find include file: ";
|
std::string m = "Could not find include file: ";
|
||||||
m += fname;
|
m += fname;
|
||||||
this->SetError(m.c_str());
|
this->SetError(m);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -213,7 +213,7 @@ bool cmCTestAddSubdirectoryCommand
|
|||||||
{
|
{
|
||||||
std::string m = "Could not find include file: ";
|
std::string m = "Could not find include file: ";
|
||||||
m += fname;
|
m += fname;
|
||||||
this->SetError(m.c_str());
|
this->SetError(m);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -616,7 +616,7 @@ int cmCTestTestHandler::ProcessHandler()
|
|||||||
ofs << ftit->TestCount << ":" << ftit->Name << std::endl;
|
ofs << ftit->TestCount << ":" << ftit->Name << std::endl;
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "\t" << std::setw(3)
|
cmCTestLog(this->CTest, HANDLER_OUTPUT, "\t" << std::setw(3)
|
||||||
<< ftit->TestCount << " - "
|
<< ftit->TestCount << " - "
|
||||||
<< ftit->Name.c_str() << " ("
|
<< ftit->Name << " ("
|
||||||
<< this->GetTestStatus(ftit->Status) << ")"
|
<< this->GetTestStatus(ftit->Status) << ")"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
}
|
}
|
||||||
@ -1022,7 +1022,7 @@ bool cmCTestTestHandler::GetValue(const char* tag,
|
|||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"parse error: missing tag: "
|
"parse error: missing tag: "
|
||||||
<< tag << " found [" << line.c_str() << "]" << std::endl);
|
<< tag << " found [" << line << "]" << std::endl);
|
||||||
ret = false;
|
ret = false;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@ -1223,7 +1223,7 @@ void cmCTestTestHandler::GenerateDartOutput(std::ostream& os)
|
|||||||
{
|
{
|
||||||
os
|
os
|
||||||
<< "\t\t\t<NamedMeasurement type=\"text/string\" "
|
<< "\t\t\t<NamedMeasurement type=\"text/string\" "
|
||||||
<< "name=\"" << measureIt->first.c_str() << "\"><Value>"
|
<< "name=\"" << measureIt->first << "\"><Value>"
|
||||||
<< cmXMLSafe(measureIt->second)
|
<< cmXMLSafe(measureIt->second)
|
||||||
<< "</Value></NamedMeasurement>\n";
|
<< "</Value></NamedMeasurement>\n";
|
||||||
}
|
}
|
||||||
@ -1506,7 +1506,7 @@ std::string cmCTestTestHandler
|
|||||||
// then try with the exe extension
|
// then try with the exe extension
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
failed.push_back(attempted[ai].c_str());
|
failed.push_back(attempted[ai]);
|
||||||
tempPath = attempted[ai];
|
tempPath = attempted[ai];
|
||||||
tempPath += cmSystemTools::GetExecutableExtension();
|
tempPath += cmSystemTools::GetExecutableExtension();
|
||||||
if(cmSystemTools::FileExists(tempPath.c_str())
|
if(cmSystemTools::FileExists(tempPath.c_str())
|
||||||
@ -1517,7 +1517,7 @@ std::string cmCTestTestHandler
|
|||||||
}
|
}
|
||||||
else
|
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() )
|
else if ( !this->CTest->GetShowOnly() && !this->CTest->ShouldPrintLabels() )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Problem reading file: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE, "Problem reading file: "
|
||||||
<< lastTestsFailedLog.c_str() <<
|
<< lastTestsFailedLog <<
|
||||||
" while generating list of previously failed tests." << std::endl);
|
" while generating list of previously failed tests." << std::endl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1960,7 +1960,7 @@ std::string cmCTestTestHandler::GenerateRegressionImages(
|
|||||||
<< " " << k1 << "=\"" << v1 << "\""
|
<< " " << k1 << "=\"" << v1 << "\""
|
||||||
<< " " << k2 << "=\"" << v2 << "\""
|
<< " " << k2 << "=\"" << v2 << "\""
|
||||||
<< " encoding=\"none\""
|
<< " encoding=\"none\""
|
||||||
<< "><Value>Image " << filename.c_str()
|
<< "><Value>Image " << filename
|
||||||
<< " is empty</Value></NamedMeasurement>";
|
<< " is empty</Value></NamedMeasurement>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2014,10 +2014,10 @@ std::string cmCTestTestHandler::GenerateRegressionImages(
|
|||||||
<< "\t\t\t<NamedMeasurement"
|
<< "\t\t\t<NamedMeasurement"
|
||||||
<< " name=\"" << measurementfile.match(idx) << "\""
|
<< " name=\"" << measurementfile.match(idx) << "\""
|
||||||
<< " text=\"text/string\""
|
<< " text=\"text/string\""
|
||||||
<< "><Value>File " << filename.c_str()
|
<< "><Value>File " << filename
|
||||||
<< " not found</Value></NamedMeasurement>"
|
<< " not found</Value></NamedMeasurement>"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "File \"" << filename.c_str()
|
cmCTestLog(this->CTest, HANDLER_OUTPUT, "File \"" << filename
|
||||||
<< "\" not found." << std::endl);
|
<< "\" not found." << std::endl);
|
||||||
}
|
}
|
||||||
cxml.erase(measurementfile.start(),
|
cxml.erase(measurementfile.start(),
|
||||||
@ -2154,7 +2154,7 @@ bool cmCTestTestHandler::SetTestsProperties(
|
|||||||
if ( key == "ATTACHED_FILES" )
|
if ( key == "ATTACHED_FILES" )
|
||||||
{
|
{
|
||||||
std::vector<std::string> lval;
|
std::vector<std::string> lval;
|
||||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
cmSystemTools::ExpandListArgument(val, lval);
|
||||||
|
|
||||||
for(std::vector<std::string>::iterator f = lval.begin();
|
for(std::vector<std::string>::iterator f = lval.begin();
|
||||||
f != lval.end(); ++f)
|
f != lval.end(); ++f)
|
||||||
@ -2165,7 +2165,7 @@ bool cmCTestTestHandler::SetTestsProperties(
|
|||||||
if ( key == "ATTACHED_FILES_ON_FAIL" )
|
if ( key == "ATTACHED_FILES_ON_FAIL" )
|
||||||
{
|
{
|
||||||
std::vector<std::string> lval;
|
std::vector<std::string> lval;
|
||||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
cmSystemTools::ExpandListArgument(val, lval);
|
||||||
|
|
||||||
for(std::vector<std::string>::iterator f = lval.begin();
|
for(std::vector<std::string>::iterator f = lval.begin();
|
||||||
f != lval.end(); ++f)
|
f != lval.end(); ++f)
|
||||||
@ -2176,7 +2176,7 @@ bool cmCTestTestHandler::SetTestsProperties(
|
|||||||
if ( key == "RESOURCE_LOCK" )
|
if ( key == "RESOURCE_LOCK" )
|
||||||
{
|
{
|
||||||
std::vector<std::string> lval;
|
std::vector<std::string> lval;
|
||||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
cmSystemTools::ExpandListArgument(val, lval);
|
||||||
|
|
||||||
for(std::vector<std::string>::iterator f = lval.begin();
|
for(std::vector<std::string>::iterator f = lval.begin();
|
||||||
f != lval.end(); ++f)
|
f != lval.end(); ++f)
|
||||||
@ -2196,7 +2196,7 @@ bool cmCTestTestHandler::SetTestsProperties(
|
|||||||
if ( key == "REQUIRED_FILES" )
|
if ( key == "REQUIRED_FILES" )
|
||||||
{
|
{
|
||||||
std::vector<std::string> lval;
|
std::vector<std::string> lval;
|
||||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
cmSystemTools::ExpandListArgument(val, lval);
|
||||||
|
|
||||||
for(std::vector<std::string>::iterator f = lval.begin();
|
for(std::vector<std::string>::iterator f = lval.begin();
|
||||||
f != lval.end(); ++f)
|
f != lval.end(); ++f)
|
||||||
@ -2211,14 +2211,14 @@ bool cmCTestTestHandler::SetTestsProperties(
|
|||||||
if ( key == "FAIL_REGULAR_EXPRESSION" )
|
if ( key == "FAIL_REGULAR_EXPRESSION" )
|
||||||
{
|
{
|
||||||
std::vector<std::string> lval;
|
std::vector<std::string> lval;
|
||||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
cmSystemTools::ExpandListArgument(val, lval);
|
||||||
std::vector<std::string>::iterator crit;
|
std::vector<std::string>::iterator crit;
|
||||||
for ( crit = lval.begin(); crit != lval.end(); ++ crit )
|
for ( crit = lval.begin(); crit != lval.end(); ++ crit )
|
||||||
{
|
{
|
||||||
rtit->ErrorRegularExpressions.push_back(
|
rtit->ErrorRegularExpressions.push_back(
|
||||||
std::pair<cmsys::RegularExpression, std::string>(
|
std::pair<cmsys::RegularExpression, std::string>(
|
||||||
cmsys::RegularExpression(crit->c_str()),
|
cmsys::RegularExpression(crit->c_str()),
|
||||||
std::string(crit->c_str())));
|
std::string(*crit)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( key == "PROCESSORS" )
|
if ( key == "PROCESSORS" )
|
||||||
@ -2240,7 +2240,7 @@ bool cmCTestTestHandler::SetTestsProperties(
|
|||||||
if ( key == "DEPENDS" )
|
if ( key == "DEPENDS" )
|
||||||
{
|
{
|
||||||
std::vector<std::string> lval;
|
std::vector<std::string> lval;
|
||||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
cmSystemTools::ExpandListArgument(val, lval);
|
||||||
std::vector<std::string>::iterator crit;
|
std::vector<std::string>::iterator crit;
|
||||||
for ( crit = lval.begin(); crit != lval.end(); ++ crit )
|
for ( crit = lval.begin(); crit != lval.end(); ++ crit )
|
||||||
{
|
{
|
||||||
@ -2250,7 +2250,7 @@ bool cmCTestTestHandler::SetTestsProperties(
|
|||||||
if ( key == "ENVIRONMENT" )
|
if ( key == "ENVIRONMENT" )
|
||||||
{
|
{
|
||||||
std::vector<std::string> lval;
|
std::vector<std::string> lval;
|
||||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
cmSystemTools::ExpandListArgument(val, lval);
|
||||||
std::vector<std::string>::iterator crit;
|
std::vector<std::string>::iterator crit;
|
||||||
for ( crit = lval.begin(); crit != lval.end(); ++ crit )
|
for ( crit = lval.begin(); crit != lval.end(); ++ crit )
|
||||||
{
|
{
|
||||||
@ -2260,7 +2260,7 @@ bool cmCTestTestHandler::SetTestsProperties(
|
|||||||
if ( key == "LABELS" )
|
if ( key == "LABELS" )
|
||||||
{
|
{
|
||||||
std::vector<std::string> lval;
|
std::vector<std::string> lval;
|
||||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
cmSystemTools::ExpandListArgument(val, lval);
|
||||||
std::vector<std::string>::iterator crit;
|
std::vector<std::string>::iterator crit;
|
||||||
for ( crit = lval.begin(); crit != lval.end(); ++ crit )
|
for ( crit = lval.begin(); crit != lval.end(); ++ crit )
|
||||||
{
|
{
|
||||||
@ -2284,14 +2284,14 @@ bool cmCTestTestHandler::SetTestsProperties(
|
|||||||
if ( key == "PASS_REGULAR_EXPRESSION" )
|
if ( key == "PASS_REGULAR_EXPRESSION" )
|
||||||
{
|
{
|
||||||
std::vector<std::string> lval;
|
std::vector<std::string> lval;
|
||||||
cmSystemTools::ExpandListArgument(val.c_str(), lval);
|
cmSystemTools::ExpandListArgument(val, lval);
|
||||||
std::vector<std::string>::iterator crit;
|
std::vector<std::string>::iterator crit;
|
||||||
for ( crit = lval.begin(); crit != lval.end(); ++ crit )
|
for ( crit = lval.begin(); crit != lval.end(); ++ crit )
|
||||||
{
|
{
|
||||||
rtit->RequiredRegularExpressions.push_back(
|
rtit->RequiredRegularExpressions.push_back(
|
||||||
std::pair<cmsys::RegularExpression, std::string>(
|
std::pair<cmsys::RegularExpression, std::string>(
|
||||||
cmsys::RegularExpression(crit->c_str()),
|
cmsys::RegularExpression(crit->c_str()),
|
||||||
std::string(crit->c_str())));
|
std::string(*crit)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( key == "WORKING_DIRECTORY" )
|
if ( key == "WORKING_DIRECTORY" )
|
||||||
|
@ -331,7 +331,7 @@ int cmCTestUpdateHandler::DetectVCS(const char* dir)
|
|||||||
{
|
{
|
||||||
std::string sourceDirectory = dir;
|
std::string sourceDirectory = dir;
|
||||||
cmCTestLog(this->CTest, DEBUG, "Check directory: "
|
cmCTestLog(this->CTest, DEBUG, "Check directory: "
|
||||||
<< sourceDirectory.c_str() << std::endl);
|
<< sourceDirectory << std::endl);
|
||||||
sourceDirectory += "/.svn";
|
sourceDirectory += "/.svn";
|
||||||
if ( cmSystemTools::FileExists(sourceDirectory.c_str()) )
|
if ( cmSystemTools::FileExists(sourceDirectory.c_str()) )
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ int cmCTestUploadHandler::ProcessHandler()
|
|||||||
for ( it = this->Files.begin(); it != this->Files.end(); it ++ )
|
for ( it = this->Files.begin(); it != this->Files.end(); it ++ )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, OUTPUT,
|
cmCTestLog(this->CTest, OUTPUT,
|
||||||
"\tUpload file: " << it->c_str() << std::endl);
|
"\tUpload file: " << *it << std::endl);
|
||||||
ofs << "<File filename=\"" << cmXMLSafe(*it) << "\">\n"
|
ofs << "<File filename=\"" << cmXMLSafe(*it) << "\">\n"
|
||||||
<< "<Content encoding=\"base64\">\n";
|
<< "<Content encoding=\"base64\">\n";
|
||||||
ofs << this->CTest->Base64EncodeFile(*it);
|
ofs << this->CTest->Base64EncodeFile(*it);
|
||||||
|
@ -122,7 +122,7 @@ bool cmParseMumpsCoverage::LoadPackages(const char* d)
|
|||||||
glob.RecurseOn();
|
glob.RecurseOn();
|
||||||
std::string pat = d;
|
std::string pat = d;
|
||||||
pat += "/*.m";
|
pat += "/*.m";
|
||||||
glob.FindFiles(pat.c_str());
|
glob.FindFiles(pat);
|
||||||
std::vector<std::string>& files = glob.GetFiles();
|
std::vector<std::string>& files = glob.GetFiles();
|
||||||
std::vector<std::string>::iterator fileIt;
|
std::vector<std::string>::iterator fileIt;
|
||||||
for ( fileIt = files.begin(); fileIt != files.end();
|
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_EDIT);
|
||||||
field_opts_off(this->Field, O_ACTIVE);
|
field_opts_off(this->Field, O_ACTIVE);
|
||||||
field_opts_off(this->Field, O_STATIC);
|
field_opts_off(this->Field, O_STATIC);
|
||||||
this->SetValue(name.c_str());
|
this->SetValue(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCursesLabelWidget::~cmCursesLabelWidget()
|
cmCursesLabelWidget::~cmCursesLabelWidget()
|
||||||
|
@ -74,7 +74,7 @@ void cmCursesOptionsWidget::NextOption()
|
|||||||
{
|
{
|
||||||
this->CurrentOption = 0;
|
this->CurrentOption = 0;
|
||||||
}
|
}
|
||||||
this->SetValue(this->Options[this->CurrentOption].c_str());
|
this->SetValue(this->Options[this->CurrentOption]);
|
||||||
}
|
}
|
||||||
void cmCursesOptionsWidget::PreviousOption()
|
void cmCursesOptionsWidget::PreviousOption()
|
||||||
{
|
{
|
||||||
@ -86,7 +86,7 @@ void cmCursesOptionsWidget::PreviousOption()
|
|||||||
{
|
{
|
||||||
this->CurrentOption--;
|
this->CurrentOption--;
|
||||||
}
|
}
|
||||||
this->SetValue(this->Options[this->CurrentOption].c_str());
|
this->SetValue(this->Options[this->CurrentOption]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmCursesOptionsWidget::SetOption(const std::string& value)
|
void cmCursesOptionsWidget::SetOption(const std::string& value)
|
||||||
|
@ -59,7 +59,7 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w)
|
|||||||
}
|
}
|
||||||
std::vector<std::string> dirs;
|
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() )
|
if ( this->CurrentIndex < dirs.size() )
|
||||||
{
|
{
|
||||||
cstr = dirs[this->CurrentIndex];
|
cstr = dirs[this->CurrentIndex];
|
||||||
@ -74,7 +74,7 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w)
|
|||||||
cstr += "/";
|
cstr += "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
this->SetString(cstr.c_str());
|
this->SetString(cstr);
|
||||||
touchwin(w);
|
touchwin(w);
|
||||||
wrefresh(w);
|
wrefresh(w);
|
||||||
form_driver(form, REQ_END_FIELD);
|
form_driver(form, REQ_END_FIELD);
|
||||||
|
@ -273,7 +273,7 @@ bool cmAddCustomCommandCommand
|
|||||||
{
|
{
|
||||||
// Lookup an existing command.
|
// Lookup an existing command.
|
||||||
if(cmSourceFile* sf =
|
if(cmSourceFile* sf =
|
||||||
this->Makefile->GetSourceFileWithOutput(output[0].c_str()))
|
this->Makefile->GetSourceFileWithOutput(output[0]))
|
||||||
{
|
{
|
||||||
if(cmCustomCommand* cc = sf->GetCustomCommand())
|
if(cmCustomCommand* cc = sf->GetCustomCommand())
|
||||||
{
|
{
|
||||||
@ -286,9 +286,9 @@ bool cmAddCustomCommandCommand
|
|||||||
|
|
||||||
// No command for this output exists.
|
// No command for this output exists.
|
||||||
cmOStringStream e;
|
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.";
|
<< "\" which is not already a custom command output.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -305,7 +305,7 @@ bool cmAddCustomCommandCommand
|
|||||||
{
|
{
|
||||||
// Source is empty, use the target.
|
// Source is empty, use the target.
|
||||||
std::vector<std::string> no_depends;
|
std::vector<std::string> no_depends;
|
||||||
this->Makefile->AddCustomCommandToTarget(target.c_str(), no_depends,
|
this->Makefile->AddCustomCommandToTarget(target, no_depends,
|
||||||
commandLines, cctype,
|
commandLines, cctype,
|
||||||
comment, working.c_str(),
|
comment, working.c_str(),
|
||||||
escapeOldStyle);
|
escapeOldStyle);
|
||||||
@ -314,7 +314,7 @@ bool cmAddCustomCommandCommand
|
|||||||
{
|
{
|
||||||
// Target is empty, use the output.
|
// Target is empty, use the output.
|
||||||
this->Makefile->AddCustomCommandToOutput(output, depends,
|
this->Makefile->AddCustomCommandToOutput(output, depends,
|
||||||
main_dependency.c_str(),
|
main_dependency,
|
||||||
commandLines, comment,
|
commandLines, comment,
|
||||||
working.c_str(), false,
|
working.c_str(), false,
|
||||||
escapeOldStyle);
|
escapeOldStyle);
|
||||||
@ -324,7 +324,7 @@ bool cmAddCustomCommandCommand
|
|||||||
{
|
{
|
||||||
bool okay = false;
|
bool okay = false;
|
||||||
if(cmSourceFile* sf =
|
if(cmSourceFile* sf =
|
||||||
this->Makefile->GetSourceFileWithOutput(output[0].c_str()))
|
this->Makefile->GetSourceFileWithOutput(output[0]))
|
||||||
{
|
{
|
||||||
if(cmCustomCommand* cc = sf->GetCustomCommand())
|
if(cmCustomCommand* cc = sf->GetCustomCommand())
|
||||||
{
|
{
|
||||||
@ -337,7 +337,7 @@ bool cmAddCustomCommandCommand
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "could not locate source file with a custom command producing \""
|
e << "could not locate source file with a custom command producing \""
|
||||||
<< output[0] << "\" even though this command tried to create it!";
|
<< output[0] << "\" even though this command tried to create it!";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -367,7 +367,7 @@ bool cmAddCustomCommandCommand
|
|||||||
{
|
{
|
||||||
e << "The SOURCE signatures of add_custom_command are no longer "
|
e << "The SOURCE signatures of add_custom_command are no longer "
|
||||||
"supported.";
|
"supported.";
|
||||||
this->Makefile->IssueMessage(messageType, e.str().c_str());
|
this->Makefile->IssueMessage(messageType, e.str());
|
||||||
if (messageType == cmake::FATAL_ERROR)
|
if (messageType == cmake::FATAL_ERROR)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -375,8 +375,8 @@ bool cmAddCustomCommandCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Use the old-style mode for backward compatibility.
|
// Use the old-style mode for backward compatibility.
|
||||||
this->Makefile->AddCustomCommandOldStyle(target.c_str(), outputs, depends,
|
this->Makefile->AddCustomCommandOldStyle(target, outputs, depends,
|
||||||
source.c_str(), commandLines,
|
source, commandLines,
|
||||||
comment);
|
comment);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -397,7 +397,7 @@ cmAddCustomCommandCommand
|
|||||||
{
|
{
|
||||||
std::string e = "attempted to have a file \"" + *o +
|
std::string e = "attempted to have a file \"" + *o +
|
||||||
"\" in a source directory as an output of custom command.";
|
"\" in a source directory as an output of custom command.";
|
||||||
this->SetError(e.c_str());
|
this->SetError(e);
|
||||||
cmSystemTools::SetFatalErrorOccured();
|
cmSystemTools::SetFatalErrorOccured();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -409,7 +409,7 @@ cmAddCustomCommandCommand
|
|||||||
cmOStringStream msg;
|
cmOStringStream msg;
|
||||||
msg << "called with OUTPUT containing a \"" << (*o)[pos]
|
msg << "called with OUTPUT containing a \"" << (*o)[pos]
|
||||||
<< "\". This character is not allowed.";
|
<< "\". This character is not allowed.";
|
||||||
this->SetError(msg.str().c_str());
|
this->SetError(msg.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ bool cmAddCustomTargetCommand
|
|||||||
e << "called with invalid target name \"" << targetName
|
e << "called with invalid target name \"" << targetName
|
||||||
<< "\". Target names may not contain a slash. "
|
<< "\". Target names may not contain a slash. "
|
||||||
<< "Use ADD_CUSTOM_COMMAND to generate files.";
|
<< "Use ADD_CUSTOM_COMMAND to generate files.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ bool cmAddCustomTargetCommand
|
|||||||
cmOStringStream msg;
|
cmOStringStream msg;
|
||||||
msg << "called with target name containing a \"" << targetName[pos]
|
msg << "called with target name containing a \"" << targetName[pos]
|
||||||
<< "\". This character is not allowed.";
|
<< "\". This character is not allowed.";
|
||||||
this->SetError(msg.str().c_str());
|
this->SetError(msg.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ bool cmAddCustomTargetCommand
|
|||||||
"\" is reserved or not valid for certain "
|
"\" is reserved or not valid for certain "
|
||||||
"CMake features, such as generator expressions, and may result "
|
"CMake features, such as generator expressions, and may result "
|
||||||
"in undefined behavior.";
|
"in undefined behavior.";
|
||||||
this->Makefile->IssueMessage(messageType, e.str().c_str());
|
this->Makefile->IssueMessage(messageType, e.str());
|
||||||
|
|
||||||
if (messageType == cmake::FATAL_ERROR)
|
if (messageType == cmake::FATAL_ERROR)
|
||||||
{
|
{
|
||||||
@ -208,7 +208,7 @@ bool cmAddCustomTargetCommand
|
|||||||
std::string msg;
|
std::string msg;
|
||||||
if(!this->Makefile->EnforceUniqueName(targetName, msg, true))
|
if(!this->Makefile->EnforceUniqueName(targetName, msg, true))
|
||||||
{
|
{
|
||||||
this->SetError(msg.c_str());
|
this->SetError(msg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -224,7 +224,7 @@ bool cmAddCustomTargetCommand
|
|||||||
// Add the utility target to the makefile.
|
// Add the utility target to the makefile.
|
||||||
bool escapeOldStyle = !verbatim;
|
bool escapeOldStyle = !verbatim;
|
||||||
cmTarget* target =
|
cmTarget* target =
|
||||||
this->Makefile->AddUtilityCommand(targetName.c_str(), excludeFromAll,
|
this->Makefile->AddUtilityCommand(targetName, excludeFromAll,
|
||||||
working_directory.c_str(), depends,
|
working_directory.c_str(), depends,
|
||||||
commandLines, escapeOldStyle, comment);
|
commandLines, escapeOldStyle, comment);
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ bool cmAddDependenciesCommand
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "Cannot add target-level dependencies to INTERFACE library "
|
e << "Cannot add target-level dependencies to INTERFACE library "
|
||||||
"target \"" << target_name << "\".\n";
|
"target \"" << target_name << "\".\n";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ bool cmAddDependenciesCommand
|
|||||||
++s; // skip over target_name
|
++s; // skip over target_name
|
||||||
for (; s != args.end(); ++s)
|
for (; s != args.end(); ++s)
|
||||||
{
|
{
|
||||||
target->AddUtility(s->c_str(), this->Makefile);
|
target->AddUtility(*s, this->Makefile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -101,7 +101,7 @@ bool cmAddExecutableCommand
|
|||||||
"\" is reserved or not valid for certain "
|
"\" is reserved or not valid for certain "
|
||||||
"CMake features, such as generator expressions, and may result "
|
"CMake features, such as generator expressions, and may result "
|
||||||
"in undefined behavior.";
|
"in undefined behavior.";
|
||||||
this->Makefile->IssueMessage(messageType, e.str().c_str());
|
this->Makefile->IssueMessage(messageType, e.str());
|
||||||
|
|
||||||
if (messageType == cmake::FATAL_ERROR)
|
if (messageType == cmake::FATAL_ERROR)
|
||||||
{
|
{
|
||||||
@ -132,9 +132,9 @@ bool cmAddExecutableCommand
|
|||||||
}
|
}
|
||||||
if (isAlias)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
if(excludeFromAll)
|
if(excludeFromAll)
|
||||||
@ -151,7 +151,7 @@ bool cmAddExecutableCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "ALIAS requires exactly one target argument.";
|
e << "ALIAS requires exactly one target argument.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ bool cmAddExecutableCommand
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "cannot create ALIAS target \"" << exename
|
e << "cannot create ALIAS target \"" << exename
|
||||||
<< "\" because target \"" << aliasedName << "\" is itself an ALIAS.";
|
<< "\" because target \"" << aliasedName << "\" is itself an ALIAS.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
cmTarget *aliasedTarget =
|
cmTarget *aliasedTarget =
|
||||||
@ -172,7 +172,7 @@ bool cmAddExecutableCommand
|
|||||||
e << "cannot create ALIAS target \"" << exename
|
e << "cannot create ALIAS target \"" << exename
|
||||||
<< "\" because target \"" << aliasedName << "\" does not already "
|
<< "\" because target \"" << aliasedName << "\" does not already "
|
||||||
"exist.";
|
"exist.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
cmTarget::TargetType type = aliasedTarget->GetType();
|
cmTarget::TargetType type = aliasedTarget->GetType();
|
||||||
@ -182,7 +182,7 @@ bool cmAddExecutableCommand
|
|||||||
e << "cannot create ALIAS target \"" << exename
|
e << "cannot create ALIAS target \"" << exename
|
||||||
<< "\" because target \"" << aliasedName << "\" is not an "
|
<< "\" because target \"" << aliasedName << "\" is not an "
|
||||||
"executable.";
|
"executable.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(aliasedTarget->IsImported())
|
if(aliasedTarget->IsImported())
|
||||||
@ -190,10 +190,10 @@ bool cmAddExecutableCommand
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "cannot create ALIAS target \"" << exename
|
e << "cannot create ALIAS target \"" << exename
|
||||||
<< "\" because target \"" << aliasedName << "\" is IMPORTED.";
|
<< "\" because target \"" << aliasedName << "\" is IMPORTED.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this->Makefile->AddAlias(exename.c_str(), aliasedTarget);
|
this->Makefile->AddAlias(exename, aliasedTarget);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,12 +206,12 @@ bool cmAddExecutableCommand
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "cannot create imported target \"" << exename
|
e << "cannot create imported target \"" << exename
|
||||||
<< "\" because another target with the same name already exists.";
|
<< "\" because another target with the same name already exists.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the imported target.
|
// Create the imported target.
|
||||||
this->Makefile->AddImportedTarget(exename.c_str(), cmTarget::EXECUTABLE,
|
this->Makefile->AddImportedTarget(exename, cmTarget::EXECUTABLE,
|
||||||
importGlobal);
|
importGlobal);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -221,7 +221,7 @@ bool cmAddExecutableCommand
|
|||||||
std::string msg;
|
std::string msg;
|
||||||
if(!this->Makefile->EnforceUniqueName(exename, msg))
|
if(!this->Makefile->EnforceUniqueName(exename, msg))
|
||||||
{
|
{
|
||||||
this->SetError(msg.c_str());
|
this->SetError(msg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ bool cmAddLibraryCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "INTERFACE library specified with conflicting STATIC type.";
|
e << "INTERFACE library specified with conflicting STATIC type.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
++s;
|
++s;
|
||||||
@ -66,7 +66,7 @@ bool cmAddLibraryCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "INTERFACE library specified with conflicting SHARED type.";
|
e << "INTERFACE library specified with conflicting SHARED type.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
++s;
|
++s;
|
||||||
@ -79,7 +79,7 @@ bool cmAddLibraryCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "INTERFACE library specified with conflicting MODULE type.";
|
e << "INTERFACE library specified with conflicting MODULE type.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
++s;
|
++s;
|
||||||
@ -92,7 +92,7 @@ bool cmAddLibraryCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "INTERFACE library specified with conflicting OBJECT type.";
|
e << "INTERFACE library specified with conflicting OBJECT type.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
++s;
|
++s;
|
||||||
@ -105,7 +105,7 @@ bool cmAddLibraryCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "INTERFACE library specified with conflicting UNKNOWN type.";
|
e << "INTERFACE library specified with conflicting UNKNOWN type.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
++s;
|
++s;
|
||||||
@ -118,7 +118,7 @@ bool cmAddLibraryCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "INTERFACE library specified with conflicting ALIAS type.";
|
e << "INTERFACE library specified with conflicting ALIAS type.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
++s;
|
++s;
|
||||||
@ -130,21 +130,21 @@ bool cmAddLibraryCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "INTERFACE library specified with conflicting/multiple types.";
|
e << "INTERFACE library specified with conflicting/multiple types.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (isAlias)
|
if (isAlias)
|
||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "INTERFACE library specified with conflicting ALIAS type.";
|
e << "INTERFACE library specified with conflicting ALIAS type.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (excludeFromAll)
|
if (excludeFromAll)
|
||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "INTERFACE library may not be used with EXCLUDE_FROM_ALL.";
|
e << "INTERFACE library may not be used with EXCLUDE_FROM_ALL.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
++s;
|
++s;
|
||||||
@ -157,7 +157,7 @@ bool cmAddLibraryCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "INTERFACE library may not be used with EXCLUDE_FROM_ALL.";
|
e << "INTERFACE library may not be used with EXCLUDE_FROM_ALL.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
++s;
|
++s;
|
||||||
@ -177,7 +177,7 @@ bool cmAddLibraryCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "GLOBAL option may only be used with IMPORTED libraries.";
|
e << "GLOBAL option may only be used with IMPORTED libraries.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -192,14 +192,14 @@ bool cmAddLibraryCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "INTERFACE library requires no source arguments.";
|
e << "INTERFACE library requires no source arguments.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (importGlobal && !importTarget)
|
if (importGlobal && !importTarget)
|
||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "INTERFACE library specified as GLOBAL, but not as IMPORTED.";
|
e << "INTERFACE library specified as GLOBAL, but not as IMPORTED.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -236,7 +236,7 @@ bool cmAddLibraryCommand
|
|||||||
"\" is reserved or not valid for certain "
|
"\" is reserved or not valid for certain "
|
||||||
"CMake features, such as generator expressions, and may result "
|
"CMake features, such as generator expressions, and may result "
|
||||||
"in undefined behavior.";
|
"in undefined behavior.";
|
||||||
this->Makefile->IssueMessage(messageType, e.str().c_str());
|
this->Makefile->IssueMessage(messageType, e.str());
|
||||||
|
|
||||||
if (messageType == cmake::FATAL_ERROR)
|
if (messageType == cmake::FATAL_ERROR)
|
||||||
{
|
{
|
||||||
@ -247,9 +247,9 @@ bool cmAddLibraryCommand
|
|||||||
|
|
||||||
if (isAlias)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
if(excludeFromAll)
|
if(excludeFromAll)
|
||||||
@ -266,7 +266,7 @@ bool cmAddLibraryCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "ALIAS requires exactly one target argument.";
|
e << "ALIAS requires exactly one target argument.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -276,7 +276,7 @@ bool cmAddLibraryCommand
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "cannot create ALIAS target \"" << libName
|
e << "cannot create ALIAS target \"" << libName
|
||||||
<< "\" because target \"" << aliasedName << "\" is itself an ALIAS.";
|
<< "\" because target \"" << aliasedName << "\" is itself an ALIAS.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
cmTarget *aliasedTarget =
|
cmTarget *aliasedTarget =
|
||||||
@ -287,7 +287,7 @@ bool cmAddLibraryCommand
|
|||||||
e << "cannot create ALIAS target \"" << libName
|
e << "cannot create ALIAS target \"" << libName
|
||||||
<< "\" because target \"" << aliasedName << "\" does not already "
|
<< "\" because target \"" << aliasedName << "\" does not already "
|
||||||
"exist.";
|
"exist.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
cmTarget::TargetType aliasedType = aliasedTarget->GetType();
|
cmTarget::TargetType aliasedType = aliasedTarget->GetType();
|
||||||
@ -300,7 +300,7 @@ bool cmAddLibraryCommand
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "cannot create ALIAS target \"" << libName
|
e << "cannot create ALIAS target \"" << libName
|
||||||
<< "\" because target \"" << aliasedName << "\" is not a library.";
|
<< "\" because target \"" << aliasedName << "\" is not a library.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(aliasedTarget->IsImported())
|
if(aliasedTarget->IsImported())
|
||||||
@ -308,10 +308,10 @@ bool cmAddLibraryCommand
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "cannot create ALIAS target \"" << libName
|
e << "cannot create ALIAS target \"" << libName
|
||||||
<< "\" because target \"" << aliasedName << "\" is IMPORTED.";
|
<< "\" because target \"" << aliasedName << "\" is IMPORTED.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this->Makefile->AddAlias(libName.c_str(), aliasedTarget);
|
this->Makefile->AddAlias(libName, aliasedTarget);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -364,7 +364,7 @@ bool cmAddLibraryCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "Invalid name for IMPORTED INTERFACE library target: " << libName;
|
e << "Invalid name for IMPORTED INTERFACE library target: " << libName;
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -375,12 +375,12 @@ bool cmAddLibraryCommand
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "cannot create imported target \"" << libName
|
e << "cannot create imported target \"" << libName
|
||||||
<< "\" because another target with the same name already exists.";
|
<< "\" because another target with the same name already exists.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the imported target.
|
// Create the imported target.
|
||||||
this->Makefile->AddImportedTarget(libName.c_str(), type, importGlobal);
|
this->Makefile->AddImportedTarget(libName, type, importGlobal);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -399,7 +399,7 @@ bool cmAddLibraryCommand
|
|||||||
std::string msg;
|
std::string msg;
|
||||||
if(!this->Makefile->EnforceUniqueName(libName, msg))
|
if(!this->Makefile->EnforceUniqueName(libName, msg))
|
||||||
{
|
{
|
||||||
this->SetError(msg.c_str());
|
this->SetError(msg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -413,11 +413,11 @@ bool cmAddLibraryCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "Invalid name for INTERFACE library target: " << libName;
|
e << "Invalid name for INTERFACE library target: " << libName;
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->Makefile->AddLibrary(libName.c_str(),
|
this->Makefile->AddLibrary(libName,
|
||||||
type,
|
type,
|
||||||
srclists,
|
srclists,
|
||||||
excludeFromAll);
|
excludeFromAll);
|
||||||
@ -439,7 +439,7 @@ bool cmAddLibraryCommand
|
|||||||
++s;
|
++s;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->Makefile->AddLibrary(libName.c_str(), type, srclists, excludeFromAll);
|
this->Makefile->AddLibrary(libName, type, srclists, excludeFromAll);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ bool cmAddSubDirectoryCommand::InitialPass
|
|||||||
std::string error = "given source \"";
|
std::string error = "given source \"";
|
||||||
error += srcArg;
|
error += srcArg;
|
||||||
error += "\" which is not an existing directory.";
|
error += "\" which is not an existing directory.";
|
||||||
this->SetError(error.c_str());
|
this->SetError(error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
srcPath = cmSystemTools::CollapseFullPath(srcPath.c_str());
|
srcPath = cmSystemTools::CollapseFullPath(srcPath.c_str());
|
||||||
@ -87,7 +87,7 @@ bool cmAddSubDirectoryCommand::InitialPass
|
|||||||
<< this->Makefile->GetCurrentDirectory() << "\". "
|
<< this->Makefile->GetCurrentDirectory() << "\". "
|
||||||
<< "When specifying an out-of-tree source a binary directory "
|
<< "When specifying an out-of-tree source a binary directory "
|
||||||
<< "must be explicitly specified.";
|
<< "must be explicitly specified.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ bool cmAddSubDirectoryCommand::InitialPass
|
|||||||
binPath = cmSystemTools::CollapseFullPath(binPath.c_str());
|
binPath = cmSystemTools::CollapseFullPath(binPath.c_str());
|
||||||
|
|
||||||
// Add the subdirectory using the computed full paths.
|
// 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);
|
excludeFromAll, false, true);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -44,7 +44,7 @@ bool cmAddTestCommand
|
|||||||
|
|
||||||
// Create the test but add a generator only the first time it is
|
// Create the test but add a generator only the first time it is
|
||||||
// seen. This preserves behavior from before test generators.
|
// 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(test)
|
||||||
{
|
{
|
||||||
// If the test was already added by a new-style signature do not
|
// If the test was already added by a new-style signature do not
|
||||||
@ -54,13 +54,13 @@ bool cmAddTestCommand
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << " given test name \"" << args[0]
|
e << " given test name \"" << args[0]
|
||||||
<< "\" which already exists in this directory.";
|
<< "\" which already exists in this directory.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
test = this->Makefile->CreateTest(args[0].c_str());
|
test = this->Makefile->CreateTest(args[0]);
|
||||||
test->SetOldStyle(true);
|
test->SetOldStyle(true);
|
||||||
this->Makefile->AddTestGenerator(new cmTestGenerator(test));
|
this->Makefile->AddTestGenerator(new cmTestGenerator(test));
|
||||||
}
|
}
|
||||||
@ -137,7 +137,7 @@ bool cmAddTestCommand::HandleNameMode(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << " given unknown argument:\n " << args[i] << "\n";
|
e << " given unknown argument:\n " << args[i] << "\n";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -157,17 +157,17 @@ bool cmAddTestCommand::HandleNameMode(std::vector<std::string> const& args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Require a unique test name within the directory.
|
// Require a unique test name within the directory.
|
||||||
if(this->Makefile->GetTest(name.c_str()))
|
if(this->Makefile->GetTest(name))
|
||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << " given test NAME \"" << name
|
e << " given test NAME \"" << name
|
||||||
<< "\" which already exists in this directory.";
|
<< "\" which already exists in this directory.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the test.
|
// Add the test.
|
||||||
cmTest* test = this->Makefile->CreateTest(name.c_str());
|
cmTest* test = this->Makefile->CreateTest(name);
|
||||||
test->SetOldStyle(false);
|
test->SetOldStyle(false);
|
||||||
test->SetCommand(command);
|
test->SetCommand(command);
|
||||||
if(!working_directory.empty())
|
if(!working_directory.empty())
|
||||||
|
@ -40,7 +40,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass
|
|||||||
}
|
}
|
||||||
|
|
||||||
// was the list already populated
|
// 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)
|
if (def)
|
||||||
{
|
{
|
||||||
sourceListValue = def;
|
sourceListValue = def;
|
||||||
@ -72,7 +72,7 @@ bool cmAuxSourceDirectoryCommand::InitialPass
|
|||||||
// add the file as a class file so
|
// add the file as a class file so
|
||||||
// depends can be done
|
// depends can be done
|
||||||
cmSourceFile* sf =
|
cmSourceFile* sf =
|
||||||
this->Makefile->GetOrCreateSource(fullname.c_str());
|
this->Makefile->GetOrCreateSource(fullname);
|
||||||
sf->SetProperty("ABSTRACT","0");
|
sf->SetProperty("ABSTRACT","0");
|
||||||
if(!sourceListValue.empty())
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ bool cmBuildCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "unknown argument \"" << args[i] << "\"";
|
e << "unknown argument \"" << args[i] << "\"";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -136,7 +136,7 @@ bool cmBuildCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string makecommand = this->Makefile->GetLocalGenerator()
|
std::string makecommand = this->Makefile->GetLocalGenerator()
|
||||||
->GetGlobalGenerator()->GenerateCMakeBuildCommand("", configType.c_str(),
|
->GetGlobalGenerator()->GenerateCMakeBuildCommand("", configType,
|
||||||
"", true);
|
"", true);
|
||||||
|
|
||||||
if(cacheValue)
|
if(cacheValue)
|
||||||
|
@ -25,7 +25,7 @@ bool cmBuildNameCommand
|
|||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const char* cacheValue = this->Makefile->GetDefinition(args[0].c_str());
|
const char* cacheValue = this->Makefile->GetDefinition(args[0]);
|
||||||
if(cacheValue)
|
if(cacheValue)
|
||||||
{
|
{
|
||||||
// do we need to correct the value?
|
// do we need to correct the value?
|
||||||
@ -36,7 +36,7 @@ bool cmBuildNameCommand
|
|||||||
cmSystemTools::ReplaceString(cv,"/", "_");
|
cmSystemTools::ReplaceString(cv,"/", "_");
|
||||||
cmSystemTools::ReplaceString(cv,"(", "_");
|
cmSystemTools::ReplaceString(cv,"(", "_");
|
||||||
cmSystemTools::ReplaceString(cv,")", "_");
|
cmSystemTools::ReplaceString(cv,")", "_");
|
||||||
this->Makefile->AddCacheDefinition(args[0].c_str(),
|
this->Makefile->AddCacheDefinition(args[0],
|
||||||
cv.c_str(),
|
cv.c_str(),
|
||||||
"Name of build.",
|
"Name of build.",
|
||||||
cmCacheManager::STRING);
|
cmCacheManager::STRING);
|
||||||
@ -71,7 +71,7 @@ bool cmBuildNameCommand
|
|||||||
cmSystemTools::ReplaceString(buildname,
|
cmSystemTools::ReplaceString(buildname,
|
||||||
")", "_");
|
")", "_");
|
||||||
|
|
||||||
this->Makefile->AddCacheDefinition(args[0].c_str(),
|
this->Makefile->AddCacheDefinition(args[0],
|
||||||
buildname.c_str(),
|
buildname.c_str(),
|
||||||
"Name of build.",
|
"Name of build.",
|
||||||
cmCacheManager::STRING);
|
cmCacheManager::STRING);
|
||||||
|
@ -53,7 +53,7 @@ bool cmCMakeHostSystemInformationCommand
|
|||||||
result_list += value;
|
result_list += value;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->Makefile->AddDefinition(variable.c_str(), result_list.c_str());
|
this->Makefile->AddDefinition(variable, result_list.c_str());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -97,7 +97,7 @@ bool cmCMakeHostSystemInformationCommand
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string e = "does not recognize <key> " + key;
|
std::string e = "does not recognize <key> " + key;
|
||||||
this->SetError(e.c_str());
|
this->SetError(e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,8 +79,8 @@ bool cmCMakeMinimumRequired
|
|||||||
&required_patch, &required_tweak) < 2)
|
&required_patch, &required_tweak) < 2)
|
||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "could not parse VERSION \"" << version_string.c_str() << "\".";
|
e << "could not parse VERSION \"" << version_string << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ bool cmCMakeMinimumRequired
|
|||||||
{
|
{
|
||||||
// The current version is too low.
|
// The current version is too low.
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "CMake " << version_string.c_str()
|
e << "CMake " << version_string
|
||||||
<< " or higher is required. You are running version "
|
<< " or higher is required. You are running version "
|
||||||
<< cmVersion::GetCMakeVersion();
|
<< cmVersion::GetCMakeVersion();
|
||||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
|
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
|
||||||
@ -135,7 +135,7 @@ bool cmCMakeMinimumRequired::EnforceUnknownArguments()
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "called with unknown argument \""
|
e << "called with unknown argument \""
|
||||||
<< this->UnknownArguments[0] << "\".";
|
<< this->UnknownArguments[0] << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -58,7 +58,7 @@ bool cmCMakePolicyCommand
|
|||||||
|
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "given unknown first argument \"" << args[0] << "\"";
|
e << "given unknown first argument \"" << args[0] << "\"";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ bool cmCMakePolicyCommand::HandleSetMode(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "SET given unrecognized policy status \"" << args[2] << "\"";
|
e << "SET given unrecognized policy status \"" << args[2] << "\"";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ bool cmCMakePolicyCommand::HandleGetMode(std::vector<std::string> const& args)
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "GET given policy \"" << id << "\" which is not known to this "
|
e << "GET given policy \"" << id << "\" which is not known to this "
|
||||||
<< "version of CMake.";
|
<< "version of CMake.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,15 +126,15 @@ bool cmCMakePolicyCommand::HandleGetMode(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
case cmPolicies::OLD:
|
case cmPolicies::OLD:
|
||||||
// Report that the policy is set to OLD.
|
// Report that the policy is set to OLD.
|
||||||
this->Makefile->AddDefinition(var.c_str(), "OLD");
|
this->Makefile->AddDefinition(var, "OLD");
|
||||||
break;
|
break;
|
||||||
case cmPolicies::WARN:
|
case cmPolicies::WARN:
|
||||||
// Report that the policy is not set.
|
// Report that the policy is not set.
|
||||||
this->Makefile->AddDefinition(var.c_str(), "");
|
this->Makefile->AddDefinition(var, "");
|
||||||
break;
|
break;
|
||||||
case cmPolicies::NEW:
|
case cmPolicies::NEW:
|
||||||
// Report that the policy is set to NEW.
|
// Report that the policy is set to NEW.
|
||||||
this->Makefile->AddDefinition(var.c_str(), "NEW");
|
this->Makefile->AddDefinition(var, "NEW");
|
||||||
break;
|
break;
|
||||||
case cmPolicies::REQUIRED_IF_USED:
|
case cmPolicies::REQUIRED_IF_USED:
|
||||||
case cmPolicies::REQUIRED_ALWAYS:
|
case cmPolicies::REQUIRED_ALWAYS:
|
||||||
|
@ -557,9 +557,9 @@ void CCONV *cmGetSource(void *arg, const char *name)
|
|||||||
sf->RealSourceFile = rsf;
|
sf->RealSourceFile = rsf;
|
||||||
sf->FullPath = rsf->GetFullPath();
|
sf->FullPath = rsf->GetFullPath();
|
||||||
sf->SourceName =
|
sf->SourceName =
|
||||||
cmSystemTools::GetFilenameWithoutLastExtension(sf->FullPath.c_str());
|
cmSystemTools::GetFilenameWithoutLastExtension(sf->FullPath);
|
||||||
sf->SourceExtension =
|
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.
|
// Store the proxy in the map so it can be re-used and deleted later.
|
||||||
cmCPluginAPISourceFileMap::value_type entry(rsf, sf);
|
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.
|
// 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;
|
rsf->GetProperties() = osf->Properties;
|
||||||
for(std::vector<std::string>::iterator i = osf->Depends.begin();
|
for(std::vector<std::string>::iterator i = osf->Depends.begin();
|
||||||
i != osf->Depends.end(); ++i)
|
i != osf->Depends.end(); ++i)
|
||||||
|
@ -78,7 +78,7 @@ struct tm* cmCTest::GetNightlyTime(std::string str,
|
|||||||
lctime->tm_mday,
|
lctime->tm_mday,
|
||||||
str.c_str());
|
str.c_str());
|
||||||
cmCTestLog(this, OUTPUT, "Determine Nightly Start Time" << std::endl
|
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
|
//Convert the nightly start time to seconds. Since we are
|
||||||
//providing only a time and a timezone, the current date of
|
//providing only a time and a timezone, the current date of
|
||||||
//the local machine is assumed. Consequently, nightlySeconds
|
//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)
|
bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
||||||
{
|
{
|
||||||
std::string src_dir
|
std::string src_dir
|
||||||
= this->GetCTestConfiguration("SourceDirectory").c_str();
|
= this->GetCTestConfiguration("SourceDirectory");
|
||||||
std::string bld_dir = this->GetCTestConfiguration("BuildDirectory").c_str();
|
std::string bld_dir = this->GetCTestConfiguration("BuildDirectory");
|
||||||
this->DartVersion = 1;
|
this->DartVersion = 1;
|
||||||
this->DropSiteCDash = false;
|
this->DropSiteCDash = false;
|
||||||
for(Part p = PartStart; p != PartCount; p = Part(p+1))
|
for(Part p = PartStart; p != PartCount; p = Part(p+1))
|
||||||
@ -681,14 +681,14 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
|||||||
if ( !fname.empty() )
|
if ( !fname.empty() )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, OUTPUT, " Reading ctest configuration file: "
|
cmCTestLog(this, OUTPUT, " Reading ctest configuration file: "
|
||||||
<< fname.c_str() << std::endl);
|
<< fname << std::endl);
|
||||||
bool readit = mf->ReadListFile(mf->GetCurrentListFile(),
|
bool readit = mf->ReadListFile(mf->GetCurrentListFile(),
|
||||||
fname.c_str() );
|
fname.c_str() );
|
||||||
if(!readit)
|
if(!readit)
|
||||||
{
|
{
|
||||||
std::string m = "Could not find include file: ";
|
std::string m = "Could not find include file: ";
|
||||||
m += fname;
|
m += fname;
|
||||||
command->SetError(m.c_str());
|
command->SetError(m);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -696,10 +696,10 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
|||||||
{
|
{
|
||||||
cmCTestLog(this, WARNING,
|
cmCTestLog(this, WARNING,
|
||||||
"Cannot locate CTest configuration: in BuildDirectory: "
|
"Cannot locate CTest configuration: in BuildDirectory: "
|
||||||
<< bld_dir_fname.c_str() << std::endl);
|
<< bld_dir_fname << std::endl);
|
||||||
cmCTestLog(this, WARNING,
|
cmCTestLog(this, WARNING,
|
||||||
"Cannot locate CTest configuration: in SourceDirectory: "
|
"Cannot locate CTest configuration: in SourceDirectory: "
|
||||||
<< src_dir_fname.c_str() << std::endl);
|
<< src_dir_fname << std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->SetCTestConfigurationFromCMakeVariable(mf, "NightlyStartTime",
|
this->SetCTestConfigurationFromCMakeVariable(mf, "NightlyStartTime",
|
||||||
@ -748,13 +748,13 @@ bool cmCTest::UpdateCTestConfiguration()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "UpdateCTestConfiguration from :"
|
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "UpdateCTestConfiguration from :"
|
||||||
<< fileName.c_str() << "\n");
|
<< fileName << "\n");
|
||||||
if ( !cmSystemTools::FileExists(fileName.c_str()) )
|
if ( !cmSystemTools::FileExists(fileName.c_str()) )
|
||||||
{
|
{
|
||||||
// No need to exit if we are not producing XML
|
// No need to exit if we are not producing XML
|
||||||
if ( this->ProduceXML )
|
if ( this->ProduceXML )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot find file: " << fileName.c_str()
|
cmCTestLog(this, ERROR_MESSAGE, "Cannot find file: " << fileName
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -762,7 +762,7 @@ bool cmCTest::UpdateCTestConfiguration()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Parse Config file:"
|
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Parse Config file:"
|
||||||
<< fileName.c_str() << "\n");
|
<< fileName << "\n");
|
||||||
// parse the dart test file
|
// parse the dart test file
|
||||||
cmsys::ifstream fin(fileName.c_str());
|
cmsys::ifstream fin(fileName.c_str());
|
||||||
|
|
||||||
@ -930,7 +930,7 @@ bool cmCTest::AddIfExists(Part part, const char* file)
|
|||||||
{
|
{
|
||||||
std::string name = file;
|
std::string name = file;
|
||||||
name += ".gz";
|
name += ".gz";
|
||||||
if ( this->CTestFileExists(name.c_str()) )
|
if ( this->CTestFileExists(name) )
|
||||||
{
|
{
|
||||||
this->AddSubmitFile(part, file);
|
this->AddSubmitFile(part, file);
|
||||||
}
|
}
|
||||||
@ -1346,7 +1346,7 @@ int cmCTest::RunTest(std::vector<const char*> argv,
|
|||||||
*output += oss.str();
|
*output += oss.str();
|
||||||
if ( log )
|
if ( log )
|
||||||
{
|
{
|
||||||
*log << output->c_str();
|
*log << *output;
|
||||||
}
|
}
|
||||||
cmSystemTools::ChangeDirectory(oldpath.c_str());
|
cmSystemTools::ChangeDirectory(oldpath.c_str());
|
||||||
|
|
||||||
@ -1562,7 +1562,7 @@ void cmCTest::AddSiteProperties(std::ostream& ostr)
|
|||||||
for(std::vector<std::string>::iterator i = args.begin();
|
for(std::vector<std::string>::iterator i = args.begin();
|
||||||
i != args.end(); ++i)
|
i != args.end(); ++i)
|
||||||
{
|
{
|
||||||
ostr << " <Label>" << i->c_str() << "</Label>\n";
|
ostr << " <Label>" << *i << "</Label>\n";
|
||||||
}
|
}
|
||||||
ostr << " </Labels>\n";
|
ostr << " </Labels>\n";
|
||||||
}
|
}
|
||||||
@ -1606,7 +1606,7 @@ int cmCTest::GenerateCTestNotesOutput(std::ostream& os,
|
|||||||
|
|
||||||
for ( it = files.begin(); it != files.end(); it ++ )
|
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();
|
std::string note_time = this->CurrentTime();
|
||||||
os << "<Note Name=\"" << cmXMLSafe(*it) << "\">\n"
|
os << "<Note Name=\"" << cmXMLSafe(*it) << "\">\n"
|
||||||
<< "<Time>" << cmSystemTools::GetTime() << "</Time>\n"
|
<< "<Time>" << cmSystemTools::GetTime() << "</Time>\n"
|
||||||
@ -1624,8 +1624,8 @@ int cmCTest::GenerateCTestNotesOutput(std::ostream& os,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
os << "Problem reading file: " << it->c_str() << std::endl;
|
os << "Problem reading file: " << *it << std::endl;
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Problem reading file: " << it->c_str()
|
cmCTestLog(this, ERROR_MESSAGE, "Problem reading file: " << *it
|
||||||
<< " while creating notes" << std::endl);
|
<< " while creating notes" << std::endl);
|
||||||
}
|
}
|
||||||
os << "</Text>\n"
|
os << "</Text>\n"
|
||||||
@ -1732,7 +1732,7 @@ bool cmCTest::SubmitExtraFiles(const VectorOfStrings &files)
|
|||||||
if ( !cmSystemTools::FileExists(it->c_str()) )
|
if ( !cmSystemTools::FileExists(it->c_str()) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot find extra file: "
|
cmCTestLog(this, ERROR_MESSAGE, "Cannot find extra file: "
|
||||||
<< it->c_str() << " to submit."
|
<< *it << " to submit."
|
||||||
<< std::endl;);
|
<< std::endl;);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -2246,7 +2246,7 @@ bool cmCTest::AddVariableDefinition(const std::string &arg)
|
|||||||
std::string value;
|
std::string value;
|
||||||
cmCacheManager::CacheEntryType type = cmCacheManager::UNINITIALIZED;
|
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;
|
this->Definitions[name] = value;
|
||||||
return true;
|
return true;
|
||||||
@ -2319,7 +2319,7 @@ int cmCTest::Run(std::vector<std::string> &args, std::string* output)
|
|||||||
executeTests = false;
|
executeTests = false;
|
||||||
cmCTestLog(this, ERROR_MESSAGE,
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
"CTest -T called with incorrect option: "
|
"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
|
cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl
|
||||||
<< " " << ctestExec << " -T all" << std::endl
|
<< " " << ctestExec << " -T all" << std::endl
|
||||||
<< " " << ctestExec << " -T start" << std::endl
|
<< " " << ctestExec << " -T start" << std::endl
|
||||||
@ -2356,7 +2356,7 @@ int cmCTest::Run(std::vector<std::string> &args, std::string* output)
|
|||||||
{
|
{
|
||||||
executeTests = false;
|
executeTests = false;
|
||||||
cmCTestLog(this, ERROR_MESSAGE,
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
"CTest -M called with incorrect option: " << str.c_str()
|
"CTest -M called with incorrect option: " << str
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl
|
cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl
|
||||||
<< " " << ctestExec << " -M Continuous" << std::endl
|
<< " " << ctestExec << " -M Continuous" << std::endl
|
||||||
@ -2527,11 +2527,11 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
|
|||||||
std::string fname = dir;
|
std::string fname = dir;
|
||||||
fname += "/CTestCustom.cmake";
|
fname += "/CTestCustom.cmake";
|
||||||
cmCTestLog(this, DEBUG, "* Check for file: "
|
cmCTestLog(this, DEBUG, "* Check for file: "
|
||||||
<< fname.c_str() << std::endl);
|
<< fname << std::endl);
|
||||||
if ( cmSystemTools::FileExists(fname.c_str()) )
|
if ( cmSystemTools::FileExists(fname.c_str()) )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: "
|
cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: "
|
||||||
<< fname.c_str() << std::endl);
|
<< fname << std::endl);
|
||||||
bool erroroc = cmSystemTools::GetErrorOccuredFlag();
|
bool erroroc = cmSystemTools::GetErrorOccuredFlag();
|
||||||
cmSystemTools::ResetErrorOccuredFlag();
|
cmSystemTools::ResetErrorOccuredFlag();
|
||||||
|
|
||||||
@ -2540,7 +2540,7 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
|
|||||||
{
|
{
|
||||||
cmCTestLog(this, ERROR_MESSAGE,
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
"Problem reading custom configuration: "
|
"Problem reading custom configuration: "
|
||||||
<< fname.c_str() << std::endl);
|
<< fname << std::endl);
|
||||||
}
|
}
|
||||||
found = true;
|
found = true;
|
||||||
if ( erroroc )
|
if ( erroroc )
|
||||||
@ -2552,7 +2552,7 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
|
|||||||
std::string rexpr = dir;
|
std::string rexpr = dir;
|
||||||
rexpr += "/CTestCustom.ctest";
|
rexpr += "/CTestCustom.ctest";
|
||||||
cmCTestLog(this, DEBUG, "* Check for file: "
|
cmCTestLog(this, DEBUG, "* Check for file: "
|
||||||
<< rexpr.c_str() << std::endl);
|
<< rexpr << std::endl);
|
||||||
if ( !found && cmSystemTools::FileExists(rexpr.c_str()) )
|
if ( !found && cmSystemTools::FileExists(rexpr.c_str()) )
|
||||||
{
|
{
|
||||||
cmsys::Glob gl;
|
cmsys::Glob gl;
|
||||||
@ -2564,13 +2564,13 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
|
|||||||
++ fileIt )
|
++ fileIt )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: "
|
cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: "
|
||||||
<< fileIt->c_str() << std::endl);
|
<< *fileIt << std::endl);
|
||||||
if ( !mf->ReadListFile(0, fileIt->c_str()) ||
|
if ( !mf->ReadListFile(0, fileIt->c_str()) ||
|
||||||
cmSystemTools::GetErrorOccuredFlag() )
|
cmSystemTools::GetErrorOccuredFlag() )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, ERROR_MESSAGE,
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
"Problem reading custom configuration: "
|
"Problem reading custom configuration: "
|
||||||
<< fileIt->c_str() << std::endl);
|
<< *fileIt << std::endl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
found = true;
|
found = true;
|
||||||
@ -2584,7 +2584,7 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
|
|||||||
{
|
{
|
||||||
cmCTestLog(this, DEBUG,
|
cmCTestLog(this, DEBUG,
|
||||||
"* Read custom CTest configuration vectors for handler: "
|
"* 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);
|
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 )
|
for ( it = slist.begin(); it != slist.end(); ++it )
|
||||||
{
|
{
|
||||||
cmCTestLog(this, DEBUG, " -- " << it->c_str() << std::endl);
|
cmCTestLog(this, DEBUG, " -- " << *it << std::endl);
|
||||||
vec.push_back(it->c_str());
|
vec.push_back(*it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2849,7 +2849,7 @@ void cmCTest::AddCTestConfigurationOverwrite(const std::string& overStr)
|
|||||||
"CTest configuration overwrite specified in the wrong format."
|
"CTest configuration overwrite specified in the wrong format."
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< "Valid format is: --overwrite key=value" << 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;
|
return;
|
||||||
}
|
}
|
||||||
std::string key = overStr.substr(0, epos);
|
std::string key = overStr.substr(0, epos);
|
||||||
|
@ -644,7 +644,7 @@ void cmCacheManager::OutputHelpString(std::ostream& fout,
|
|||||||
fout << "\\n";
|
fout << "\\n";
|
||||||
}
|
}
|
||||||
oneLine = helpString.substr(pos, i - pos);
|
oneLine = helpString.substr(pos, i - pos);
|
||||||
fout << oneLine.c_str() << "\n";
|
fout << oneLine << "\n";
|
||||||
pos = i;
|
pos = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -698,7 +698,7 @@ void cmCacheManager::PrintCache(std::ostream& out) const
|
|||||||
{
|
{
|
||||||
if((*i).second.Type != INTERNAL)
|
if((*i).second.Type != INTERNAL)
|
||||||
{
|
{
|
||||||
out << (*i).first.c_str() << " = " << (*i).second.Value.c_str()
|
out << (*i).first << " = " << (*i).second.Value
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key,
|
|||||||
{
|
{
|
||||||
if (this->EscapeQuotes)
|
if (this->EscapeQuotes)
|
||||||
{
|
{
|
||||||
return this->AddString(cmSystemTools::EscapeQuotes(ptr).c_str());
|
return this->AddString(cmSystemTools::EscapeQuotes(ptr));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -94,7 +94,7 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key,
|
|||||||
{
|
{
|
||||||
if(this->EscapeQuotes)
|
if(this->EscapeQuotes)
|
||||||
{
|
{
|
||||||
return this->AddString(cmSystemTools::EscapeQuotes(c).c_str());
|
return this->AddString(cmSystemTools::EscapeQuotes(c));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -120,7 +120,7 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var)
|
|||||||
{
|
{
|
||||||
cmOStringStream ostr;
|
cmOStringStream ostr;
|
||||||
ostr << this->FileLine;
|
ostr << this->FileLine;
|
||||||
return this->AddString(ostr.str().c_str());
|
return this->AddString(ostr.str());
|
||||||
}
|
}
|
||||||
const char* value = this->Makefile->GetDefinition(var);
|
const char* value = this->Makefile->GetDefinition(var);
|
||||||
if(!value && !this->RemoveEmpty)
|
if(!value && !this->RemoveEmpty)
|
||||||
@ -144,14 +144,14 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var)
|
|||||||
bt.push_back(lfc);
|
bt.push_back(lfc);
|
||||||
msg << "uninitialized variable \'" << var << "\'";
|
msg << "uninitialized variable \'" << var << "\'";
|
||||||
this->Makefile->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING,
|
this->Makefile->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING,
|
||||||
msg.str().c_str(), bt);
|
msg.str(), bt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (this->EscapeQuotes && value)
|
if (this->EscapeQuotes && value)
|
||||||
{
|
{
|
||||||
return this->AddString(cmSystemTools::EscapeQuotes(value).c_str());
|
return this->AddString(cmSystemTools::EscapeQuotes(value));
|
||||||
}
|
}
|
||||||
return this->AddString(value ? value : "");
|
return this->AddString(value ? value : "");
|
||||||
}
|
}
|
||||||
@ -181,7 +181,7 @@ char* cmCommandArgumentParserHelper::ExpandVariableForAt(const char* var)
|
|||||||
std::string ref = "@";
|
std::string ref = "@";
|
||||||
ref += var;
|
ref += var;
|
||||||
ref += "@";
|
ref += "@";
|
||||||
return this->AddString(ref.c_str());
|
return this->AddString(ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
char* cmCommandArgumentParserHelper::CombineUnions(char* in1, char* in2)
|
char* cmCommandArgumentParserHelper::CombineUnions(char* in1, char* in2)
|
||||||
@ -293,7 +293,7 @@ int cmCommandArgumentParserHelper::ParseString(const char* str, int verb)
|
|||||||
if ( Verbose )
|
if ( Verbose )
|
||||||
{
|
{
|
||||||
std::cerr << "Expanding [" << str << "] produced: ["
|
std::cerr << "Expanding [" << str << "] produced: ["
|
||||||
<< this->Result.c_str() << "]" << std::endl;
|
<< this->Result << "]" << std::endl;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -312,7 +312,7 @@ int cmComputeLinkDepends::AddLinkEntry(int depender_index,
|
|||||||
int index = lei->second;
|
int index = lei->second;
|
||||||
LinkEntry& entry = this->EntryList[index];
|
LinkEntry& entry = this->EntryList[index];
|
||||||
entry.Item = item;
|
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' &&
|
entry.IsFlag = (!entry.Target && item[0] == '-' && item[1] != 'l' &&
|
||||||
item.substr(0, 10) != "-framework");
|
item.substr(0, 10) != "-framework");
|
||||||
|
|
||||||
@ -328,7 +328,7 @@ int cmComputeLinkDepends::AddLinkEntry(int depender_index,
|
|||||||
// Look for an old-style <item>_LIB_DEPENDS variable.
|
// Look for an old-style <item>_LIB_DEPENDS variable.
|
||||||
std::string var = entry.Item;
|
std::string var = entry.Item;
|
||||||
var += "_LIB_DEPENDS";
|
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.
|
// The item dependencies are known. Follow them.
|
||||||
BFSEntry qe = {index, val};
|
BFSEntry qe = {index, val};
|
||||||
@ -435,7 +435,7 @@ void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep)
|
|||||||
LinkEntry& entry = this->EntryList[lei->second];
|
LinkEntry& entry = this->EntryList[lei->second];
|
||||||
entry.Item = dep.Item;
|
entry.Item = dep.Item;
|
||||||
entry.Target = this->FindTargetToLink(dep.DependerIndex,
|
entry.Target = this->FindTargetToLink(dep.DependerIndex,
|
||||||
dep.Item.c_str());
|
dep.Item);
|
||||||
|
|
||||||
// This item was added specifically because it is a dependent
|
// This item was added specifically because it is a dependent
|
||||||
// shared library. It may get special treatment
|
// shared library. It may get special treatment
|
||||||
@ -506,7 +506,7 @@ void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
|
|||||||
{
|
{
|
||||||
std::string var = *di;
|
std::string var = *di;
|
||||||
var += "_LINK_TYPE";
|
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)
|
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 of targets linked in another configuration as link
|
||||||
// directories.
|
// directories.
|
||||||
if(cmTarget const* tgt
|
if(cmTarget const* tgt
|
||||||
= this->FindTargetToLink(depender_index, item.c_str()))
|
= this->FindTargetToLink(depender_index, item))
|
||||||
{
|
{
|
||||||
if(!tgt->IsImported())
|
if(!tgt->IsImported())
|
||||||
{
|
{
|
||||||
|
@ -293,7 +293,7 @@ cmComputeLinkInformation
|
|||||||
std::string loader_flag_var = "CMAKE_SHARED_MODULE_LOADER_";
|
std::string loader_flag_var = "CMAKE_SHARED_MODULE_LOADER_";
|
||||||
loader_flag_var += this->LinkLanguage;
|
loader_flag_var += this->LinkLanguage;
|
||||||
loader_flag_var += "_FLAG";
|
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.
|
// Get options needed to link libraries.
|
||||||
@ -317,8 +317,8 @@ cmComputeLinkInformation
|
|||||||
rtVar += this->LinkLanguage;
|
rtVar += this->LinkLanguage;
|
||||||
rtVar += "_FLAG";
|
rtVar += "_FLAG";
|
||||||
std::string rtSepVar = rtVar + "_SEP";
|
std::string rtSepVar = rtVar + "_SEP";
|
||||||
this->RuntimeFlag = this->Makefile->GetSafeDefinition(rtVar.c_str());
|
this->RuntimeFlag = this->Makefile->GetSafeDefinition(rtVar);
|
||||||
this->RuntimeSep = this->Makefile->GetSafeDefinition(rtSepVar.c_str());
|
this->RuntimeSep = this->Makefile->GetSafeDefinition(rtSepVar);
|
||||||
this->RuntimeAlways =
|
this->RuntimeAlways =
|
||||||
(this->Makefile->
|
(this->Makefile->
|
||||||
GetSafeDefinition("CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH"));
|
GetSafeDefinition("CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH"));
|
||||||
@ -330,7 +330,7 @@ cmComputeLinkInformation
|
|||||||
rlVar += "_RPATH_LINK_";
|
rlVar += "_RPATH_LINK_";
|
||||||
rlVar += this->LinkLanguage;
|
rlVar += this->LinkLanguage;
|
||||||
rlVar += "_FLAG";
|
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.
|
// 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_";
|
std::string var = "CMAKE_SHARED_LIBRARY_LINK_";
|
||||||
var += this->LinkLanguage;
|
var += this->LinkLanguage;
|
||||||
var += "_WITH_RUNTIME_PATH";
|
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.
|
// Check the platform policy for missing soname case.
|
||||||
@ -505,7 +505,7 @@ bool cmComputeLinkInformation::Compute()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Compute the ordered link line items.
|
// Compute the ordered link line items.
|
||||||
cmComputeLinkDepends cld(this->Target, this->Config.c_str(),
|
cmComputeLinkDepends cld(this->Target, this->Config,
|
||||||
this->HeadTarget);
|
this->HeadTarget);
|
||||||
cld.SetOldLinkDirMode(this->OldLinkDirMode);
|
cld.SetOldLinkDirMode(this->OldLinkDirMode);
|
||||||
cmComputeLinkDepends::EntryVector const& linkEntries = cld.Compute();
|
cmComputeLinkDepends::EntryVector const& linkEntries = cld.Compute();
|
||||||
@ -593,7 +593,7 @@ void cmComputeLinkInformation::AddImplicitLinkInfo(std::string const& lang)
|
|||||||
std::string libVar = "CMAKE_";
|
std::string libVar = "CMAKE_";
|
||||||
libVar += lang;
|
libVar += lang;
|
||||||
libVar += "_IMPLICIT_LINK_LIBRARIES";
|
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;
|
std::vector<std::string> libsVec;
|
||||||
cmSystemTools::ExpandListArgument(libs, libsVec);
|
cmSystemTools::ExpandListArgument(libs, libsVec);
|
||||||
@ -602,7 +602,7 @@ void cmComputeLinkInformation::AddImplicitLinkInfo(std::string const& lang)
|
|||||||
{
|
{
|
||||||
if(this->ImplicitLinkLibs.find(*i) == this->ImplicitLinkLibs.end())
|
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_";
|
std::string dirVar = "CMAKE_";
|
||||||
dirVar += lang;
|
dirVar += lang;
|
||||||
dirVar += "_IMPLICIT_LINK_DIRECTORIES";
|
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;
|
std::vector<std::string> dirsVec;
|
||||||
cmSystemTools::ExpandListArgument(dirs, dirsVec);
|
cmSystemTools::ExpandListArgument(dirs, dirsVec);
|
||||||
@ -820,7 +820,7 @@ void cmComputeLinkInformation::ComputeLinkTypeInfo()
|
|||||||
static_link_type_flag_var += this->LinkLanguage;
|
static_link_type_flag_var += this->LinkLanguage;
|
||||||
static_link_type_flag_var += "_FLAGS";
|
static_link_type_flag_var += "_FLAGS";
|
||||||
static_link_type_flag =
|
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_";
|
std::string shared_link_type_flag_var = "CMAKE_";
|
||||||
shared_link_type_flag_var += target_type_str;
|
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 += this->LinkLanguage;
|
||||||
shared_link_type_flag_var += "_FLAGS";
|
shared_link_type_flag_var += "_FLAGS";
|
||||||
shared_link_type_flag =
|
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
|
// 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.
|
// Add the item using the -framework option.
|
||||||
this->Items.push_back(Item("-framework", false));
|
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));
|
this->Items.push_back(Item(fw, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1419,7 +1419,7 @@ void cmComputeLinkInformation::ComputeFrameworkInfo()
|
|||||||
implicitDirVar += this->LinkLanguage;
|
implicitDirVar += this->LinkLanguage;
|
||||||
implicitDirVar += "_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES";
|
implicitDirVar += "_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES";
|
||||||
if(const char* implicitDirs =
|
if(const char* implicitDirs =
|
||||||
this->Makefile->GetDefinition(implicitDirVar.c_str()))
|
this->Makefile->GetDefinition(implicitDirVar))
|
||||||
{
|
{
|
||||||
cmSystemTools::ExpandListArgument(implicitDirs, implicitDirVec);
|
cmSystemTools::ExpandListArgument(implicitDirs, implicitDirVec);
|
||||||
}
|
}
|
||||||
@ -1506,9 +1506,9 @@ void cmComputeLinkInformation::HandleBadFullItem(std::string const& item,
|
|||||||
// Print the warning at most once for this item.
|
// Print the warning at most once for this item.
|
||||||
std::string wid = "CMP0008-WARNING-GIVEN-";
|
std::string wid = "CMP0008-WARNING-GIVEN-";
|
||||||
wid += item;
|
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;
|
cmOStringStream w;
|
||||||
w << (this->Makefile->GetPolicies()
|
w << (this->Makefile->GetPolicies()
|
||||||
->GetPolicyWarning(cmPolicies::CMP0008)) << "\n"
|
->GetPolicyWarning(cmPolicies::CMP0008)) << "\n"
|
||||||
@ -1692,7 +1692,7 @@ void cmComputeLinkInformation::LoadImplicitLinkInfo()
|
|||||||
implicitDirVar += this->LinkLanguage;
|
implicitDirVar += this->LinkLanguage;
|
||||||
implicitDirVar += "_IMPLICIT_LINK_DIRECTORIES";
|
implicitDirVar += "_IMPLICIT_LINK_DIRECTORIES";
|
||||||
if(const char* implicitDirs =
|
if(const char* implicitDirs =
|
||||||
this->Makefile->GetDefinition(implicitDirVar.c_str()))
|
this->Makefile->GetDefinition(implicitDirVar))
|
||||||
{
|
{
|
||||||
cmSystemTools::ExpandListArgument(implicitDirs, implicitDirVec);
|
cmSystemTools::ExpandListArgument(implicitDirs, implicitDirVec);
|
||||||
}
|
}
|
||||||
@ -1710,7 +1710,7 @@ void cmComputeLinkInformation::LoadImplicitLinkInfo()
|
|||||||
implicitLibVar += this->LinkLanguage;
|
implicitLibVar += this->LinkLanguage;
|
||||||
implicitLibVar += "_IMPLICIT_LINK_LIBRARIES";
|
implicitLibVar += "_IMPLICIT_LINK_LIBRARIES";
|
||||||
if(const char* implicitLibs =
|
if(const char* implicitLibs =
|
||||||
this->Makefile->GetDefinition(implicitLibVar.c_str()))
|
this->Makefile->GetDefinition(implicitLibVar))
|
||||||
{
|
{
|
||||||
cmSystemTools::ExpandListArgument(implicitLibs, implicitLibVec);
|
cmSystemTools::ExpandListArgument(implicitLibs, implicitLibVec);
|
||||||
}
|
}
|
||||||
@ -1978,11 +1978,11 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
|
|||||||
{
|
{
|
||||||
std::string useVar = "CMAKE_" + *li +
|
std::string useVar = "CMAKE_" + *li +
|
||||||
"_USE_IMPLICIT_LINK_DIRECTORIES_IN_RUNTIME_PATH";
|
"_USE_IMPLICIT_LINK_DIRECTORIES_IN_RUNTIME_PATH";
|
||||||
if(this->Makefile->IsOn(useVar.c_str()))
|
if(this->Makefile->IsOn(useVar))
|
||||||
{
|
{
|
||||||
std::string dirVar = "CMAKE_" + *li +
|
std::string dirVar = "CMAKE_" + *li +
|
||||||
"_IMPLICIT_LINK_DIRECTORIES";
|
"_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);
|
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.
|
// Don't emit the same library twice for this target.
|
||||||
if(emitted.insert(*lib).second)
|
if(emitted.insert(*lib).second)
|
||||||
{
|
{
|
||||||
this->AddTargetDepend(depender_index, lib->c_str(), true);
|
this->AddTargetDepend(depender_index, *lib, true);
|
||||||
this->AddInterfaceDepends(depender_index, lib->c_str(),
|
this->AddInterfaceDepends(depender_index, *lib,
|
||||||
true, emitted);
|
true, emitted);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -235,7 +235,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
|
|||||||
it != configs.end(); ++it)
|
it != configs.end(); ++it)
|
||||||
{
|
{
|
||||||
std::vector<std::string> tlibs;
|
std::vector<std::string> tlibs;
|
||||||
depender->GetDirectLinkLibraries(it->c_str(), tlibs, depender);
|
depender->GetDirectLinkLibraries(*it, tlibs, depender);
|
||||||
|
|
||||||
// A target should not depend on itself.
|
// A target should not depend on itself.
|
||||||
emitted.insert(depender->GetName());
|
emitted.insert(depender->GetName());
|
||||||
@ -245,8 +245,8 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
|
|||||||
// Don't emit the same library twice for this target.
|
// Don't emit the same library twice for this target.
|
||||||
if(emitted.insert(*lib).second)
|
if(emitted.insert(*lib).second)
|
||||||
{
|
{
|
||||||
this->AddTargetDepend(depender_index, lib->c_str(), true);
|
this->AddTargetDepend(depender_index, *lib, true);
|
||||||
this->AddInterfaceDepends(depender_index, lib->c_str(),
|
this->AddInterfaceDepends(depender_index, *lib,
|
||||||
true, emitted);
|
true, emitted);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -265,7 +265,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
|
|||||||
// Don't emit the same utility twice for this target.
|
// Don't emit the same utility twice for this target.
|
||||||
if(emitted.insert(*util).second)
|
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.
|
// Don't emit the same library twice for this target.
|
||||||
if(emitted.insert(*lib).second)
|
if(emitted.insert(*lib).second)
|
||||||
{
|
{
|
||||||
this->AddTargetDepend(depender_index, lib->c_str(), true);
|
this->AddTargetDepend(depender_index, *lib, true);
|
||||||
this->AddInterfaceDepends(depender_index, lib->c_str(),
|
this->AddInterfaceDepends(depender_index, *lib,
|
||||||
true, emitted);
|
true, emitted);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -326,7 +326,7 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
|
|||||||
// A target should not depend on itself.
|
// A target should not depend on itself.
|
||||||
emitted.insert(depender->GetName());
|
emitted.insert(depender->GetName());
|
||||||
this->AddInterfaceDepends(depender_index, dependee,
|
this->AddInterfaceDepends(depender_index, dependee,
|
||||||
it->c_str(), emitted);
|
*it, emitted);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ bool cmConfigureFileCommand
|
|||||||
e << "input location\n"
|
e << "input location\n"
|
||||||
<< " " << this->InputFile << "\n"
|
<< " " << this->InputFile << "\n"
|
||||||
<< "is a directory but a file was expected.";
|
<< "is a directory but a file was expected.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,14 +61,14 @@ bool cmConfigureFileCommand
|
|||||||
{
|
{
|
||||||
std::string e = "attempted to configure a file: " + this->OutputFile
|
std::string e = "attempted to configure a file: " + this->OutputFile
|
||||||
+ " into a source directory.";
|
+ " into a source directory.";
|
||||||
this->SetError(e.c_str());
|
this->SetError(e);
|
||||||
cmSystemTools::SetFatalErrorOccured();
|
cmSystemTools::SetFatalErrorOccured();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
std::string errorMessage;
|
std::string errorMessage;
|
||||||
if (!this->NewLineStyle.ReadFromArguments(args, errorMessage))
|
if (!this->NewLineStyle.ReadFromArguments(args, errorMessage))
|
||||||
{
|
{
|
||||||
this->SetError(errorMessage.c_str());
|
this->SetError(errorMessage);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this->CopyOnly = false;
|
this->CopyOnly = false;
|
||||||
|
@ -284,7 +284,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "Failed to open\n"
|
e << "Failed to open\n"
|
||||||
<< " " << outFileName.c_str() << "\n"
|
<< " " << outFileName << "\n"
|
||||||
<< cmSystemTools::GetLastSystemError();
|
<< cmSystemTools::GetLastSystemError();
|
||||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
|
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
|
||||||
return -1;
|
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 rulesOverrideBase = "CMAKE_USER_MAKE_RULES_OVERRIDE";
|
||||||
std::string rulesOverrideLang = rulesOverrideBase + "_" + *li;
|
std::string rulesOverrideLang = rulesOverrideBase + "_" + *li;
|
||||||
if(const char* rulesOverridePath =
|
if(const char* rulesOverridePath =
|
||||||
this->Makefile->GetDefinition(rulesOverrideLang.c_str()))
|
this->Makefile->GetDefinition(rulesOverrideLang))
|
||||||
{
|
{
|
||||||
fprintf(fout, "set(%s \"%s\")\n",
|
fprintf(fout, "set(%s \"%s\")\n",
|
||||||
rulesOverrideLang.c_str(), rulesOverridePath);
|
rulesOverrideLang.c_str(), rulesOverridePath);
|
||||||
}
|
}
|
||||||
else if(const char* rulesOverridePath2 =
|
else if(const char* rulesOverridePath2 =
|
||||||
this->Makefile->GetDefinition(rulesOverrideBase.c_str()))
|
this->Makefile->GetDefinition(rulesOverrideBase))
|
||||||
{
|
{
|
||||||
fprintf(fout, "set(%s \"%s\")\n",
|
fprintf(fout, "set(%s \"%s\")\n",
|
||||||
rulesOverrideBase.c_str(), rulesOverridePath2);
|
rulesOverrideBase.c_str(), rulesOverridePath2);
|
||||||
@ -325,7 +325,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
|
|||||||
li != testLangs.end(); ++li)
|
li != testLangs.end(); ++li)
|
||||||
{
|
{
|
||||||
std::string langFlags = "CMAKE_" + *li + "_FLAGS";
|
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(),
|
fprintf(fout, "set(CMAKE_%s_FLAGS %s)\n", li->c_str(),
|
||||||
lg->EscapeForCMake(flags?flags:"").c_str());
|
lg->EscapeForCMake(flags?flags:"").c_str());
|
||||||
fprintf(fout, "set(CMAKE_%s_FLAGS \"${CMAKE_%s_FLAGS}"
|
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;
|
std::string output;
|
||||||
// actually do the try compile now that everything is setup
|
// actually do the try compile now that everything is setup
|
||||||
int res = this->Makefile->TryCompile(sourceDirectory,
|
int res = this->Makefile->TryCompile(sourceDirectory,
|
||||||
this->BinaryDirectory.c_str(),
|
this->BinaryDirectory,
|
||||||
projectName,
|
projectName,
|
||||||
targetName,
|
targetName,
|
||||||
this->SrcFileSignature,
|
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
|
// 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"),
|
(res == 0 ? "TRUE" : "FALSE"),
|
||||||
"Result of TRY_COMPILE",
|
"Result of TRY_COMPILE",
|
||||||
cmCacheManager::INTERNAL);
|
cmCacheManager::INTERNAL);
|
||||||
|
|
||||||
if ( outputVariable.size() > 0 )
|
if ( outputVariable.size() > 0 )
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(outputVariable.c_str(), output.c_str());
|
this->Makefile->AddDefinition(outputVariable, output.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->SrcFileSignature)
|
if (this->SrcFileSignature)
|
||||||
@ -519,9 +519,9 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
|
|||||||
{
|
{
|
||||||
cmOStringStream emsg;
|
cmOStringStream emsg;
|
||||||
emsg << "Cannot copy output executable\n"
|
emsg << "Cannot copy output executable\n"
|
||||||
<< " '" << this->OutputFile.c_str() << "'\n"
|
<< " '" << this->OutputFile << "'\n"
|
||||||
<< "to destination specified by COPY_FILE:\n"
|
<< "to destination specified by COPY_FILE:\n"
|
||||||
<< " '" << copyFile.c_str() << "'\n";
|
<< " '" << copyFile << "'\n";
|
||||||
if(!this->FindErrorMessage.empty())
|
if(!this->FindErrorMessage.empty())
|
||||||
{
|
{
|
||||||
emsg << this->FindErrorMessage.c_str();
|
emsg << this->FindErrorMessage.c_str();
|
||||||
@ -540,7 +540,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
|
|||||||
|
|
||||||
if(!copyFileError.empty())
|
if(!copyFileError.empty())
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(copyFileError.c_str(),
|
this->Makefile->AddDefinition(copyFileError,
|
||||||
copyFileErrorMessage.c_str());
|
copyFileErrorMessage.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,13 +169,13 @@ bool cmCreateTestSourceList
|
|||||||
// Construct the source list.
|
// Construct the source list.
|
||||||
std::string sourceListValue;
|
std::string sourceListValue;
|
||||||
{
|
{
|
||||||
cmSourceFile* sf = this->Makefile->GetOrCreateSource(driver.c_str());
|
cmSourceFile* sf = this->Makefile->GetOrCreateSource(driver);
|
||||||
sf->SetProperty("ABSTRACT","0");
|
sf->SetProperty("ABSTRACT","0");
|
||||||
sourceListValue = args[1];
|
sourceListValue = args[1];
|
||||||
}
|
}
|
||||||
for(i = testsBegin; i != tests.end(); ++i)
|
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");
|
sf->SetProperty("ABSTRACT","0");
|
||||||
sourceListValue += ";";
|
sourceListValue += ";";
|
||||||
sourceListValue += *i;
|
sourceListValue += *i;
|
||||||
|
@ -63,11 +63,11 @@ cmCustomCommandGenerator
|
|||||||
cmd += " ";
|
cmd += " ";
|
||||||
if(this->OldStyle)
|
if(this->OldStyle)
|
||||||
{
|
{
|
||||||
cmd += this->LG->EscapeForShellOldStyle(arg.c_str());
|
cmd += this->LG->EscapeForShellOldStyle(arg);
|
||||||
}
|
}
|
||||||
else
|
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 "
|
<< "Valid scopes are "
|
||||||
<< "GLOBAL, DIRECTORY, TARGET, SOURCE, "
|
<< "GLOBAL, DIRECTORY, TARGET, SOURCE, "
|
||||||
<< "TEST, VARIABLE, CACHED_VARIABLE.";
|
<< "TEST, VARIABLE, CACHED_VARIABLE.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ bool cmDefinePropertyCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "given invalid argument \"" << args[i] << "\".";
|
e << "given invalid argument \"" << args[i] << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -128,7 +128,7 @@ bool cmDefinePropertyCommand
|
|||||||
|
|
||||||
// Actually define the property.
|
// Actually define the property.
|
||||||
this->Makefile->GetCMakeInstance()->DefineProperty
|
this->Makefile->GetCMakeInstance()->DefineProperty
|
||||||
(this->PropertyName.c_str(), scope,
|
(this->PropertyName, scope,
|
||||||
this->BriefDocs.c_str(), this->FullDocs.c_str(), inherited);
|
this->BriefDocs.c_str(), this->FullDocs.c_str(), inherited);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -47,7 +47,7 @@ bool cmDepends::Write(std::ostream &makeDepends,
|
|||||||
std::string srcLang = "CMAKE_DEPENDS_CHECK_";
|
std::string srcLang = "CMAKE_DEPENDS_CHECK_";
|
||||||
srcLang += this->Language;
|
srcLang += this->Language;
|
||||||
cmMakefile* mf = this->LocalGenerator->GetMakefile();
|
cmMakefile* mf = this->LocalGenerator->GetMakefile();
|
||||||
const char* srcStr = mf->GetSafeDefinition(srcLang.c_str());
|
const char* srcStr = mf->GetSafeDefinition(srcLang);
|
||||||
std::vector<std::string> pairs;
|
std::vector<std::string> pairs;
|
||||||
cmSystemTools::ExpandListArgument(srcStr, pairs);
|
cmSystemTools::ExpandListArgument(srcStr, pairs);
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ bool cmDepends::Write(std::ostream &makeDepends,
|
|||||||
std::string obj = *si++;
|
std::string obj = *si++;
|
||||||
|
|
||||||
// Make sure the object file is relative to the top of the build tree.
|
// 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::HOME_OUTPUT,
|
||||||
cmLocalGenerator::MAKEFILE);
|
cmLocalGenerator::MAKEFILE);
|
||||||
dependencies[obj].insert(src);
|
dependencies[obj].insert(src);
|
||||||
@ -305,7 +305,7 @@ void cmDepends::SetIncludePathFromLanguage(const std::string& lang)
|
|||||||
includePathVar += lang;
|
includePathVar += lang;
|
||||||
includePathVar += "_TARGET_INCLUDE_PATH";
|
includePathVar += "_TARGET_INCLUDE_PATH";
|
||||||
cmMakefile* mf = this->LocalGenerator->GetMakefile();
|
cmMakefile* mf = this->LocalGenerator->GetMakefile();
|
||||||
includePath = mf->GetDefinition(includePathVar.c_str());
|
includePath = mf->GetDefinition(includePathVar);
|
||||||
if(includePath)
|
if(includePath)
|
||||||
{
|
{
|
||||||
cmSystemTools::ExpandListArgument(includePath, this->IncludePath);
|
cmSystemTools::ExpandListArgument(includePath, this->IncludePath);
|
||||||
@ -316,7 +316,7 @@ void cmDepends::SetIncludePathFromLanguage(const std::string& lang)
|
|||||||
includePathVar = "CMAKE_";
|
includePathVar = "CMAKE_";
|
||||||
includePathVar += lang;
|
includePathVar += lang;
|
||||||
includePathVar += "_INCLUDE_PATH";
|
includePathVar += "_INCLUDE_PATH";
|
||||||
includePath = mf->GetDefinition(includePathVar.c_str());
|
includePath = mf->GetDefinition(includePathVar);
|
||||||
if(includePath)
|
if(includePath)
|
||||||
{
|
{
|
||||||
cmSystemTools::ExpandListArgument(includePath, this->IncludePath);
|
cmSystemTools::ExpandListArgument(includePath, this->IncludePath);
|
||||||
|
@ -54,14 +54,14 @@ cmDependsC::cmDependsC(cmLocalGenerator* lg,
|
|||||||
std::string scanRegexVar = "CMAKE_";
|
std::string scanRegexVar = "CMAKE_";
|
||||||
scanRegexVar += lang;
|
scanRegexVar += lang;
|
||||||
scanRegexVar += "_INCLUDE_REGEX_SCAN";
|
scanRegexVar += "_INCLUDE_REGEX_SCAN";
|
||||||
if(const char* sr = mf->GetDefinition(scanRegexVar.c_str()))
|
if(const char* sr = mf->GetDefinition(scanRegexVar))
|
||||||
{
|
{
|
||||||
scanRegex = sr;
|
scanRegex = sr;
|
||||||
}
|
}
|
||||||
std::string complainRegexVar = "CMAKE_";
|
std::string complainRegexVar = "CMAKE_";
|
||||||
complainRegexVar += lang;
|
complainRegexVar += lang;
|
||||||
complainRegexVar += "_INCLUDE_REGEX_COMPLAIN";
|
complainRegexVar += "_INCLUDE_REGEX_COMPLAIN";
|
||||||
if(const char* cr = mf->GetDefinition(complainRegexVar.c_str()))
|
if(const char* cr = mf->GetDefinition(complainRegexVar))
|
||||||
{
|
{
|
||||||
complainRegex = cr;
|
complainRegex = cr;
|
||||||
}
|
}
|
||||||
@ -274,11 +274,11 @@ bool cmDependsC::WriteDependencies(const std::set<std::string>& sources,
|
|||||||
i != dependencies.end(); ++i)
|
i != dependencies.end(); ++i)
|
||||||
{
|
{
|
||||||
makeDepends << obj << ": " <<
|
makeDepends << obj << ": " <<
|
||||||
this->LocalGenerator->Convert(i->c_str(),
|
this->LocalGenerator->Convert(*i,
|
||||||
cmLocalGenerator::HOME_OUTPUT,
|
cmLocalGenerator::HOME_OUTPUT,
|
||||||
cmLocalGenerator::MAKEFILE)
|
cmLocalGenerator::MAKEFILE)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
internalDepends << " " << i->c_str() << std::endl;
|
internalDepends << " " << *i << std::endl;
|
||||||
}
|
}
|
||||||
makeDepends << std::endl;
|
makeDepends << std::endl;
|
||||||
|
|
||||||
|
@ -292,15 +292,15 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends,
|
|||||||
stamp += ".mod.stamp";
|
stamp += ".mod.stamp";
|
||||||
fcStream << "\n";
|
fcStream << "\n";
|
||||||
fcStream << " \"" <<
|
fcStream << " \"" <<
|
||||||
this->LocalGenerator->Convert(mod_lower.c_str(),
|
this->LocalGenerator->Convert(mod_lower,
|
||||||
cmLocalGenerator::START_OUTPUT)
|
cmLocalGenerator::START_OUTPUT)
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
fcStream << " \"" <<
|
fcStream << " \"" <<
|
||||||
this->LocalGenerator->Convert(mod_upper.c_str(),
|
this->LocalGenerator->Convert(mod_upper,
|
||||||
cmLocalGenerator::START_OUTPUT)
|
cmLocalGenerator::START_OUTPUT)
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
fcStream << " \"" <<
|
fcStream << " \"" <<
|
||||||
this->LocalGenerator->Convert(stamp.c_str(),
|
this->LocalGenerator->Convert(stamp,
|
||||||
cmLocalGenerator::START_OUTPUT)
|
cmLocalGenerator::START_OUTPUT)
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
}
|
}
|
||||||
@ -449,11 +449,11 @@ cmDependsFortran
|
|||||||
i != info.Includes.end(); ++i)
|
i != info.Includes.end(); ++i)
|
||||||
{
|
{
|
||||||
makeDepends << obj << ": " <<
|
makeDepends << obj << ": " <<
|
||||||
this->LocalGenerator->Convert(i->c_str(),
|
this->LocalGenerator->Convert(*i,
|
||||||
cmLocalGenerator::HOME_OUTPUT,
|
cmLocalGenerator::HOME_OUTPUT,
|
||||||
cmLocalGenerator::MAKEFILE)
|
cmLocalGenerator::MAKEFILE)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
internalDepends << " " << i->c_str() << std::endl;
|
internalDepends << " " << *i << std::endl;
|
||||||
}
|
}
|
||||||
makeDepends << std::endl;
|
makeDepends << std::endl;
|
||||||
|
|
||||||
@ -480,7 +480,7 @@ cmDependsFortran
|
|||||||
proxy += "/";
|
proxy += "/";
|
||||||
proxy += *i;
|
proxy += *i;
|
||||||
proxy += ".mod.proxy";
|
proxy += ".mod.proxy";
|
||||||
proxy = this->LocalGenerator->Convert(proxy.c_str(),
|
proxy = this->LocalGenerator->Convert(proxy,
|
||||||
cmLocalGenerator::HOME_OUTPUT,
|
cmLocalGenerator::HOME_OUTPUT,
|
||||||
cmLocalGenerator::MAKEFILE);
|
cmLocalGenerator::MAKEFILE);
|
||||||
|
|
||||||
@ -497,7 +497,7 @@ cmDependsFortran
|
|||||||
{
|
{
|
||||||
// This module is known. Depend on its timestamp file.
|
// This module is known. Depend on its timestamp file.
|
||||||
std::string stampFile =
|
std::string stampFile =
|
||||||
this->LocalGenerator->Convert(required->second.c_str(),
|
this->LocalGenerator->Convert(required->second,
|
||||||
cmLocalGenerator::HOME_OUTPUT,
|
cmLocalGenerator::HOME_OUTPUT,
|
||||||
cmLocalGenerator::MAKEFILE);
|
cmLocalGenerator::MAKEFILE);
|
||||||
makeDepends << obj << ": " << stampFile << "\n";
|
makeDepends << obj << ": " << stampFile << "\n";
|
||||||
@ -510,7 +510,7 @@ cmDependsFortran
|
|||||||
if(this->FindModule(*i, module))
|
if(this->FindModule(*i, module))
|
||||||
{
|
{
|
||||||
module =
|
module =
|
||||||
this->LocalGenerator->Convert(module.c_str(),
|
this->LocalGenerator->Convert(module,
|
||||||
cmLocalGenerator::HOME_OUTPUT,
|
cmLocalGenerator::HOME_OUTPUT,
|
||||||
cmLocalGenerator::MAKEFILE);
|
cmLocalGenerator::MAKEFILE);
|
||||||
makeDepends << obj << ": " << module << "\n";
|
makeDepends << obj << ": " << module << "\n";
|
||||||
@ -526,7 +526,7 @@ cmDependsFortran
|
|||||||
proxy += "/";
|
proxy += "/";
|
||||||
proxy += *i;
|
proxy += *i;
|
||||||
proxy += ".mod.proxy";
|
proxy += ".mod.proxy";
|
||||||
proxy = this->LocalGenerator->Convert(proxy.c_str(),
|
proxy = this->LocalGenerator->Convert(proxy,
|
||||||
cmLocalGenerator::HOME_OUTPUT,
|
cmLocalGenerator::HOME_OUTPUT,
|
||||||
cmLocalGenerator::MAKEFILE);
|
cmLocalGenerator::MAKEFILE);
|
||||||
makeDepends << proxy << ": " << obj << ".provides" << std::endl;
|
makeDepends << proxy << ": " << obj << ".provides" << std::endl;
|
||||||
@ -552,7 +552,7 @@ cmDependsFortran
|
|||||||
modFile += "/";
|
modFile += "/";
|
||||||
modFile += *i;
|
modFile += *i;
|
||||||
modFile =
|
modFile =
|
||||||
this->LocalGenerator->Convert(modFile.c_str(),
|
this->LocalGenerator->Convert(modFile,
|
||||||
cmLocalGenerator::HOME_OUTPUT,
|
cmLocalGenerator::HOME_OUTPUT,
|
||||||
cmLocalGenerator::SHELL);
|
cmLocalGenerator::SHELL);
|
||||||
std::string stampFile = stamp_dir;
|
std::string stampFile = stamp_dir;
|
||||||
@ -560,7 +560,7 @@ cmDependsFortran
|
|||||||
stampFile += m;
|
stampFile += m;
|
||||||
stampFile += ".mod.stamp";
|
stampFile += ".mod.stamp";
|
||||||
stampFile =
|
stampFile =
|
||||||
this->LocalGenerator->Convert(stampFile.c_str(),
|
this->LocalGenerator->Convert(stampFile,
|
||||||
cmLocalGenerator::HOME_OUTPUT,
|
cmLocalGenerator::HOME_OUTPUT,
|
||||||
cmLocalGenerator::SHELL);
|
cmLocalGenerator::SHELL);
|
||||||
makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod "
|
makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod "
|
||||||
@ -582,7 +582,7 @@ cmDependsFortran
|
|||||||
// the target finishes building.
|
// the target finishes building.
|
||||||
std::string driver = this->TargetDirectory;
|
std::string driver = this->TargetDirectory;
|
||||||
driver += "/build";
|
driver += "/build";
|
||||||
driver = this->LocalGenerator->Convert(driver.c_str(),
|
driver = this->LocalGenerator->Convert(driver,
|
||||||
cmLocalGenerator::HOME_OUTPUT,
|
cmLocalGenerator::HOME_OUTPUT,
|
||||||
cmLocalGenerator::MAKEFILE);
|
cmLocalGenerator::MAKEFILE);
|
||||||
makeDepends << driver << ": " << obj << ".provides.build\n";
|
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()))
|
if(!cmSystemTools::CopyFileAlways(mod_upper.c_str(), stamp.c_str()))
|
||||||
{
|
{
|
||||||
std::cerr << "Error copying Fortran module from \""
|
std::cerr << "Error copying Fortran module from \""
|
||||||
<< mod_upper.c_str() << "\" to \"" << stamp.c_str()
|
<< mod_upper << "\" to \"" << stamp
|
||||||
<< "\".\n";
|
<< "\".\n";
|
||||||
return false;
|
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()))
|
if(!cmSystemTools::CopyFileAlways(mod_lower.c_str(), stamp.c_str()))
|
||||||
{
|
{
|
||||||
std::cerr << "Error copying Fortran module from \""
|
std::cerr << "Error copying Fortran module from \""
|
||||||
<< mod_lower.c_str() << "\" to \"" << stamp.c_str()
|
<< mod_lower << "\" to \"" << stamp
|
||||||
<< "\".\n";
|
<< "\".\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -689,9 +689,9 @@ bool cmDependsFortran::CopyModule(const std::vector<std::string>& args)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cerr << "Error copying Fortran module \"" << args[2].c_str()
|
std::cerr << "Error copying Fortran module \"" << args[2]
|
||||||
<< "\". Tried \"" << mod_upper.c_str()
|
<< "\". Tried \"" << mod_upper
|
||||||
<< "\" and \"" << mod_lower.c_str() << "\".\n";
|
<< "\" and \"" << mod_lower << "\".\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ void cmDependsJavaParserHelper::PrintClasses()
|
|||||||
sit != files.end();
|
sit != files.end();
|
||||||
++ sit )
|
++ 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 )
|
if ( this->CurrentPackage.size() > 0 )
|
||||||
{
|
{
|
||||||
std::cout << "Current package is: " <<
|
std::cout << "Current package is: " <<
|
||||||
this->CurrentPackage.c_str() << std::endl;
|
this->CurrentPackage << std::endl;
|
||||||
}
|
}
|
||||||
std::cout << "Imports packages:";
|
std::cout << "Imports packages:";
|
||||||
if ( this->PackagesImport.size() > 0 )
|
if ( this->PackagesImport.size() > 0 )
|
||||||
@ -318,7 +318,7 @@ int cmDependsJavaParserHelper::ParseString(const char* str, int verb)
|
|||||||
it != this->PackagesImport.end();
|
it != this->PackagesImport.end();
|
||||||
++ it )
|
++ it )
|
||||||
{
|
{
|
||||||
std::cout << " " << it->c_str();
|
std::cout << " " << *it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
@ -330,7 +330,7 @@ int cmDependsJavaParserHelper::ParseString(const char* str, int verb)
|
|||||||
it != this->ClassesFound.end();
|
it != this->ClassesFound.end();
|
||||||
++ it )
|
++ it )
|
||||||
{
|
{
|
||||||
std::cout << " " << it->c_str();
|
std::cout << " " << *it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
@ -672,7 +672,7 @@ bool cmDocumentation::PrintFiles(std::ostream& os,
|
|||||||
for (std::vector<std::string>::const_iterator i = files.begin();
|
for (std::vector<std::string>::const_iterator i = files.begin();
|
||||||
i != files.end(); ++i)
|
i != files.end(); ++i)
|
||||||
{
|
{
|
||||||
found = r.ProcessFile(i->c_str()) || found;
|
found = r.ProcessFile(*i) || found;
|
||||||
}
|
}
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
@ -693,7 +693,7 @@ bool cmDocumentation::PrintHelpOneManual(std::ostream& os)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Argument was not a manual. Complain.
|
// Argument was not a manual. Complain.
|
||||||
os << "Argument \"" << this->CurrentArgument.c_str()
|
os << "Argument \"" << this->CurrentArgument
|
||||||
<< "\" to --help-manual is not an available manual. "
|
<< "\" to --help-manual is not an available manual. "
|
||||||
<< "Use --help-manual-list to see all available manuals.\n";
|
<< "Use --help-manual-list to see all available manuals.\n";
|
||||||
return false;
|
return false;
|
||||||
@ -715,7 +715,7 @@ bool cmDocumentation::PrintHelpOneCommand(std::ostream& os)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Argument was not a command. Complain.
|
// Argument was not a command. Complain.
|
||||||
os << "Argument \"" << this->CurrentArgument.c_str()
|
os << "Argument \"" << this->CurrentArgument
|
||||||
<< "\" to --help-command is not a CMake command. "
|
<< "\" to --help-command is not a CMake command. "
|
||||||
<< "Use --help-command-list to see all commands.\n";
|
<< "Use --help-command-list to see all commands.\n";
|
||||||
return false;
|
return false;
|
||||||
@ -737,7 +737,7 @@ bool cmDocumentation::PrintHelpOneModule(std::ostream& os)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Argument was not a module. Complain.
|
// 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";
|
<< "\" to --help-module is not a CMake module.\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -772,7 +772,7 @@ bool cmDocumentation::PrintHelpOneProperty(std::ostream& os)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Argument was not a property. Complain.
|
// Argument was not a property. Complain.
|
||||||
os << "Argument \"" << this->CurrentArgument.c_str()
|
os << "Argument \"" << this->CurrentArgument
|
||||||
<< "\" to --help-property is not a CMake property. "
|
<< "\" to --help-property is not a CMake property. "
|
||||||
<< "Use --help-property-list to see all properties.\n";
|
<< "Use --help-property-list to see all properties.\n";
|
||||||
return false;
|
return false;
|
||||||
@ -796,7 +796,7 @@ bool cmDocumentation::PrintHelpOnePolicy(std::ostream& os)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Argument was not a policy. Complain.
|
// 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";
|
<< "\" to --help-policy is not a CMake policy.\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -817,7 +817,7 @@ bool cmDocumentation::PrintHelpOneVariable(std::ostream& os)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Argument was not a variable. Complain.
|
// Argument was not a variable. Complain.
|
||||||
os << "Argument \"" << this->CurrentArgument.c_str()
|
os << "Argument \"" << this->CurrentArgument
|
||||||
<< "\" to --help-variable is not a defined variable. "
|
<< "\" to --help-variable is not a defined variable. "
|
||||||
<< "Use --help-variable-list to see all defined variables.\n";
|
<< "Use --help-variable-list to see all defined variables.\n";
|
||||||
return false;
|
return false;
|
||||||
|
@ -132,14 +132,14 @@ bool cmExecProgramCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string coutput = std::string(output, first, last-first+1);
|
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 )
|
if ( return_variable.size() > 0 )
|
||||||
{
|
{
|
||||||
char buffer[100];
|
char buffer[100];
|
||||||
sprintf(buffer, "%d", retVal);
|
sprintf(buffer, "%d", retVal);
|
||||||
this->Makefile->AddDefinition(return_variable.c_str(), buffer);
|
this->Makefile->AddDefinition(return_variable, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -191,7 +191,7 @@ bool cmExecuteProcessCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << " given unknown argument \"" << args[i] << "\".";
|
e << " given unknown argument \"" << args[i] << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -200,7 +200,7 @@ bool cmExecuteProcessCommand
|
|||||||
{
|
{
|
||||||
std::string e = "attempted to output into a file: " + output_file
|
std::string e = "attempted to output into a file: " + output_file
|
||||||
+ " into a source directory.";
|
+ " into a source directory.";
|
||||||
this->SetError(e.c_str());
|
this->SetError(e);
|
||||||
cmSystemTools::SetFatalErrorOccured();
|
cmSystemTools::SetFatalErrorOccured();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -326,12 +326,12 @@ bool cmExecuteProcessCommand
|
|||||||
// Store the output obtained.
|
// Store the output obtained.
|
||||||
if(!output_variable.empty() && tempOutput.size())
|
if(!output_variable.empty() && tempOutput.size())
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(output_variable.c_str(),
|
this->Makefile->AddDefinition(output_variable,
|
||||||
&*tempOutput.begin());
|
&*tempOutput.begin());
|
||||||
}
|
}
|
||||||
if(!merge_output && !error_variable.empty() && tempError.size())
|
if(!merge_output && !error_variable.empty() && tempError.size())
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(error_variable.c_str(),
|
this->Makefile->AddDefinition(error_variable,
|
||||||
&*tempError.begin());
|
&*tempError.begin());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -345,19 +345,19 @@ bool cmExecuteProcessCommand
|
|||||||
int v = cmsysProcess_GetExitValue(cp);
|
int v = cmsysProcess_GetExitValue(cp);
|
||||||
char buf[100];
|
char buf[100];
|
||||||
sprintf(buf, "%d", v);
|
sprintf(buf, "%d", v);
|
||||||
this->Makefile->AddDefinition(result_variable.c_str(), buf);
|
this->Makefile->AddDefinition(result_variable, buf);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case cmsysProcess_State_Exception:
|
case cmsysProcess_State_Exception:
|
||||||
this->Makefile->AddDefinition(result_variable.c_str(),
|
this->Makefile->AddDefinition(result_variable,
|
||||||
cmsysProcess_GetExceptionString(cp));
|
cmsysProcess_GetExceptionString(cp));
|
||||||
break;
|
break;
|
||||||
case cmsysProcess_State_Error:
|
case cmsysProcess_State_Error:
|
||||||
this->Makefile->AddDefinition(result_variable.c_str(),
|
this->Makefile->AddDefinition(result_variable,
|
||||||
cmsysProcess_GetErrorString(cp));
|
cmsysProcess_GetErrorString(cp));
|
||||||
break;
|
break;
|
||||||
case cmsysProcess_State_Expired:
|
case cmsysProcess_State_Expired:
|
||||||
this->Makefile->AddDefinition(result_variable.c_str(),
|
this->Makefile->AddDefinition(result_variable,
|
||||||
"Process terminated due to timeout");
|
"Process terminated due to timeout");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "given target \"" << te->GetName() << "\" more than once.";
|
e << "given target \"" << te->GetName() << "\" more than once.";
|
||||||
this->Makefile->GetCMakeInstance()
|
this->Makefile->GetCMakeInstance()
|
||||||
->IssueMessage(cmake::FATAL_ERROR, e.str().c_str(), this->Backtrace);
|
->IssueMessage(cmake::FATAL_ERROR, e.str(), this->Backtrace);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (te->GetType() == cmTarget::INTERFACE_LIBRARY)
|
if (te->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||||
@ -106,7 +106,7 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
|
|||||||
ci = this->Configurations.begin();
|
ci = this->Configurations.begin();
|
||||||
ci != this->Configurations.end(); ++ci)
|
ci != this->Configurations.end(); ++ci)
|
||||||
{
|
{
|
||||||
this->GenerateImportConfig(os, ci->c_str(), missingTargets);
|
this->GenerateImportConfig(os, *ci, missingTargets);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->GenerateMissingTargetsCheckCode(os, missingTargets);
|
this->GenerateMissingTargetsCheckCode(os, missingTargets);
|
||||||
@ -315,7 +315,7 @@ cmExportBuildFileGenerator
|
|||||||
<< "consider using the APPEND option with multiple separate calls.";
|
<< "consider using the APPEND option with multiple separate calls.";
|
||||||
|
|
||||||
this->Makefile->GetCMakeInstance()
|
this->Makefile->GetCMakeInstance()
|
||||||
->IssueMessage(cmake::FATAL_ERROR, e.str().c_str(), this->Backtrace);
|
->IssueMessage(cmake::FATAL_ERROR, e.str(), this->Backtrace);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
@ -328,7 +328,7 @@ cmExportBuildFileGenerator::InstallNameDir(cmTarget* target,
|
|||||||
if(mf->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME"))
|
if(mf->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME"))
|
||||||
{
|
{
|
||||||
install_name_dir =
|
install_name_dir =
|
||||||
target->GetInstallNameDirForBuildTree(config.c_str());
|
target->GetInstallNameDirForBuildTree(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
return install_name_dir;
|
return install_name_dir;
|
||||||
|
@ -92,7 +92,7 @@ bool cmExportCommand
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "FILE option given filename \"" << this->Filename.GetString()
|
e << "FILE option given filename \"" << this->Filename.GetString()
|
||||||
<< "\" which does not have an extension of \".cmake\".\n";
|
<< "\" which does not have an extension of \".cmake\".\n";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
fname = this->Filename.GetString();
|
fname = this->Filename.GetString();
|
||||||
@ -106,7 +106,7 @@ bool cmExportCommand
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "FILE option given filename \"" << fname
|
e << "FILE option given filename \"" << fname
|
||||||
<< "\" which is in the source tree.\n";
|
<< "\" which is in the source tree.\n";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -128,7 +128,7 @@ bool cmExportCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "EXPORT signature does not recognise the APPEND option.";
|
e << "EXPORT signature does not recognise the APPEND option.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ bool cmExportCommand
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "EXPORT signature does not recognise the "
|
e << "EXPORT signature does not recognise the "
|
||||||
"EXPORT_LINK_INTERFACE_LIBRARIES option.";
|
"EXPORT_LINK_INTERFACE_LIBRARIES option.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ bool cmExportCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "Export set \"" << setName << "\" not found.";
|
e << "Export set \"" << setName << "\" not found.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this->ExportSet = setMap[setName];
|
this->ExportSet = setMap[setName];
|
||||||
@ -164,18 +164,18 @@ bool cmExportCommand
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "given ALIAS target \"" << *currentTarget
|
e << "given ALIAS target \"" << *currentTarget
|
||||||
<< "\" which may not be exported.";
|
<< "\" which may not be exported.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cmTarget* target = gg->FindTarget(currentTarget->c_str()))
|
if(cmTarget* target = gg->FindTarget(*currentTarget))
|
||||||
{
|
{
|
||||||
if(target->GetType() == cmTarget::OBJECT_LIBRARY)
|
if(target->GetType() == cmTarget::OBJECT_LIBRARY)
|
||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "given OBJECT library \"" << *currentTarget
|
e << "given OBJECT library \"" << *currentTarget
|
||||||
<< "\" which may not be exported.";
|
<< "\" which may not be exported.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -184,7 +184,7 @@ bool cmExportCommand
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "given target \"" << *currentTarget
|
e << "given target \"" << *currentTarget
|
||||||
<< "\" which is not built by this project.";
|
<< "\" which is not built by this project.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
targets.push_back(*currentTarget);
|
targets.push_back(*currentTarget);
|
||||||
@ -229,7 +229,7 @@ bool cmExportCommand
|
|||||||
ci = configurationTypes.begin();
|
ci = configurationTypes.begin();
|
||||||
ci != configurationTypes.end(); ++ci)
|
ci != configurationTypes.end(); ++ci)
|
||||||
{
|
{
|
||||||
ebfg->AddConfiguration(ci->c_str());
|
ebfg->AddConfiguration(*ci);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -266,7 +266,7 @@ bool cmExportCommand::HandlePackage(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "PACKAGE given unknown argument: " << args[i];
|
e << "PACKAGE given unknown argument: " << args[i];
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -284,7 +284,7 @@ bool cmExportCommand::HandlePackage(std::vector<std::string> const& args)
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "PACKAGE given invalid package name \"" << package << "\". "
|
e << "PACKAGE given invalid package name \"" << package << "\". "
|
||||||
<< "Package names must match \"" << packageExpr << "\".";
|
<< "Package names must match \"" << packageExpr << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ static bool checkInterfaceDirs(const std::string &prepro,
|
|||||||
e << "Target \"" << target->GetName() << "\" "
|
e << "Target \"" << target->GetName() << "\" "
|
||||||
"INTERFACE_INCLUDE_DIRECTORIES property contains relative path:\n"
|
"INTERFACE_INCLUDE_DIRECTORIES property contains relative path:\n"
|
||||||
" \"" << *li << "\"";
|
" \"" << *li << "\"";
|
||||||
target->GetMakefile()->IssueMessage(messageType, e.str().c_str());
|
target->GetMakefile()->IssueMessage(messageType, e.str());
|
||||||
}
|
}
|
||||||
if (isSubDirectory(li->c_str(), installDir))
|
if (isSubDirectory(li->c_str(), installDir))
|
||||||
{
|
{
|
||||||
@ -286,7 +286,7 @@ static bool checkInterfaceDirs(const std::string &prepro,
|
|||||||
e << "Target \"" << target->GetName() << "\" "
|
e << "Target \"" << target->GetName() << "\" "
|
||||||
"INTERFACE_INCLUDE_DIRECTORIES property contains path:\n"
|
"INTERFACE_INCLUDE_DIRECTORIES property contains path:\n"
|
||||||
" \"" << *li << "\"\nwhich is prefixed in the build directory.";
|
" \"" << *li << "\"\nwhich is prefixed in the build directory.";
|
||||||
target->GetMakefile()->IssueMessage(messageType, e.str().c_str());
|
target->GetMakefile()->IssueMessage(messageType, e.str());
|
||||||
}
|
}
|
||||||
if (!inSourceBuild)
|
if (!inSourceBuild)
|
||||||
{
|
{
|
||||||
@ -295,7 +295,7 @@ static bool checkInterfaceDirs(const std::string &prepro,
|
|||||||
e << "Target \"" << target->GetName() << "\" "
|
e << "Target \"" << target->GetName() << "\" "
|
||||||
"INTERFACE_INCLUDE_DIRECTORIES property contains path:\n"
|
"INTERFACE_INCLUDE_DIRECTORIES property contains path:\n"
|
||||||
" \"" << *li << "\"\nwhich is prefixed in the source directory.";
|
" \"" << *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();
|
for (std::vector<std::string>::const_iterator ci = configNames.begin();
|
||||||
ci != configNames.end(); ++ci)
|
ci != configNames.end(); ++ci)
|
||||||
{
|
{
|
||||||
getCompatibleInterfaceProperties(target, ifaceProperties, ci->c_str());
|
getCompatibleInterfaceProperties(target, ifaceProperties, *ci);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (std::set<std::string>::const_iterator it = ifaceProperties.begin();
|
for (std::set<std::string>::const_iterator it = ifaceProperties.begin();
|
||||||
it != ifaceProperties.end(); ++it)
|
it != ifaceProperties.end(); ++it)
|
||||||
{
|
{
|
||||||
this->PopulateInterfaceProperty(("INTERFACE_" + *it).c_str(),
|
this->PopulateInterfaceProperty("INTERFACE_" + *it,
|
||||||
target, properties);
|
target, properties);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -712,7 +712,7 @@ cmExportFileGenerator
|
|||||||
const char *propContent;
|
const char *propContent;
|
||||||
|
|
||||||
if (const char *prop_suffixed = target->GetProperty(
|
if (const char *prop_suffixed = target->GetProperty(
|
||||||
("LINK_INTERFACE_LIBRARIES" + suffix).c_str()))
|
"LINK_INTERFACE_LIBRARIES" + suffix))
|
||||||
{
|
{
|
||||||
propContent = prop_suffixed;
|
propContent = prop_suffixed;
|
||||||
}
|
}
|
||||||
|
@ -211,7 +211,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
|
|||||||
ci = this->Configurations.begin();
|
ci = this->Configurations.begin();
|
||||||
ci != this->Configurations.end(); ++ci)
|
ci != this->Configurations.end(); ++ci)
|
||||||
{
|
{
|
||||||
if(!this->GenerateImportFileConfig(ci->c_str(), missingTargets))
|
if(!this->GenerateImportFileConfig(*ci, missingTargets))
|
||||||
{
|
{
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
@ -271,7 +271,7 @@ cmExportInstallFileGenerator::GenerateImportFileConfig(
|
|||||||
{
|
{
|
||||||
std::string se = cmSystemTools::GetLastSystemError();
|
std::string se = cmSystemTools::GetLastSystemError();
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "cannot write to file \"" << fileName.c_str()
|
e << "cannot write to file \"" << fileName
|
||||||
<< "\": " << se;
|
<< "\": " << se;
|
||||||
cmSystemTools::Error(e.str().c_str());
|
cmSystemTools::Error(e.str().c_str());
|
||||||
return false;
|
return false;
|
||||||
|
@ -138,7 +138,7 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
std::string lib = li->first;
|
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
|
// Handle simple output name changes. This command is
|
||||||
// deprecated so we do not support full target name
|
// 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();
|
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);
|
target, emitted);
|
||||||
|
|
||||||
std::vector<std::string> depends;
|
std::vector<std::string> depends;
|
||||||
@ -129,7 +129,7 @@ cmExportTryCompileFileGenerator::InstallNameDir(cmTarget* target,
|
|||||||
if(mf->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME"))
|
if(mf->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME"))
|
||||||
{
|
{
|
||||||
install_name_dir =
|
install_name_dir =
|
||||||
target->GetInstallNameDirForBuildTree(config.c_str());
|
target->GetInstallNameDirForBuildTree(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
return install_name_dir;
|
return install_name_dir;
|
||||||
|
@ -60,7 +60,7 @@ std::string cmExternalMakefileProjectGenerator::GetGlobalGeneratorName(
|
|||||||
it != this->SupportedGlobalGenerators.end();
|
it != this->SupportedGlobalGenerators.end();
|
||||||
++it)
|
++it)
|
||||||
{
|
{
|
||||||
if (this->CreateFullGeneratorName(it->c_str(), this->GetName())
|
if (this->CreateFullGeneratorName(*it, this->GetName())
|
||||||
== currentName)
|
== currentName)
|
||||||
{
|
{
|
||||||
return *it;
|
return *it;
|
||||||
|
@ -334,7 +334,7 @@ void cmExtraCodeBlocksGenerator
|
|||||||
if (strcmp(makefile->GetStartOutputDirectory(),
|
if (strcmp(makefile->GetStartOutputDirectory(),
|
||||||
makefile->GetHomeOutputDirectory())==0)
|
makefile->GetHomeOutputDirectory())==0)
|
||||||
{
|
{
|
||||||
this->AppendTarget(fout, ti->first.c_str(), 0,
|
this->AppendTarget(fout, ti->first, 0,
|
||||||
make.c_str(), makefile, compiler.c_str());
|
make.c_str(), makefile, compiler.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -350,7 +350,7 @@ void cmExtraCodeBlocksGenerator
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->AppendTarget(fout, ti->first.c_str(), 0,
|
this->AppendTarget(fout, ti->first, 0,
|
||||||
make.c_str(), makefile, compiler.c_str());
|
make.c_str(), makefile, compiler.c_str());
|
||||||
break;
|
break;
|
||||||
case cmTarget::EXECUTABLE:
|
case cmTarget::EXECUTABLE:
|
||||||
@ -359,11 +359,11 @@ void cmExtraCodeBlocksGenerator
|
|||||||
case cmTarget::MODULE_LIBRARY:
|
case cmTarget::MODULE_LIBRARY:
|
||||||
case cmTarget::OBJECT_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());
|
make.c_str(), makefile, compiler.c_str());
|
||||||
std::string fastTarget = ti->first;
|
std::string fastTarget = ti->first;
|
||||||
fastTarget += "/fast";
|
fastTarget += "/fast";
|
||||||
this->AppendTarget(fout, fastTarget.c_str(), &ti->second,
|
this->AppendTarget(fout, fastTarget, &ti->second,
|
||||||
make.c_str(), makefile, compiler.c_str());
|
make.c_str(), makefile, compiler.c_str());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -499,7 +499,7 @@ void cmExtraCodeBlocksGenerator
|
|||||||
sit!=otherFiles.end();
|
sit!=otherFiles.end();
|
||||||
++sit)
|
++sit)
|
||||||
{
|
{
|
||||||
fout<<" <Unit filename=\""<< sit->c_str() <<"\">\n"
|
fout<<" <Unit filename=\""<< *sit <<"\">\n"
|
||||||
" </Unit>\n";
|
" </Unit>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -626,7 +626,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
|
|||||||
if (!systemIncludeDirs.empty())
|
if (!systemIncludeDirs.empty())
|
||||||
{
|
{
|
||||||
std::vector<std::string> dirs;
|
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();
|
for(std::vector<std::string>::const_iterator dirIt=dirs.begin();
|
||||||
dirIt != dirs.end();
|
dirIt != dirs.end();
|
||||||
++dirIt)
|
++dirIt)
|
||||||
@ -640,7 +640,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
|
|||||||
if (!systemIncludeDirs.empty())
|
if (!systemIncludeDirs.empty())
|
||||||
{
|
{
|
||||||
std::vector<std::string> dirs;
|
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();
|
for(std::vector<std::string>::const_iterator dirIt=dirs.begin();
|
||||||
dirIt != dirs.end();
|
dirIt != dirs.end();
|
||||||
++dirIt)
|
++dirIt)
|
||||||
@ -653,7 +653,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
|
|||||||
dirIt != uniqIncludeDirs.end();
|
dirIt != uniqIncludeDirs.end();
|
||||||
++dirIt)
|
++dirIt)
|
||||||
{
|
{
|
||||||
fout <<" <Add directory=\"" << dirIt->c_str() << "\" />\n";
|
fout <<" <Add directory=\"" << *dirIt << "\" />\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
fout<<" </Compiler>\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 hostSystemName = mf->GetSafeDefinition("CMAKE_HOST_SYSTEM_NAME");
|
||||||
std::string systemName = mf->GetSafeDefinition("CMAKE_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
|
std::string compiler = "gcc"; // default to gcc
|
||||||
if (compilerId == "MSVC")
|
if (compilerId == "MSVC")
|
||||||
{
|
{
|
||||||
|
@ -311,7 +311,7 @@ void cmExtraCodeLiteGenerator
|
|||||||
{
|
{
|
||||||
std::string relativePath =
|
std::string relativePath =
|
||||||
cmSystemTools::RelativePath(projectPath.c_str(), sit->first.c_str());
|
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>\n";
|
||||||
fout<< " <VirtualDirectory Name=\"include\">\n";
|
fout<< " <VirtualDirectory Name=\"include\">\n";
|
||||||
@ -322,7 +322,7 @@ void cmExtraCodeLiteGenerator
|
|||||||
{
|
{
|
||||||
std::string relativePath =
|
std::string relativePath =
|
||||||
cmSystemTools::RelativePath(projectPath.c_str(), sit->c_str());
|
cmSystemTools::RelativePath(projectPath.c_str(), sit->c_str());
|
||||||
fout << " <File Name=\"" << relativePath.c_str() << "\"/>\n";
|
fout << " <File Name=\"" << relativePath << "\"/>\n";
|
||||||
}
|
}
|
||||||
fout << " </VirtualDirectory>\n";
|
fout << " </VirtualDirectory>\n";
|
||||||
|
|
||||||
@ -404,7 +404,7 @@ cmExtraCodeLiteGenerator::GetCodeLiteCompilerName(const cmMakefile* mf) const
|
|||||||
compilerIdVar = "CMAKE_C_COMPILER_ID";
|
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++
|
std::string compiler = "gnu g++"; // default to g++
|
||||||
|
|
||||||
// Since we need the compiler for parsing purposes only
|
// Since we need the compiler for parsing purposes only
|
||||||
|
@ -205,7 +205,7 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(cmGeneratedFileStream& fout,
|
|||||||
std::string cacheEntryName = "CMAKE_ECLIPSE_ENVVAR_";
|
std::string cacheEntryName = "CMAKE_ECLIPSE_ENVVAR_";
|
||||||
cacheEntryName += envVar;
|
cacheEntryName += envVar;
|
||||||
const char* cacheValue = mf->GetCacheManager()->GetCacheValue(
|
const char* cacheValue = mf->GetCacheManager()->GetCacheValue(
|
||||||
cacheEntryName.c_str());
|
cacheEntryName);
|
||||||
|
|
||||||
// now we have both, decide which one to use
|
// now we have both, decide which one to use
|
||||||
std::string valueToUse;
|
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
|
// The variable is in the env, but not in the cache. Use it and put it
|
||||||
// in the cache
|
// in the cache
|
||||||
valueToUse = envVarValue;
|
valueToUse = envVarValue;
|
||||||
mf->AddCacheDefinition(cacheEntryName.c_str(), valueToUse.c_str(),
|
mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(),
|
||||||
cacheEntryName.c_str(), cmCacheManager::STRING,
|
cacheEntryName.c_str(), cmCacheManager::STRING,
|
||||||
true);
|
true);
|
||||||
mf->GetCacheManager()->SaveCache(mf->GetHomeOutputDirectory());
|
mf->GetCacheManager()->SaveCache(mf->GetHomeOutputDirectory());
|
||||||
@ -240,7 +240,7 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(cmGeneratedFileStream& fout,
|
|||||||
if (valueToUse.find(envVarValue) == std::string::npos)
|
if (valueToUse.find(envVarValue) == std::string::npos)
|
||||||
{
|
{
|
||||||
valueToUse = envVarValue;
|
valueToUse = envVarValue;
|
||||||
mf->AddCacheDefinition(cacheEntryName.c_str(), valueToUse.c_str(),
|
mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(),
|
||||||
cacheEntryName.c_str(), cmCacheManager::STRING,
|
cacheEntryName.c_str(), cmCacheManager::STRING,
|
||||||
true);
|
true);
|
||||||
mf->GetCacheManager()->SaveCache(mf->GetHomeOutputDirectory());
|
mf->GetCacheManager()->SaveCache(mf->GetHomeOutputDirectory());
|
||||||
@ -981,7 +981,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
|||||||
std::string systemIncludeDirs = mf->GetSafeDefinition(
|
std::string systemIncludeDirs = mf->GetSafeDefinition(
|
||||||
"CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS");
|
"CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS");
|
||||||
std::vector<std::string> dirs;
|
std::vector<std::string> dirs;
|
||||||
cmSystemTools::ExpandListArgument(systemIncludeDirs.c_str(), dirs);
|
cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs);
|
||||||
this->AppendIncludeDirectories(fout, dirs, emmited);
|
this->AppendIncludeDirectories(fout, dirs, emmited);
|
||||||
}
|
}
|
||||||
compiler = mf->GetSafeDefinition("CMAKE_CXX_COMPILER");
|
compiler = mf->GetSafeDefinition("CMAKE_CXX_COMPILER");
|
||||||
@ -990,7 +990,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
|||||||
std::string systemIncludeDirs = mf->GetSafeDefinition(
|
std::string systemIncludeDirs = mf->GetSafeDefinition(
|
||||||
"CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS");
|
"CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS");
|
||||||
std::vector<std::string> dirs;
|
std::vector<std::string> dirs;
|
||||||
cmSystemTools::ExpandListArgument(systemIncludeDirs.c_str(), dirs);
|
cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs);
|
||||||
this->AppendIncludeDirectories(fout, dirs, emmited);
|
this->AppendIncludeDirectories(fout, dirs, emmited);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1292,7 +1292,7 @@ void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout,
|
|||||||
std::string pathXml = cmExtraEclipseCDT4Generator::EscapeForXML(path);
|
std::string pathXml = cmExtraEclipseCDT4Generator::EscapeForXML(path);
|
||||||
fout <<
|
fout <<
|
||||||
"<target name=\"" << prefix << targetXml << "\""
|
"<target name=\"" << prefix << targetXml << "\""
|
||||||
" path=\"" << pathXml.c_str() << "\""
|
" path=\"" << pathXml << "\""
|
||||||
" targetID=\"org.eclipse.cdt.make.MakeTargetBuilder\">\n"
|
" targetID=\"org.eclipse.cdt.make.MakeTargetBuilder\">\n"
|
||||||
"<buildCommand>"
|
"<buildCommand>"
|
||||||
<< cmExtraEclipseCDT4Generator::GetEclipsePath(make)
|
<< cmExtraEclipseCDT4Generator::GetEclipsePath(make)
|
||||||
|
@ -177,7 +177,7 @@ void cmExtraSublimeTextGenerator::
|
|||||||
if (strcmp(makefile->GetStartOutputDirectory(),
|
if (strcmp(makefile->GetStartOutputDirectory(),
|
||||||
makefile->GetHomeOutputDirectory())==0)
|
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(),
|
make.c_str(), makefile, compiler.c_str(),
|
||||||
sourceFileFlags, false);
|
sourceFileFlags, false);
|
||||||
}
|
}
|
||||||
@ -194,7 +194,7 @@ void cmExtraSublimeTextGenerator::
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->AppendTarget(fout, ti->first.c_str(), *lg, 0,
|
this->AppendTarget(fout, ti->first, *lg, 0,
|
||||||
make.c_str(), makefile, compiler.c_str(),
|
make.c_str(), makefile, compiler.c_str(),
|
||||||
sourceFileFlags, false);
|
sourceFileFlags, false);
|
||||||
break;
|
break;
|
||||||
@ -204,12 +204,12 @@ void cmExtraSublimeTextGenerator::
|
|||||||
case cmTarget::MODULE_LIBRARY:
|
case cmTarget::MODULE_LIBRARY:
|
||||||
case cmTarget::OBJECT_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(),
|
make.c_str(), makefile, compiler.c_str(),
|
||||||
sourceFileFlags, false);
|
sourceFileFlags, false);
|
||||||
std::string fastTarget = ti->first;
|
std::string fastTarget = ti->first;
|
||||||
fastTarget += "/fast";
|
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(),
|
make.c_str(), makefile, compiler.c_str(),
|
||||||
sourceFileFlags, false);
|
sourceFileFlags, false);
|
||||||
}
|
}
|
||||||
@ -440,7 +440,7 @@ ComputeDefines(cmSourceFile *source, cmLocalGenerator* lg, cmTarget *target,
|
|||||||
{
|
{
|
||||||
std::string defPropName = "COMPILE_DEFINITIONS_";
|
std::string defPropName = "COMPILE_DEFINITIONS_";
|
||||||
defPropName += cmSystemTools::UpperCase(config);
|
defPropName += cmSystemTools::UpperCase(config);
|
||||||
lg->AppendDefines(defines, source->GetProperty(defPropName.c_str()));
|
lg->AppendDefines(defines, source->GetProperty(defPropName));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string definesString;
|
std::string definesString;
|
||||||
|
@ -48,7 +48,7 @@ bool cmFLTKWrapUICommand
|
|||||||
for(std::vector<std::string>::iterator i = (newArgs.begin() + 1);
|
for(std::vector<std::string>::iterator i = (newArgs.begin() + 1);
|
||||||
i != newArgs.end(); i++)
|
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
|
// if we should use the source GUI
|
||||||
// to generate .cxx and .h files
|
// to generate .cxx and .h files
|
||||||
if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
|
if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
|
||||||
@ -81,16 +81,16 @@ bool cmFLTKWrapUICommand
|
|||||||
std::string no_main_dependency = "";
|
std::string no_main_dependency = "";
|
||||||
const char* no_comment = 0;
|
const char* no_comment = 0;
|
||||||
const char* no_working_dir = 0;
|
const char* no_working_dir = 0;
|
||||||
this->Makefile->AddCustomCommandToOutput(cxxres.c_str(),
|
this->Makefile->AddCustomCommandToOutput(cxxres,
|
||||||
depends, no_main_dependency,
|
depends, no_main_dependency,
|
||||||
commandLines, no_comment,
|
commandLines, no_comment,
|
||||||
no_working_dir);
|
no_working_dir);
|
||||||
this->Makefile->AddCustomCommandToOutput(hname.c_str(),
|
this->Makefile->AddCustomCommandToOutput(hname,
|
||||||
depends, no_main_dependency,
|
depends, no_main_dependency,
|
||||||
commandLines, no_comment,
|
commandLines, no_comment,
|
||||||
no_working_dir);
|
no_working_dir);
|
||||||
|
|
||||||
cmSourceFile *sf = this->Makefile->GetSource(cxxres.c_str());
|
cmSourceFile *sf = this->Makefile->GetSource(cxxres);
|
||||||
sf->AddDepend(hname.c_str());
|
sf->AddDepend(hname.c_str());
|
||||||
sf->AddDepend(origname.c_str());
|
sf->AddDepend(origname.c_str());
|
||||||
this->GeneratedSourcesClasses.push_back(sf);
|
this->GeneratedSourcesClasses.push_back(sf);
|
||||||
@ -110,7 +110,7 @@ bool cmFLTKWrapUICommand
|
|||||||
}
|
}
|
||||||
std::string varName = this->Target;
|
std::string varName = this->Target;
|
||||||
varName += "_FLTK_UI_SRCS";
|
varName += "_FLTK_UI_SRCS";
|
||||||
this->Makefile->AddDefinition(varName.c_str(), sourceListValue.c_str());
|
this->Makefile->AddDefinition(varName, sourceListValue.c_str());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -174,7 +174,7 @@ bool cmFileCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string e = "does not recognize sub-command "+subCommand;
|
std::string e = "does not recognize sub-command "+subCommand;
|
||||||
this->SetError(e.c_str());
|
this->SetError(e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args,
|
|||||||
std::string e
|
std::string e
|
||||||
= "attempted to write a file: " + fileName +
|
= "attempted to write a file: " + fileName +
|
||||||
" into a source directory.";
|
" into a source directory.";
|
||||||
this->SetError(e.c_str());
|
this->SetError(e);
|
||||||
cmSystemTools::SetFatalErrorOccured();
|
cmSystemTools::SetFatalErrorOccured();
|
||||||
return false;
|
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: ";
|
std::string error = "Internal CMake error when trying to open file: ";
|
||||||
error += fileName.c_str();
|
error += fileName.c_str();
|
||||||
error += " for writing.";
|
error += " for writing.";
|
||||||
this->SetError(error.c_str());
|
this->SetError(error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
file << message;
|
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: ";
|
std::string error = "Internal CMake error when trying to open file: ";
|
||||||
error += fileName.c_str();
|
error += fileName.c_str();
|
||||||
error += " for reading.";
|
error += " for reading.";
|
||||||
this->SetError(error.c_str());
|
this->SetError(error);
|
||||||
return false;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -371,23 +371,23 @@ bool cmFileCommand::HandleHashCommand(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " requires a file name and output variable";
|
e << args[0] << " requires a file name and output variable";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmsys::auto_ptr<cmCryptoHash> hash(cmCryptoHash::New(args[0].c_str()));
|
cmsys::auto_ptr<cmCryptoHash> hash(cmCryptoHash::New(args[0].c_str()));
|
||||||
if(hash.get())
|
if(hash.get())
|
||||||
{
|
{
|
||||||
std::string out = hash->HashFile(args[1].c_str());
|
std::string out = hash->HashFile(args[1]);
|
||||||
if(!out.empty())
|
if(!out.empty())
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(args[2].c_str(), out.c_str());
|
this->Makefile->AddDefinition(args[2], out.c_str());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " failed to read file \"" << args[1] << "\": "
|
e << args[0] << " failed to read file \"" << args[1] << "\": "
|
||||||
<< cmSystemTools::GetLastSystemError();
|
<< cmSystemTools::GetLastSystemError();
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
#else
|
#else
|
||||||
@ -481,7 +481,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "STRINGS option LIMIT_INPUT value \""
|
e << "STRINGS option LIMIT_INPUT value \""
|
||||||
<< args[i] << "\" is not an unsigned integer.";
|
<< args[i] << "\" is not an unsigned integer.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
arg_mode = arg_none;
|
arg_mode = arg_none;
|
||||||
@ -494,7 +494,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "STRINGS option LIMIT_OUTPUT value \""
|
e << "STRINGS option LIMIT_OUTPUT value \""
|
||||||
<< args[i] << "\" is not an unsigned integer.";
|
<< args[i] << "\" is not an unsigned integer.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
arg_mode = arg_none;
|
arg_mode = arg_none;
|
||||||
@ -507,7 +507,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "STRINGS option LIMIT_COUNT value \""
|
e << "STRINGS option LIMIT_COUNT value \""
|
||||||
<< args[i] << "\" is not an unsigned integer.";
|
<< args[i] << "\" is not an unsigned integer.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
limit_count = count;
|
limit_count = count;
|
||||||
@ -521,7 +521,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "STRINGS option LENGTH_MINIMUM value \""
|
e << "STRINGS option LENGTH_MINIMUM value \""
|
||||||
<< args[i] << "\" is not an unsigned integer.";
|
<< args[i] << "\" is not an unsigned integer.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
minlen = len;
|
minlen = len;
|
||||||
@ -535,7 +535,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "STRINGS option LENGTH_MAXIMUM value \""
|
e << "STRINGS option LENGTH_MAXIMUM value \""
|
||||||
<< args[i] << "\" is not an unsigned integer.";
|
<< args[i] << "\" is not an unsigned integer.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
maxlen = len;
|
maxlen = len;
|
||||||
@ -548,7 +548,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "STRINGS option REGEX value \""
|
e << "STRINGS option REGEX value \""
|
||||||
<< args[i] << "\" could not be compiled.";
|
<< args[i] << "\" could not be compiled.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
have_regex = true;
|
have_regex = true;
|
||||||
@ -559,7 +559,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "STRINGS given unknown argument \""
|
e << "STRINGS given unknown argument \""
|
||||||
<< args[i] << "\"";
|
<< args[i] << "\"";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -586,7 +586,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "STRINGS file \"" << fileName << "\" cannot be read.";
|
e << "STRINGS file \"" << fileName << "\" cannot be read.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -709,7 +709,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Save the output in a makefile variable.
|
// 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;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -873,14 +873,14 @@ bool cmFileCommand::HandleMakeDirectoryCommand(
|
|||||||
{
|
{
|
||||||
std::string e = "attempted to create a directory: " + *cdir
|
std::string e = "attempted to create a directory: " + *cdir
|
||||||
+ " into a source directory.";
|
+ " into a source directory.";
|
||||||
this->SetError(e.c_str());
|
this->SetError(e);
|
||||||
cmSystemTools::SetFatalErrorOccured();
|
cmSystemTools::SetFatalErrorOccured();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ( !cmSystemTools::MakeDirectory(cdir->c_str()) )
|
if ( !cmSystemTools::MakeDirectory(cdir->c_str()) )
|
||||||
{
|
{
|
||||||
std::string error = "problem creating directory: " + *cdir;
|
std::string error = "problem creating directory: " + *cdir;
|
||||||
this->SetError(error.c_str());
|
this->SetError(error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -926,7 +926,7 @@ cmFileCommand::HandleDifferentCommand(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "DIFFERENT given unknown argument " << args[i];
|
e << "DIFFERENT given unknown argument " << args[i];
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1041,7 +1041,7 @@ protected:
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << this->Name << " cannot set permissions on \"" << toFile << "\"";
|
e << this->Name << " cannot set permissions on \"" << toFile << "\"";
|
||||||
this->FileCommand->SetError(e.str().c_str());
|
this->FileCommand->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -1065,7 +1065,7 @@ protected:
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << this->Name << " given invalid permission \"" << arg << "\".";
|
e << this->Name << " given invalid permission \"" << arg << "\".";
|
||||||
this->FileCommand->SetError(e.str().c_str());
|
this->FileCommand->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -1092,7 +1092,7 @@ protected:
|
|||||||
// The input file does not exist and installation is not optional.
|
// The input file does not exist and installation is not optional.
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << this->Name << " cannot find \"" << fromFile << "\".";
|
e << this->Name << " cannot find \"" << fromFile << "\".";
|
||||||
this->FileCommand->SetError(e.str().c_str());
|
this->FileCommand->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1125,14 +1125,14 @@ protected:
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "option " << arg << " may not appear before PATTERN or REGEX.";
|
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;
|
this->Doing = DoingError;
|
||||||
}
|
}
|
||||||
void NotAfterMatch(std::string const& arg)
|
void NotAfterMatch(std::string const& arg)
|
||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "option " << arg << " may not appear after PATTERN or REGEX.";
|
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;
|
this->Doing = DoingError;
|
||||||
}
|
}
|
||||||
virtual void DefaultFilePermissions()
|
virtual void DefaultFilePermissions()
|
||||||
@ -1170,7 +1170,7 @@ bool cmFileCopier::Parse(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "called with unknown argument \"" << args[i] << "\".";
|
e << "called with unknown argument \"" << args[i] << "\".";
|
||||||
this->FileCommand->SetError(e.str().c_str());
|
this->FileCommand->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1186,7 +1186,7 @@ bool cmFileCopier::Parse(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << this->Name << " given no DESTINATION";
|
e << this->Name << " given no DESTINATION";
|
||||||
this->FileCommand->SetError(e.str().c_str());
|
this->FileCommand->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1366,7 +1366,7 @@ bool cmFileCopier::CheckValue(std::string const& arg)
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "could not compile PATTERN \"" << arg << "\".";
|
e << "could not compile PATTERN \"" << arg << "\".";
|
||||||
this->FileCommand->SetError(e.str().c_str());
|
this->FileCommand->SetError(e.str());
|
||||||
this->Doing = DoingError;
|
this->Doing = DoingError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1382,7 +1382,7 @@ bool cmFileCopier::CheckValue(std::string const& arg)
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "could not compile REGEX \"" << arg << "\".";
|
e << "could not compile REGEX \"" << arg << "\".";
|
||||||
this->FileCommand->SetError(e.str().c_str());
|
this->FileCommand->SetError(e.str());
|
||||||
this->Doing = DoingError;
|
this->Doing = DoingError;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1462,7 +1462,7 @@ bool cmFileCopier::Install(const char* fromFile, const char* toFile)
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "INSTALL encountered an empty string input file name.";
|
e << "INSTALL encountered an empty string input file name.";
|
||||||
this->FileCommand->SetError(e.str().c_str());
|
this->FileCommand->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1504,7 +1504,7 @@ bool cmFileCopier::InstallSymlink(const char* fromFile, const char* toFile)
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << this->Name << " cannot read symlink \"" << fromFile
|
e << this->Name << " cannot read symlink \"" << fromFile
|
||||||
<< "\" to duplicate at \"" << toFile << "\".";
|
<< "\" to duplicate at \"" << toFile << "\".";
|
||||||
this->FileCommand->SetError(e.str().c_str());
|
this->FileCommand->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1537,7 +1537,7 @@ bool cmFileCopier::InstallSymlink(const char* fromFile, const char* toFile)
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << this->Name << " cannot duplicate symlink \"" << fromFile
|
e << this->Name << " cannot duplicate symlink \"" << fromFile
|
||||||
<< "\" at \"" << toFile << "\".";
|
<< "\" at \"" << toFile << "\".";
|
||||||
this->FileCommand->SetError(e.str().c_str());
|
this->FileCommand->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1569,7 +1569,7 @@ bool cmFileCopier::InstallFile(const char* fromFile, const char* toFile,
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << this->Name << " cannot copy file \"" << fromFile
|
e << this->Name << " cannot copy file \"" << fromFile
|
||||||
<< "\" to \"" << toFile << "\".";
|
<< "\" to \"" << toFile << "\".";
|
||||||
this->FileCommand->SetError(e.str().c_str());
|
this->FileCommand->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1588,7 +1588,7 @@ bool cmFileCopier::InstallFile(const char* fromFile, const char* toFile,
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << this->Name << " cannot set modification time on \""
|
e << this->Name << " cannot set modification time on \""
|
||||||
<< toFile << "\"";
|
<< toFile << "\"";
|
||||||
this->FileCommand->SetError(e.str().c_str());
|
this->FileCommand->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1619,7 +1619,7 @@ bool cmFileCopier::InstallDirectory(const char* source,
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << this->Name << " cannot make directory \"" << destination << "\": "
|
e << this->Name << " cannot make directory \"" << destination << "\": "
|
||||||
<< cmSystemTools::GetLastSystemError();
|
<< cmSystemTools::GetLastSystemError();
|
||||||
this->FileCommand->SetError(e.str().c_str());
|
this->FileCommand->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1910,7 +1910,7 @@ bool cmFileInstaller::CheckKeyword(std::string const& arg)
|
|||||||
e << "INSTALL called with old-style " << arg << " argument. "
|
e << "INSTALL called with old-style " << arg << " argument. "
|
||||||
<< "This script was generated with an older version of CMake. "
|
<< "This script was generated with an older version of CMake. "
|
||||||
<< "Re-run this cmake version on your build tree.";
|
<< "Re-run this cmake version on your build tree.";
|
||||||
this->FileCommand->SetError(e.str().c_str());
|
this->FileCommand->SetError(e.str());
|
||||||
this->Doing = DoingError;
|
this->Doing = DoingError;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1976,7 +1976,7 @@ bool cmFileInstaller
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "Option TYPE given unknown value \"" << stype << "\".";
|
e << "Option TYPE given unknown value \"" << stype << "\".";
|
||||||
this->FileCommand->SetError(e.str().c_str());
|
this->FileCommand->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -2047,7 +2047,7 @@ bool cmFileInstaller::HandleInstallDestination()
|
|||||||
"absolute path or remove DESTDIR environment variable."
|
"absolute path or remove DESTDIR environment variable."
|
||||||
"\nDESTINATION=\n";
|
"\nDESTINATION=\n";
|
||||||
message += destination;
|
message += destination;
|
||||||
this->FileCommand->SetError(message.c_str());
|
this->FileCommand->SetError(message);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2061,7 +2061,7 @@ bool cmFileInstaller::HandleInstallDestination()
|
|||||||
{
|
{
|
||||||
std::string errstring = "cannot create directory: " + destination +
|
std::string errstring = "cannot create directory: " + destination +
|
||||||
". Maybe need administrative privileges.";
|
". Maybe need administrative privileges.";
|
||||||
this->FileCommand->SetError(errstring.c_str());
|
this->FileCommand->SetError(errstring);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2069,7 +2069,7 @@ bool cmFileInstaller::HandleInstallDestination()
|
|||||||
{
|
{
|
||||||
std::string errstring = "INSTALL destination: " + destination +
|
std::string errstring = "INSTALL destination: " + destination +
|
||||||
" is not a directory.";
|
" is not a directory.";
|
||||||
this->FileCommand->SetError(errstring.c_str());
|
this->FileCommand->SetError(errstring);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -2118,7 +2118,7 @@ cmFileCommand::HandleRPathChangeCommand(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "RPATH_CHANGE given unknown argument " << args[i];
|
e << "RPATH_CHANGE given unknown argument " << args[i];
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2141,7 +2141,7 @@ cmFileCommand::HandleRPathChangeCommand(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "RPATH_CHANGE given FILE \"" << file << "\" that does not exist.";
|
e << "RPATH_CHANGE given FILE \"" << file << "\" that does not exist.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool success = true;
|
bool success = true;
|
||||||
@ -2157,7 +2157,7 @@ cmFileCommand::HandleRPathChangeCommand(std::vector<std::string> const& args)
|
|||||||
<< "to the file:\n"
|
<< "to the file:\n"
|
||||||
<< " " << file << "\n"
|
<< " " << file << "\n"
|
||||||
<< emsg;
|
<< emsg;
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
if(success)
|
if(success)
|
||||||
@ -2203,7 +2203,7 @@ cmFileCommand::HandleRPathRemoveCommand(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "RPATH_REMOVE given unknown argument " << args[i];
|
e << "RPATH_REMOVE given unknown argument " << args[i];
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2216,7 +2216,7 @@ cmFileCommand::HandleRPathRemoveCommand(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "RPATH_REMOVE given FILE \"" << file << "\" that does not exist.";
|
e << "RPATH_REMOVE given FILE \"" << file << "\" that does not exist.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool success = true;
|
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"
|
e << "RPATH_REMOVE could not remove RPATH from file:\n"
|
||||||
<< " " << file << "\n"
|
<< " " << file << "\n"
|
||||||
<< emsg;
|
<< emsg;
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
if(success)
|
if(success)
|
||||||
@ -2284,7 +2284,7 @@ cmFileCommand::HandleRPathCheckCommand(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "RPATH_CHECK given unknown argument " << args[i];
|
e << "RPATH_CHECK given unknown argument " << args[i];
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2337,7 +2337,7 @@ bool cmFileCommand::HandleRelativePathCommand(
|
|||||||
std::string errstring =
|
std::string errstring =
|
||||||
"RELATIVE_PATH must be passed a full path to the directory: "
|
"RELATIVE_PATH must be passed a full path to the directory: "
|
||||||
+ directoryName;
|
+ directoryName;
|
||||||
this->SetError(errstring.c_str());
|
this->SetError(errstring);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!cmSystemTools::FileIsFullPath(fileName.c_str()))
|
if(!cmSystemTools::FileIsFullPath(fileName.c_str()))
|
||||||
@ -2345,13 +2345,13 @@ bool cmFileCommand::HandleRelativePathCommand(
|
|||||||
std::string errstring =
|
std::string errstring =
|
||||||
"RELATIVE_PATH must be passed a full path to the file: "
|
"RELATIVE_PATH must be passed a full path to the file: "
|
||||||
+ fileName;
|
+ fileName;
|
||||||
this->SetError(errstring.c_str());
|
this->SetError(errstring);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string res = cmSystemTools::RelativePath(directoryName.c_str(),
|
std::string res = cmSystemTools::RelativePath(directoryName.c_str(),
|
||||||
fileName.c_str());
|
fileName.c_str());
|
||||||
this->Makefile->AddDefinition(outVar.c_str(),
|
this->Makefile->AddDefinition(outVar,
|
||||||
res.c_str());
|
res.c_str());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -2389,7 +2389,7 @@ bool cmFileCommand::HandleRename(std::vector<std::string> const& args)
|
|||||||
<< "to\n"
|
<< "to\n"
|
||||||
<< " " << newname << "\n"
|
<< " " << newname << "\n"
|
||||||
<< "because: " << err << "\n";
|
<< "because: " << err << "\n";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -2649,7 +2649,7 @@ namespace {
|
|||||||
{ \
|
{ \
|
||||||
std::string e(errstr); \
|
std::string e(errstr); \
|
||||||
e += ::curl_easy_strerror(result); \
|
e += ::curl_easy_strerror(result); \
|
||||||
this->SetError(e.c_str()); \
|
this->SetError(e); \
|
||||||
return false; \
|
return false; \
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2785,7 +2785,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
|||||||
std::string err =
|
std::string err =
|
||||||
"DOWNLOAD EXPECTED_HASH expects ALGO=value but got: ";
|
"DOWNLOAD EXPECTED_HASH expects ALGO=value but got: ";
|
||||||
err += *i;
|
err += *i;
|
||||||
this->SetError(err.c_str());
|
this->SetError(err);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
std::string algo = i->substr(0, pos);
|
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: ";
|
std::string err = "DOWNLOAD EXPECTED_HASH given unknown ALGO: ";
|
||||||
err += algo;
|
err += algo;
|
||||||
this->SetError(err.c_str());
|
this->SetError(err);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
hashMatchMSG = algo + " hash";
|
hashMatchMSG = algo + " hash";
|
||||||
@ -2809,7 +2809,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
|||||||
if(cmSystemTools::FileExists(file.c_str()) && hash.get())
|
if(cmSystemTools::FileExists(file.c_str()) && hash.get())
|
||||||
{
|
{
|
||||||
std::string msg;
|
std::string msg;
|
||||||
std::string actualHash = hash->HashFile(file.c_str());
|
std::string actualHash = hash->HashFile(file);
|
||||||
if(actualHash == expectedHash)
|
if(actualHash == expectedHash)
|
||||||
{
|
{
|
||||||
msg = "returning early; file already exists with expected ";
|
msg = "returning early; file already exists with expected ";
|
||||||
@ -2819,7 +2819,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
cmOStringStream result;
|
cmOStringStream result;
|
||||||
result << (int)0 << ";\"" << msg;
|
result << (int)0 << ";\"" << msg;
|
||||||
this->Makefile->AddDefinition(statusVar.c_str(),
|
this->Makefile->AddDefinition(statusVar,
|
||||||
result.str().c_str());
|
result.str().c_str());
|
||||||
}
|
}
|
||||||
return true;
|
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
|
// Make sure parent directory exists so we can write to the file
|
||||||
// as we receive downloaded bits from curl...
|
// 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()) &&
|
if(!cmSystemTools::FileExists(dir.c_str()) &&
|
||||||
!cmSystemTools::MakeDirectory(dir.c_str()))
|
!cmSystemTools::MakeDirectory(dir.c_str()))
|
||||||
{
|
{
|
||||||
std::string errstring = "DOWNLOAD error: cannot create directory '"
|
std::string errstring = "DOWNLOAD error: cannot create directory '"
|
||||||
+ dir + "' - Specify file by full path name and verify that you "
|
+ dir + "' - Specify file by full path name and verify that you "
|
||||||
"have directory creation and file write privileges.";
|
"have directory creation and file write privileges.";
|
||||||
this->SetError(errstring.c_str());
|
this->SetError(errstring);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2954,7 +2954,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
cmOStringStream result;
|
cmOStringStream result;
|
||||||
result << (int)res << ";\"" << ::curl_easy_strerror(res) << "\"";
|
result << (int)res << ";\"" << ::curl_easy_strerror(res) << "\"";
|
||||||
this->Makefile->AddDefinition(statusVar.c_str(),
|
this->Makefile->AddDefinition(statusVar,
|
||||||
result.str().c_str());
|
result.str().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2969,7 +2969,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
|||||||
//
|
//
|
||||||
if (hash.get())
|
if (hash.get())
|
||||||
{
|
{
|
||||||
std::string actualHash = hash->HashFile(file.c_str());
|
std::string actualHash = hash->HashFile(file);
|
||||||
if (actualHash.size() == 0)
|
if (actualHash.size() == 0)
|
||||||
{
|
{
|
||||||
this->SetError("DOWNLOAD cannot compute hash on downloaded file");
|
this->SetError("DOWNLOAD cannot compute hash on downloaded file");
|
||||||
@ -2986,7 +2986,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
|||||||
<< " status: [" << (int)res << ";\""
|
<< " status: [" << (int)res << ";\""
|
||||||
<< ::curl_easy_strerror(res) << "\"]" << std::endl
|
<< ::curl_easy_strerror(res) << "\"]" << std::endl
|
||||||
;
|
;
|
||||||
this->SetError(oss.str().c_str());
|
this->SetError(oss.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3000,12 +3000,12 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
|||||||
|
|
||||||
if(verboseLog.size())
|
if(verboseLog.size())
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(verboseLog.c_str(),
|
this->Makefile->AddDefinition(verboseLog,
|
||||||
&*chunkDebug.begin());
|
&*chunkDebug.begin());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this->Makefile->AddDefinition(verboseLog.c_str(),
|
this->Makefile->AddDefinition(verboseLog,
|
||||||
&*chunkDebug.begin());
|
&*chunkDebug.begin());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3102,7 +3102,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
std::string errStr = "UPLOAD cannot open file '";
|
std::string errStr = "UPLOAD cannot open file '";
|
||||||
errStr += filename + "' for reading.";
|
errStr += filename + "' for reading.";
|
||||||
this->SetError(errStr.c_str());
|
this->SetError(errStr);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3111,7 +3111,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
std::string errStr = "UPLOAD cannot stat file '";
|
std::string errStr = "UPLOAD cannot stat file '";
|
||||||
errStr += filename + "'.";
|
errStr += filename + "'.";
|
||||||
this->SetError(errStr.c_str());
|
this->SetError(errStr);
|
||||||
fclose(fin);
|
fclose(fin);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -3217,7 +3217,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
|
|||||||
{
|
{
|
||||||
cmOStringStream result;
|
cmOStringStream result;
|
||||||
result << (int)res << ";\"" << ::curl_easy_strerror(res) << "\"";
|
result << (int)res << ";\"" << ::curl_easy_strerror(res) << "\"";
|
||||||
this->Makefile->AddDefinition(statusVar.c_str(),
|
this->Makefile->AddDefinition(statusVar,
|
||||||
result.str().c_str());
|
result.str().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3246,7 +3246,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
|
|||||||
log += "\n";
|
log += "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
this->Makefile->AddDefinition(logVar.c_str(), log.c_str());
|
this->Makefile->AddDefinition(logVar, log.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -3368,7 +3368,7 @@ bool cmFileCommand::HandleTimestampCommand(
|
|||||||
{
|
{
|
||||||
std::string e = " TIMESTAMP sub-command does not recognize option " +
|
std::string e = " TIMESTAMP sub-command does not recognize option " +
|
||||||
args[argsIndex] + ".";
|
args[argsIndex] + ".";
|
||||||
this->SetError(e.c_str());
|
this->SetError(e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3376,7 +3376,7 @@ bool cmFileCommand::HandleTimestampCommand(
|
|||||||
cmTimestamp timestamp;
|
cmTimestamp timestamp;
|
||||||
std::string result = timestamp.FileModificationTime(
|
std::string result = timestamp.FileModificationTime(
|
||||||
filename.c_str(), formatString, utcFlag);
|
filename.c_str(), formatString, utcFlag);
|
||||||
this->Makefile->AddDefinition(outputVariable.c_str(), result.c_str());
|
this->Makefile->AddDefinition(outputVariable, result.c_str());
|
||||||
|
|
||||||
return true;
|
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();
|
for(std::vector<std::string>::const_iterator it = in_paths.begin();
|
||||||
it != in_paths.end(); ++it)
|
it != in_paths.end(); ++it)
|
||||||
{
|
{
|
||||||
std::string dir = it->c_str();
|
std::string dir = *it;
|
||||||
if(!subdir.empty() && !dir.empty() && dir[dir.size()-1] != '/')
|
if(!subdir.empty() && !dir.empty() && dir[dir.size()-1] != '/')
|
||||||
{
|
{
|
||||||
dir += "/";
|
dir += "/";
|
||||||
@ -323,7 +323,7 @@ void cmFindBase::AddCMakeVariablePath()
|
|||||||
var += this->CMakePathName;
|
var += this->CMakePathName;
|
||||||
var += "_PATH";
|
var += "_PATH";
|
||||||
this->AddCMakePrefixPath("CMAKE_PREFIX_PATH");
|
this->AddCMakePrefixPath("CMAKE_PREFIX_PATH");
|
||||||
this->AddCMakePath(var.c_str());
|
this->AddCMakePath(var);
|
||||||
|
|
||||||
if(this->CMakePathName == "PROGRAM")
|
if(this->CMakePathName == "PROGRAM")
|
||||||
{
|
{
|
||||||
@ -360,7 +360,7 @@ void cmFindBase::AddCMakeSystemVariablePath()
|
|||||||
var += this->CMakePathName;
|
var += this->CMakePathName;
|
||||||
var += "_PATH";
|
var += "_PATH";
|
||||||
this->AddCMakePrefixPath("CMAKE_SYSTEM_PREFIX_PATH");
|
this->AddCMakePrefixPath("CMAKE_SYSTEM_PREFIX_PATH");
|
||||||
this->AddCMakePath(var.c_str());
|
this->AddCMakePath(var);
|
||||||
|
|
||||||
if(this->CMakePathName == "PROGRAM")
|
if(this->CMakePathName == "PROGRAM")
|
||||||
{
|
{
|
||||||
@ -466,7 +466,7 @@ void cmFindBase::PrintFindStuff()
|
|||||||
bool cmFindBase::CheckForVariableInCache()
|
bool cmFindBase::CheckForVariableInCache()
|
||||||
{
|
{
|
||||||
if(const char* cacheValue =
|
if(const char* cacheValue =
|
||||||
this->Makefile->GetDefinition(this->VariableName.c_str()))
|
this->Makefile->GetDefinition(this->VariableName))
|
||||||
{
|
{
|
||||||
cmCacheManager::CacheIterator it =
|
cmCacheManager::CacheIterator it =
|
||||||
this->Makefile->GetCacheManager()->
|
this->Makefile->GetCacheManager()->
|
||||||
|
@ -51,7 +51,7 @@ void cmFindCommon::SelectDefaultRootPathMode()
|
|||||||
std::string findRootPathVar = "CMAKE_FIND_ROOT_PATH_MODE_";
|
std::string findRootPathVar = "CMAKE_FIND_ROOT_PATH_MODE_";
|
||||||
findRootPathVar += this->CMakePathName;
|
findRootPathVar += this->CMakePathName;
|
||||||
std::string rootPathMode =
|
std::string rootPathMode =
|
||||||
this->Makefile->GetSafeDefinition(findRootPathVar.c_str());
|
this->Makefile->GetSafeDefinition(findRootPathVar);
|
||||||
if (rootPathMode=="NEVER")
|
if (rootPathMode=="NEVER")
|
||||||
{
|
{
|
||||||
this->FindRootPathMode = RootPathModeNoRootPath;
|
this->FindRootPathMode = RootPathModeNoRootPath;
|
||||||
@ -361,7 +361,7 @@ void cmFindCommon::AddUserPath(std::string const& p,
|
|||||||
// Expand using the view of the target application.
|
// Expand using the view of the target application.
|
||||||
std::string expanded = p;
|
std::string expanded = p;
|
||||||
cmSystemTools::ExpandRegistryValues(expanded, view);
|
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
|
// Executables can be either 32-bit or 64-bit, so expand using the
|
||||||
// alternative view.
|
// alternative view.
|
||||||
@ -369,7 +369,7 @@ void cmFindCommon::AddUserPath(std::string const& p,
|
|||||||
{
|
{
|
||||||
expanded = p;
|
expanded = p;
|
||||||
cmSystemTools::ExpandRegistryValues(expanded, other_view);
|
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.
|
// Insert the path if has not already been emitted.
|
||||||
if(this->SearchPathsEmitted.insert(fullPath).second)
|
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.
|
// value.
|
||||||
if(this->AlreadyInCacheWithoutMetaInfo)
|
if(this->AlreadyInCacheWithoutMetaInfo)
|
||||||
{
|
{
|
||||||
this->Makefile->AddCacheDefinition(this->VariableName.c_str(), "",
|
this->Makefile->AddCacheDefinition(this->VariableName, "",
|
||||||
this->VariableDocumentation.c_str(),
|
this->VariableDocumentation.c_str(),
|
||||||
cmCacheManager::FILEPATH);
|
cmCacheManager::FILEPATH);
|
||||||
}
|
}
|
||||||
@ -69,14 +69,14 @@ bool cmFindLibraryCommand
|
|||||||
if(library != "")
|
if(library != "")
|
||||||
{
|
{
|
||||||
// Save the value in the cache
|
// Save the value in the cache
|
||||||
this->Makefile->AddCacheDefinition(this->VariableName.c_str(),
|
this->Makefile->AddCacheDefinition(this->VariableName,
|
||||||
library.c_str(),
|
library.c_str(),
|
||||||
this->VariableDocumentation.c_str(),
|
this->VariableDocumentation.c_str(),
|
||||||
cmCacheManager::FILEPATH);
|
cmCacheManager::FILEPATH);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
std::string notfound = this->VariableName + "-NOTFOUND";
|
std::string notfound = this->VariableName + "-NOTFOUND";
|
||||||
this->Makefile->AddCacheDefinition(this->VariableName.c_str(),
|
this->Makefile->AddCacheDefinition(this->VariableName,
|
||||||
notfound.c_str(),
|
notfound.c_str(),
|
||||||
this->VariableDocumentation.c_str(),
|
this->VariableDocumentation.c_str(),
|
||||||
cmCacheManager::FILEPATH);
|
cmCacheManager::FILEPATH);
|
||||||
|
@ -223,7 +223,7 @@ bool cmFindPackageCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string req_var = this->Name + "_FIND_REQUIRED_" + args[i];
|
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.
|
// Append to the list of required components.
|
||||||
components += components_sep;
|
components += components_sep;
|
||||||
@ -255,7 +255,7 @@ bool cmFindPackageCommand
|
|||||||
e << "given CONFIGS option followed by invalid file name \""
|
e << "given CONFIGS option followed by invalid file name \""
|
||||||
<< args[i] << "\". The names given must be file names without "
|
<< args[i] << "\". The names given must be file names without "
|
||||||
<< "a path and with a \".cmake\" extension.";
|
<< "a path and with a \".cmake\" extension.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this->Configs.push_back(args[i]);
|
this->Configs.push_back(args[i]);
|
||||||
@ -268,8 +268,8 @@ bool cmFindPackageCommand
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "called with invalid argument \"" << args[i].c_str() << "\"";
|
e << "called with invalid argument \"" << args[i] << "\"";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -286,7 +286,7 @@ bool cmFindPackageCommand
|
|||||||
{
|
{
|
||||||
e << " " << doubledComponents[i] << "\n";
|
e << " " << doubledComponents[i] << "\n";
|
||||||
}
|
}
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,7 +309,7 @@ bool cmFindPackageCommand
|
|||||||
e << " " << args[*si] << "\n";
|
e << " " << args[*si] << "\n";
|
||||||
}
|
}
|
||||||
e << "The options are incompatible.";
|
e << "The options are incompatible.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -327,7 +327,7 @@ bool cmFindPackageCommand
|
|||||||
// another find_package(<name>) call.
|
// another find_package(<name>) call.
|
||||||
std::string mod = this->Name;
|
std::string mod = this->Name;
|
||||||
mod += "_FIND_MODULE";
|
mod += "_FIND_MODULE";
|
||||||
if(this->Makefile->IsOn(mod.c_str()))
|
if(this->Makefile->IsOn(mod))
|
||||||
{
|
{
|
||||||
if(this->Version.empty())
|
if(this->Version.empty())
|
||||||
{
|
{
|
||||||
@ -335,17 +335,17 @@ bool cmFindPackageCommand
|
|||||||
// Requested version string.
|
// Requested version string.
|
||||||
std::string ver = this->Name;
|
std::string ver = this->Name;
|
||||||
ver += "_FIND_VERSION";
|
ver += "_FIND_VERSION";
|
||||||
this->Version = this->Makefile->GetSafeDefinition(ver.c_str());
|
this->Version = this->Makefile->GetSafeDefinition(ver);
|
||||||
|
|
||||||
// Whether an exact version is required.
|
// Whether an exact version is required.
|
||||||
std::string exact = this->Name;
|
std::string exact = this->Name;
|
||||||
exact += "_FIND_VERSION_EXACT";
|
exact += "_FIND_VERSION_EXACT";
|
||||||
this->VersionExact = this->Makefile->IsOn(exact.c_str());
|
this->VersionExact = this->Makefile->IsOn(exact);
|
||||||
}
|
}
|
||||||
if(components.empty())
|
if(components.empty())
|
||||||
{
|
{
|
||||||
std::string components_var = this->Name + "_FIND_COMPONENTS";
|
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_";
|
std::string disableFindPackageVar = "CMAKE_DISABLE_FIND_PACKAGE_";
|
||||||
disableFindPackageVar += this->Name;
|
disableFindPackageVar += this->Name;
|
||||||
if(this->Makefile->IsOn(disableFindPackageVar.c_str()))
|
if(this->Makefile->IsOn(disableFindPackageVar))
|
||||||
{
|
{
|
||||||
if (this->Required)
|
if (this->Required)
|
||||||
{
|
{
|
||||||
@ -381,7 +381,7 @@ bool cmFindPackageCommand
|
|||||||
e << "for module " << this->Name << " called with REQUIRED, but "
|
e << "for module " << this->Name << " called with REQUIRED, but "
|
||||||
<< disableFindPackageVar
|
<< disableFindPackageVar
|
||||||
<< " is enabled. A REQUIRED package cannot be disabled.";
|
<< " is enabled. A REQUIRED package cannot be disabled.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -488,7 +488,7 @@ void cmFindPackageCommand::SetModuleVariables(const std::string& components)
|
|||||||
|
|
||||||
// Store the list of components.
|
// Store the list of components.
|
||||||
std::string components_var = this->Name + "_FIND_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)
|
if(this->Quiet)
|
||||||
{
|
{
|
||||||
@ -496,7 +496,7 @@ void cmFindPackageCommand::SetModuleVariables(const std::string& components)
|
|||||||
// quietly.
|
// quietly.
|
||||||
std::string quietly = this->Name;
|
std::string quietly = this->Name;
|
||||||
quietly += "_FIND_QUIETLY";
|
quietly += "_FIND_QUIETLY";
|
||||||
this->AddFindDefinition(quietly.c_str(), "1");
|
this->AddFindDefinition(quietly, "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this->Required)
|
if(this->Required)
|
||||||
@ -505,7 +505,7 @@ void cmFindPackageCommand::SetModuleVariables(const std::string& components)
|
|||||||
// a fatal error if the package is not found.
|
// a fatal error if the package is not found.
|
||||||
std::string req = this->Name;
|
std::string req = this->Name;
|
||||||
req += "_FIND_REQUIRED";
|
req += "_FIND_REQUIRED";
|
||||||
this->AddFindDefinition(req.c_str(), "1");
|
this->AddFindDefinition(req, "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!this->Version.empty())
|
if(!this->Version.empty())
|
||||||
@ -514,23 +514,23 @@ void cmFindPackageCommand::SetModuleVariables(const std::string& components)
|
|||||||
// package has been requested.
|
// package has been requested.
|
||||||
std::string ver = this->Name;
|
std::string ver = this->Name;
|
||||||
ver += "_FIND_VERSION";
|
ver += "_FIND_VERSION";
|
||||||
this->AddFindDefinition(ver.c_str(), this->Version.c_str());
|
this->AddFindDefinition(ver, this->Version.c_str());
|
||||||
char buf[64];
|
char buf[64];
|
||||||
sprintf(buf, "%u", this->VersionMajor);
|
sprintf(buf, "%u", this->VersionMajor);
|
||||||
this->AddFindDefinition((ver+"_MAJOR").c_str(), buf);
|
this->AddFindDefinition(ver+"_MAJOR", buf);
|
||||||
sprintf(buf, "%u", this->VersionMinor);
|
sprintf(buf, "%u", this->VersionMinor);
|
||||||
this->AddFindDefinition((ver+"_MINOR").c_str(), buf);
|
this->AddFindDefinition(ver+"_MINOR", buf);
|
||||||
sprintf(buf, "%u", this->VersionPatch);
|
sprintf(buf, "%u", this->VersionPatch);
|
||||||
this->AddFindDefinition((ver+"_PATCH").c_str(), buf);
|
this->AddFindDefinition(ver+"_PATCH", buf);
|
||||||
sprintf(buf, "%u", this->VersionTweak);
|
sprintf(buf, "%u", this->VersionTweak);
|
||||||
this->AddFindDefinition((ver+"_TWEAK").c_str(), buf);
|
this->AddFindDefinition(ver+"_TWEAK", buf);
|
||||||
sprintf(buf, "%u", this->VersionCount);
|
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.
|
// Tell the module whether an exact version has been requested.
|
||||||
std::string exact = this->Name;
|
std::string exact = this->Name;
|
||||||
exact += "_FIND_VERSION_EXACT";
|
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;
|
OriginalDef const& od = i->second;
|
||||||
if(od.exists)
|
if(od.exists)
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(i->first.c_str(), od.value.c_str());
|
this->Makefile->AddDefinition(i->first, od.value.c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->Makefile->RemoveDefinition(i->first.c_str());
|
this->Makefile->RemoveDefinition(i->first);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -582,9 +582,9 @@ bool cmFindPackageCommand::FindModule(bool& found)
|
|||||||
found = true;
|
found = true;
|
||||||
std::string var = this->Name;
|
std::string var = this->Name;
|
||||||
var += "_FIND_MODULE";
|
var += "_FIND_MODULE";
|
||||||
this->Makefile->AddDefinition(var.c_str(), "1");
|
this->Makefile->AddDefinition(var, "1");
|
||||||
bool result = this->ReadListFile(mfile.c_str(), DoPolicyScope);
|
bool result = this->ReadListFile(mfile.c_str(), DoPolicyScope);
|
||||||
this->Makefile->RemoveDefinition(var.c_str());
|
this->Makefile->RemoveDefinition(var);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -602,7 +602,7 @@ bool cmFindPackageCommand::HandlePackageMode()
|
|||||||
upperFound += "_FOUND";
|
upperFound += "_FOUND";
|
||||||
|
|
||||||
// Try to find the config file.
|
// 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
|
// Try to load the config file if the directory is known
|
||||||
bool fileFound = false;
|
bool fileFound = false;
|
||||||
@ -627,14 +627,14 @@ bool cmFindPackageCommand::HandlePackageMode()
|
|||||||
this->FileFound = file;
|
this->FileFound = file;
|
||||||
fileFound = true;
|
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.
|
// Search for the config file if it is not already found.
|
||||||
if(cmSystemTools::IsOff(def) || !fileFound)
|
if(cmSystemTools::IsOff(def) || !fileFound)
|
||||||
{
|
{
|
||||||
fileFound = this->FindConfig();
|
fileFound = this->FindConfig();
|
||||||
def = this->Makefile->GetDefinition(this->Variable.c_str());
|
def = this->Makefile->GetDefinition(this->Variable);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sanity check.
|
// Sanity check.
|
||||||
@ -659,16 +659,16 @@ bool cmFindPackageCommand::HandlePackageMode()
|
|||||||
|
|
||||||
if(fileFound)
|
if(fileFound)
|
||||||
{
|
{
|
||||||
if ((this->Makefile->IsDefinitionSet(foundVar.c_str()))
|
if ((this->Makefile->IsDefinitionSet(foundVar))
|
||||||
&& (this->Makefile->IsOn(foundVar.c_str()) == false))
|
&& (this->Makefile->IsOn(foundVar) == false))
|
||||||
{
|
{
|
||||||
// by removing Foo_FOUND here if it is FALSE, we don't really change
|
// 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,
|
// 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
|
// but we make it possible to detect later on whether the Config file
|
||||||
// has set Foo_FOUND to FALSE itself:
|
// 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.
|
// Set the version variables before loading the config file.
|
||||||
// It may override them.
|
// It may override them.
|
||||||
@ -681,14 +681,14 @@ bool cmFindPackageCommand::HandlePackageMode()
|
|||||||
found = true;
|
found = true;
|
||||||
|
|
||||||
// Check whether the Config file has set Foo_FOUND to FALSE:
|
// Check whether the Config file has set Foo_FOUND to FALSE:
|
||||||
if ((this->Makefile->IsDefinitionSet(foundVar.c_str()))
|
if ((this->Makefile->IsDefinitionSet(foundVar))
|
||||||
&& (this->Makefile->IsOn(foundVar.c_str()) == false))
|
&& (this->Makefile->IsOn(foundVar) == false))
|
||||||
{
|
{
|
||||||
// we get here if the Config file has set Foo_FOUND actively to FALSE
|
// we get here if the Config file has set Foo_FOUND actively to FALSE
|
||||||
found = false;
|
found = false;
|
||||||
configFileSetFOUNDFalse = true;
|
configFileSetFOUNDFalse = true;
|
||||||
notFoundMessage = this->Makefile->GetSafeDefinition(
|
notFoundMessage = this->Makefile->GetSafeDefinition(
|
||||||
notFoundMessageVar.c_str());
|
notFoundMessageVar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -810,18 +810,18 @@ bool cmFindPackageCommand::HandlePackageMode()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set a variable marking whether the package was found.
|
// 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.
|
// Set a variable naming the configuration file that was found.
|
||||||
std::string fileVar = this->Name;
|
std::string fileVar = this->Name;
|
||||||
fileVar += "_CONFIG";
|
fileVar += "_CONFIG";
|
||||||
if(found)
|
if(found)
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(fileVar.c_str(), this->FileFound.c_str());
|
this->Makefile->AddDefinition(fileVar, this->FileFound.c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->Makefile->RemoveDefinition(fileVar.c_str());
|
this->Makefile->RemoveDefinition(fileVar);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string consideredConfigsVar = this->Name;
|
std::string consideredConfigsVar = this->Name;
|
||||||
@ -843,10 +843,10 @@ bool cmFindPackageCommand::HandlePackageMode()
|
|||||||
sep = ";";
|
sep = ";";
|
||||||
}
|
}
|
||||||
|
|
||||||
this->Makefile->AddDefinition(consideredConfigsVar.c_str(),
|
this->Makefile->AddDefinition(consideredConfigsVar,
|
||||||
consideredConfigFiles.c_str());
|
consideredConfigFiles.c_str());
|
||||||
|
|
||||||
this->Makefile->AddDefinition(consideredVersionsVar.c_str(),
|
this->Makefile->AddDefinition(consideredVersionsVar,
|
||||||
consideredVersions.c_str());
|
consideredVersions.c_str());
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -906,7 +906,7 @@ bool cmFindPackageCommand::FindConfig()
|
|||||||
help += this->Name;
|
help += this->Name;
|
||||||
help += ".";
|
help += ".";
|
||||||
// We force the value since we do not get here if it was already set.
|
// 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(),
|
init.c_str(), help.c_str(),
|
||||||
cmCacheManager::PATH, true);
|
cmCacheManager::PATH, true);
|
||||||
return found;
|
return found;
|
||||||
@ -968,7 +968,7 @@ bool cmFindPackageCommand::ReadListFile(const char* f, PolicyScopeRule psr)
|
|||||||
std::string e = "Error reading CMake code from \"";
|
std::string e = "Error reading CMake code from \"";
|
||||||
e += f;
|
e += f;
|
||||||
e += "\".";
|
e += "\".";
|
||||||
this->SetError(e.c_str());
|
this->SetError(e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1048,14 +1048,14 @@ void cmFindPackageCommand::AppendSuccessInformation()
|
|||||||
std::string transitivePropName = "_CMAKE_";
|
std::string transitivePropName = "_CMAKE_";
|
||||||
transitivePropName += this->Name + "_TRANSITIVE_DEPENDENCY";
|
transitivePropName += this->Name + "_TRANSITIVE_DEPENDENCY";
|
||||||
this->Makefile->GetCMakeInstance()
|
this->Makefile->GetCMakeInstance()
|
||||||
->SetProperty(transitivePropName.c_str(), "False");
|
->SetProperty(transitivePropName, "False");
|
||||||
}
|
}
|
||||||
std::string found = this->Name;
|
std::string found = this->Name;
|
||||||
found += "_FOUND";
|
found += "_FOUND";
|
||||||
std::string upperFound = cmSystemTools::UpperCase(found);
|
std::string upperFound = cmSystemTools::UpperCase(found);
|
||||||
|
|
||||||
const char* upperResult = this->Makefile->GetDefinition(upperFound.c_str());
|
const char* upperResult = this->Makefile->GetDefinition(upperFound);
|
||||||
const char* result = this->Makefile->GetDefinition(found.c_str());
|
const char* result = this->Makefile->GetDefinition(found);
|
||||||
bool packageFound = ((cmSystemTools::IsOn(result))
|
bool packageFound = ((cmSystemTools::IsOn(result))
|
||||||
|| (cmSystemTools::IsOn(upperResult)));
|
|| (cmSystemTools::IsOn(upperResult)));
|
||||||
|
|
||||||
@ -1066,7 +1066,7 @@ void cmFindPackageCommand::AppendSuccessInformation()
|
|||||||
std::string quietInfoPropName = "_CMAKE_";
|
std::string quietInfoPropName = "_CMAKE_";
|
||||||
quietInfoPropName += this->Name;
|
quietInfoPropName += this->Name;
|
||||||
quietInfoPropName += "_QUIET";
|
quietInfoPropName += "_QUIET";
|
||||||
this->Makefile->GetCMakeInstance()->SetProperty(quietInfoPropName.c_str(),
|
this->Makefile->GetCMakeInstance()->SetProperty(quietInfoPropName,
|
||||||
this->Quiet ? "TRUE" : "FALSE");
|
this->Quiet ? "TRUE" : "FALSE");
|
||||||
|
|
||||||
// set a global property to record the required version of this package
|
// set a global property to record the required version of this package
|
||||||
@ -1080,7 +1080,7 @@ void cmFindPackageCommand::AppendSuccessInformation()
|
|||||||
versionInfo += " ";
|
versionInfo += " ";
|
||||||
versionInfo += this->Version;
|
versionInfo += this->Version;
|
||||||
}
|
}
|
||||||
this->Makefile->GetCMakeInstance()->SetProperty(versionInfoPropName.c_str(),
|
this->Makefile->GetCMakeInstance()->SetProperty(versionInfoPropName,
|
||||||
versionInfo.c_str());
|
versionInfo.c_str());
|
||||||
if (this->Required)
|
if (this->Required)
|
||||||
{
|
{
|
||||||
@ -1088,7 +1088,7 @@ void cmFindPackageCommand::AppendSuccessInformation()
|
|||||||
requiredInfoPropName += this->Name;
|
requiredInfoPropName += this->Name;
|
||||||
requiredInfoPropName += "_TYPE";
|
requiredInfoPropName += "_TYPE";
|
||||||
this->Makefile->GetCMakeInstance()->SetProperty(
|
this->Makefile->GetCMakeInstance()->SetProperty(
|
||||||
requiredInfoPropName.c_str(), "REQUIRED");
|
requiredInfoPropName, "REQUIRED");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1648,25 +1648,25 @@ void cmFindPackageCommand::StoreVersionFound()
|
|||||||
ver += "_VERSION";
|
ver += "_VERSION";
|
||||||
if(this->VersionFound.empty())
|
if(this->VersionFound.empty())
|
||||||
{
|
{
|
||||||
this->Makefile->RemoveDefinition(ver.c_str());
|
this->Makefile->RemoveDefinition(ver);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(ver.c_str(), this->VersionFound.c_str());
|
this->Makefile->AddDefinition(ver, this->VersionFound.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store the version components.
|
// Store the version components.
|
||||||
char buf[64];
|
char buf[64];
|
||||||
sprintf(buf, "%u", this->VersionFoundMajor);
|
sprintf(buf, "%u", this->VersionFoundMajor);
|
||||||
this->Makefile->AddDefinition((ver+"_MAJOR").c_str(), buf);
|
this->Makefile->AddDefinition(ver+"_MAJOR", buf);
|
||||||
sprintf(buf, "%u", this->VersionFoundMinor);
|
sprintf(buf, "%u", this->VersionFoundMinor);
|
||||||
this->Makefile->AddDefinition((ver+"_MINOR").c_str(), buf);
|
this->Makefile->AddDefinition(ver+"_MINOR", buf);
|
||||||
sprintf(buf, "%u", this->VersionFoundPatch);
|
sprintf(buf, "%u", this->VersionFoundPatch);
|
||||||
this->Makefile->AddDefinition((ver+"_PATCH").c_str(), buf);
|
this->Makefile->AddDefinition(ver+"_PATCH", buf);
|
||||||
sprintf(buf, "%u", this->VersionFoundTweak);
|
sprintf(buf, "%u", this->VersionFoundTweak);
|
||||||
this->Makefile->AddDefinition((ver+"_TWEAK").c_str(), buf);
|
this->Makefile->AddDefinition(ver+"_TWEAK", buf);
|
||||||
sprintf(buf, "%u", this->VersionFoundCount);
|
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)
|
if(this->AlreadyInCacheWithoutMetaInfo)
|
||||||
{
|
{
|
||||||
this->Makefile->AddCacheDefinition(
|
this->Makefile->AddCacheDefinition(
|
||||||
this->VariableName.c_str(), "",
|
this->VariableName, "",
|
||||||
this->VariableDocumentation.c_str(),
|
this->VariableDocumentation.c_str(),
|
||||||
(this->IncludeFileInPath ?
|
(this->IncludeFileInPath ?
|
||||||
cmCacheManager::FILEPATH :cmCacheManager::PATH)
|
cmCacheManager::FILEPATH :cmCacheManager::PATH)
|
||||||
@ -51,14 +51,14 @@ bool cmFindPathCommand
|
|||||||
if(result.size() != 0)
|
if(result.size() != 0)
|
||||||
{
|
{
|
||||||
this->Makefile->AddCacheDefinition
|
this->Makefile->AddCacheDefinition
|
||||||
(this->VariableName.c_str(), result.c_str(),
|
(this->VariableName, result.c_str(),
|
||||||
this->VariableDocumentation.c_str(),
|
this->VariableDocumentation.c_str(),
|
||||||
(this->IncludeFileInPath) ?
|
(this->IncludeFileInPath) ?
|
||||||
cmCacheManager::FILEPATH :cmCacheManager::PATH);
|
cmCacheManager::FILEPATH :cmCacheManager::PATH);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
this->Makefile->AddCacheDefinition
|
this->Makefile->AddCacheDefinition
|
||||||
(this->VariableName.c_str(),
|
(this->VariableName,
|
||||||
(this->VariableName + "-NOTFOUND").c_str(),
|
(this->VariableName + "-NOTFOUND").c_str(),
|
||||||
this->VariableDocumentation.c_str(),
|
this->VariableDocumentation.c_str(),
|
||||||
(this->IncludeFileInPath) ?
|
(this->IncludeFileInPath) ?
|
||||||
|
@ -35,7 +35,7 @@ bool cmFindProgramCommand
|
|||||||
// value.
|
// value.
|
||||||
if(this->AlreadyInCacheWithoutMetaInfo)
|
if(this->AlreadyInCacheWithoutMetaInfo)
|
||||||
{
|
{
|
||||||
this->Makefile->AddCacheDefinition(this->VariableName.c_str(), "",
|
this->Makefile->AddCacheDefinition(this->VariableName, "",
|
||||||
this->VariableDocumentation.c_str(),
|
this->VariableDocumentation.c_str(),
|
||||||
cmCacheManager::FILEPATH);
|
cmCacheManager::FILEPATH);
|
||||||
}
|
}
|
||||||
@ -46,14 +46,14 @@ bool cmFindProgramCommand
|
|||||||
if(result != "")
|
if(result != "")
|
||||||
{
|
{
|
||||||
// Save the value in the cache
|
// Save the value in the cache
|
||||||
this->Makefile->AddCacheDefinition(this->VariableName.c_str(),
|
this->Makefile->AddCacheDefinition(this->VariableName,
|
||||||
result.c_str(),
|
result.c_str(),
|
||||||
this->VariableDocumentation.c_str(),
|
this->VariableDocumentation.c_str(),
|
||||||
cmCacheManager::FILEPATH);
|
cmCacheManager::FILEPATH);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
this->Makefile->AddCacheDefinition(this->VariableName.c_str(),
|
this->Makefile->AddCacheDefinition(this->VariableName,
|
||||||
(this->VariableName + "-NOTFOUND").c_str(),
|
(this->VariableName + "-NOTFOUND").c_str(),
|
||||||
this->VariableDocumentation.c_str(),
|
this->VariableDocumentation.c_str(),
|
||||||
cmCacheManager::FILEPATH);
|
cmCacheManager::FILEPATH);
|
||||||
|
@ -35,9 +35,9 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
|||||||
// at end of for each execute recorded commands
|
// at end of for each execute recorded commands
|
||||||
// store the old value
|
// store the old value
|
||||||
std::string oldDef;
|
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();
|
std::vector<std::string>::const_iterator j = this->Args.begin();
|
||||||
++j;
|
++j;
|
||||||
@ -47,7 +47,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
|||||||
for( ; j != this->Args.end(); ++j)
|
for( ; j != this->Args.end(); ++j)
|
||||||
{
|
{
|
||||||
// set the variable to the loop value
|
// 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.
|
// Invoke all the functions that were collected in the block.
|
||||||
cmExecutionStatus status;
|
cmExecutionStatus status;
|
||||||
for(unsigned int c = 0; c < this->Functions.size(); ++c)
|
for(unsigned int c = 0; c < this->Functions.size(); ++c)
|
||||||
@ -58,13 +58,13 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
|||||||
{
|
{
|
||||||
inStatus.SetReturnInvoked(true);
|
inStatus.SetReturnInvoked(true);
|
||||||
// restore the variable to its prior value
|
// 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;
|
return true;
|
||||||
}
|
}
|
||||||
if (status.GetBreakInvoked())
|
if (status.GetBreakInvoked())
|
||||||
{
|
{
|
||||||
// restore the variable to its prior value
|
// 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;
|
return true;
|
||||||
}
|
}
|
||||||
if(cmSystemTools::GetFatalErrorOccured() )
|
if(cmSystemTools::GetFatalErrorOccured() )
|
||||||
@ -74,7 +74,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// restore the variable to its prior value
|
// 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;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -166,7 +166,7 @@ bool cmForEachCommand
|
|||||||
cmOStringStream str;
|
cmOStringStream str;
|
||||||
str << "called with incorrect range specification: start ";
|
str << "called with incorrect range specification: start ";
|
||||||
str << start << ", stop " << stop << ", step " << step;
|
str << start << ", stop " << stop << ", step " << step;
|
||||||
this->SetError(str.str().c_str());
|
this->SetError(str.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
std::vector<std::string> range;
|
std::vector<std::string> range;
|
||||||
@ -226,7 +226,7 @@ bool cmForEachCommand::HandleInMode(std::vector<std::string> const& args)
|
|||||||
}
|
}
|
||||||
else if(doing == DoingLists)
|
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)
|
if(value && *value)
|
||||||
{
|
{
|
||||||
cmSystemTools::ExpandListArgument(value, f->Args, true);
|
cmSystemTools::ExpandListArgument(value, f->Args, true);
|
||||||
|
@ -89,7 +89,7 @@ bool cmFunctionHelperCommand::InvokeInitialPass
|
|||||||
std::string errorMsg =
|
std::string errorMsg =
|
||||||
"Function invoked with incorrect arguments for function named: ";
|
"Function invoked with incorrect arguments for function named: ";
|
||||||
errorMsg += this->Args[0];
|
errorMsg += this->Args[0];
|
||||||
this->SetError(errorMsg.c_str());
|
this->SetError(errorMsg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,15 +113,15 @@ bool cmFunctionHelperCommand::InvokeInitialPass
|
|||||||
{
|
{
|
||||||
cmOStringStream tmpStream;
|
cmOStringStream tmpStream;
|
||||||
tmpStream << "ARGV" << t;
|
tmpStream << "ARGV" << t;
|
||||||
this->Makefile->AddDefinition(tmpStream.str().c_str(),
|
this->Makefile->AddDefinition(tmpStream.str(),
|
||||||
expandedArgs[t].c_str());
|
expandedArgs[t].c_str());
|
||||||
this->Makefile->MarkVariableAsUsed(tmpStream.str().c_str());
|
this->Makefile->MarkVariableAsUsed(tmpStream.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// define the formal arguments
|
// define the formal arguments
|
||||||
for (unsigned int j = 1; j < this->Args.size(); ++j)
|
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());
|
expandedArgs[j-1].c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,8 +219,8 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string newName = "_" + this->Args[0];
|
std::string newName = "_" + this->Args[0];
|
||||||
mf.GetCMakeInstance()->RenameCommand(this->Args[0].c_str(),
|
mf.GetCMakeInstance()->RenameCommand(this->Args[0],
|
||||||
newName.c_str());
|
newName);
|
||||||
mf.AddCommand(f);
|
mf.AddCommand(f);
|
||||||
|
|
||||||
// remove the function blocker now that the function is defined
|
// remove the function blocker now that the function is defined
|
||||||
|
@ -379,7 +379,7 @@ void cmGeneratorExpression::Split(const std::string &input,
|
|||||||
}
|
}
|
||||||
if(!part.empty())
|
if(!part.empty())
|
||||||
{
|
{
|
||||||
cmSystemTools::ExpandListArgument(part.c_str(), output);
|
cmSystemTools::ExpandListArgument(part, output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pos += 2;
|
pos += 2;
|
||||||
|
@ -92,7 +92,7 @@ void cmGeneratorExpressionDAGChecker::ReportError(
|
|||||||
<< "Self reference on target \""
|
<< "Self reference on target \""
|
||||||
<< context->HeadTarget->GetName() << "\".\n";
|
<< context->HeadTarget->GetName() << "\".\n";
|
||||||
context->Makefile->GetCMakeInstance()
|
context->Makefile->GetCMakeInstance()
|
||||||
->IssueMessage(cmake::FATAL_ERROR, e.str().c_str(),
|
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
||||||
parent->Backtrace);
|
parent->Backtrace);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ void cmGeneratorExpressionDAGChecker::ReportError(
|
|||||||
<< " " << expr << "\n"
|
<< " " << expr << "\n"
|
||||||
<< "Dependency loop found.";
|
<< "Dependency loop found.";
|
||||||
context->Makefile->GetCMakeInstance()
|
context->Makefile->GetCMakeInstance()
|
||||||
->IssueMessage(cmake::FATAL_ERROR, e.str().c_str(),
|
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
||||||
context->Backtrace);
|
context->Backtrace);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ void cmGeneratorExpressionDAGChecker::ReportError(
|
|||||||
<< (parent->Content ? parent->Content->GetOriginalExpression() : expr)
|
<< (parent->Content ? parent->Content->GetOriginalExpression() : expr)
|
||||||
<< "\n";
|
<< "\n";
|
||||||
context->Makefile->GetCMakeInstance()
|
context->Makefile->GetCMakeInstance()
|
||||||
->IssueMessage(cmake::FATAL_ERROR, e.str().c_str(),
|
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
||||||
parent->Backtrace);
|
parent->Backtrace);
|
||||||
parent = parent->Parent;
|
parent = parent->Parent;
|
||||||
++loopStep;
|
++loopStep;
|
||||||
|
@ -50,7 +50,7 @@ void cmGeneratorExpressionEvaluationFile::Generate(const std::string& config,
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "Evaluation file condition \"" << rawCondition << "\" did "
|
e << "Evaluation file condition \"" << rawCondition << "\" did "
|
||||||
"not evaluate to valid content. Got \"" << condResult << "\".";
|
"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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -72,7 +72,7 @@ void cmGeneratorExpressionEvaluationFile::Generate(const std::string& config,
|
|||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "Evaluation file to be written multiple times for different "
|
e << "Evaluation file to be written multiple times for different "
|
||||||
"configurations with different content:\n " << outputFileName;
|
"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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ void cmGeneratorExpressionEvaluationFile::Generate(const std::string& config,
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "Evaluation file \"" << outputFileName << "\" cannot be written.";
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ void cmGeneratorExpressionEvaluationFile::Generate()
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "Evaluation file \"" << this->Input << "\" cannot be read.";
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ void cmGeneratorExpressionEvaluationFile::Generate()
|
|||||||
for(std::vector<std::string>::const_iterator li = allConfigs.begin();
|
for(std::vector<std::string>::const_iterator li = allConfigs.begin();
|
||||||
li != allConfigs.end(); ++li)
|
li != allConfigs.end(); ++li)
|
||||||
{
|
{
|
||||||
this->Generate(li->c_str(), inputExpression.get(), outputFiles);
|
this->Generate(*li, inputExpression.get(), outputFiles);
|
||||||
if(cmSystemTools::GetFatalErrorOccured())
|
if(cmSystemTools::GetFatalErrorOccured())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -39,7 +39,7 @@ void reportError(cmGeneratorExpressionContext *context,
|
|||||||
<< " " << expr << "\n"
|
<< " " << expr << "\n"
|
||||||
<< result;
|
<< result;
|
||||||
context->Makefile->GetCMakeInstance()
|
context->Makefile->GetCMakeInstance()
|
||||||
->IssueMessage(cmake::FATAL_ERROR, e.str().c_str(),
|
->IssueMessage(cmake::FATAL_ERROR, e.str(),
|
||||||
context->Backtrace);
|
context->Backtrace);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -393,8 +393,8 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
|
|||||||
const std::string &lang) const
|
const std::string &lang) const
|
||||||
{
|
{
|
||||||
const char *compilerId = context->Makefile ?
|
const char *compilerId = context->Makefile ?
|
||||||
context->Makefile->GetSafeDefinition((
|
context->Makefile->GetSafeDefinition(
|
||||||
"CMAKE_" + lang + "_COMPILER_ID").c_str()) : "";
|
"CMAKE_" + lang + "_COMPILER_ID") : "";
|
||||||
if (parameters.size() == 0)
|
if (parameters.size() == 0)
|
||||||
{
|
{
|
||||||
return compilerId ? compilerId : "";
|
return compilerId ? compilerId : "";
|
||||||
@ -428,7 +428,7 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
|
|||||||
->GetPolicyWarning(cmPolicies::CMP0044);
|
->GetPolicyWarning(cmPolicies::CMP0044);
|
||||||
context->Makefile->GetCMakeInstance()
|
context->Makefile->GetCMakeInstance()
|
||||||
->IssueMessage(cmake::AUTHOR_WARNING,
|
->IssueMessage(cmake::AUTHOR_WARNING,
|
||||||
e.str().c_str(), context->Backtrace);
|
e.str(), context->Backtrace);
|
||||||
}
|
}
|
||||||
case cmPolicies::OLD:
|
case cmPolicies::OLD:
|
||||||
return "1";
|
return "1";
|
||||||
@ -500,8 +500,8 @@ struct CompilerVersionNode : public cmGeneratorExpressionNode
|
|||||||
const std::string &lang) const
|
const std::string &lang) const
|
||||||
{
|
{
|
||||||
const char *compilerVersion = context->Makefile ?
|
const char *compilerVersion = context->Makefile ?
|
||||||
context->Makefile->GetSafeDefinition((
|
context->Makefile->GetSafeDefinition(
|
||||||
"CMAKE_" + lang + "_COMPILER_VERSION").c_str()) : "";
|
"CMAKE_" + lang + "_COMPILER_VERSION") : "";
|
||||||
if (parameters.size() == 0)
|
if (parameters.size() == 0)
|
||||||
{
|
{
|
||||||
return compilerVersion ? compilerVersion : "";
|
return compilerVersion ? compilerVersion : "";
|
||||||
@ -747,7 +747,7 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode
|
|||||||
std::string mapProp = "MAP_IMPORTED_CONFIG_";
|
std::string mapProp = "MAP_IMPORTED_CONFIG_";
|
||||||
mapProp += cmSystemTools::UpperCase(context->Config);
|
mapProp += cmSystemTools::UpperCase(context->Config);
|
||||||
if(const char* mapValue =
|
if(const char* mapValue =
|
||||||
context->CurrentTarget->GetProperty(mapProp.c_str()))
|
context->CurrentTarget->GetProperty(mapProp))
|
||||||
{
|
{
|
||||||
cmSystemTools::ExpandListArgument(cmSystemTools::UpperCase(mapValue),
|
cmSystemTools::ExpandListArgument(cmSystemTools::UpperCase(mapValue),
|
||||||
mappedConfigs);
|
mappedConfigs);
|
||||||
@ -1022,7 +1022,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *prop = target->GetProperty(propertyName.c_str());
|
const char *prop = target->GetProperty(propertyName);
|
||||||
|
|
||||||
if (dagCheckerParent)
|
if (dagCheckerParent)
|
||||||
{
|
{
|
||||||
|
@ -688,7 +688,7 @@ void cmTargetTraceDependencies::FollowName(std::string const& name)
|
|||||||
if(i == this->NameMap.end())
|
if(i == this->NameMap.end())
|
||||||
{
|
{
|
||||||
// Check if we know how to generate this file.
|
// 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);
|
NameMapType::value_type entry(name, sf);
|
||||||
i = this->NameMap.insert(entry).first;
|
i = this->NameMap.insert(entry).first;
|
||||||
}
|
}
|
||||||
@ -750,7 +750,7 @@ bool cmTargetTraceDependencies::IsUtility(std::string const& dep)
|
|||||||
tLocation = cmSystemTools::CollapseFullPath(tLocation.c_str());
|
tLocation = cmSystemTools::CollapseFullPath(tLocation.c_str());
|
||||||
if(depLocation == tLocation)
|
if(depLocation == tLocation)
|
||||||
{
|
{
|
||||||
this->Target->AddUtility(util.c_str());
|
this->Target->AddUtility(util);
|
||||||
return true;
|
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
|
// The original name of the dependency was not a full path. It
|
||||||
// must name a target, so add the target-level dependency.
|
// must name a target, so add the target-level dependency.
|
||||||
this->Target->AddUtility(util.c_str());
|
this->Target->AddUtility(util);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -793,7 +793,7 @@ cmTargetTraceDependencies
|
|||||||
// this project. Add the target-level dependency to make
|
// this project. Add the target-level dependency to make
|
||||||
// sure the executable is up to date before this custom
|
// sure the executable is up to date before this custom
|
||||||
// command possibly runs.
|
// 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_";
|
std::string defVarName = "OSX_ARCHITECTURES_";
|
||||||
defVarName += cmSystemTools::UpperCase(config);
|
defVarName += cmSystemTools::UpperCase(config);
|
||||||
archs = this->Target->GetProperty(defVarName.c_str());
|
archs = this->Target->GetProperty(defVarName);
|
||||||
}
|
}
|
||||||
if(!archs)
|
if(!archs)
|
||||||
{
|
{
|
||||||
@ -1048,7 +1048,7 @@ void cmGeneratorTarget::ConstructSourceFileFlags() const
|
|||||||
for(std::vector<std::string>::iterator it = relFiles.begin();
|
for(std::vector<std::string>::iterator it = relFiles.begin();
|
||||||
it != relFiles.end(); ++it)
|
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];
|
SourceFileFlags& flags = this->SourceFlagsMap[sf];
|
||||||
flags.MacFolder = "Headers";
|
flags.MacFolder = "Headers";
|
||||||
@ -1066,7 +1066,7 @@ void cmGeneratorTarget::ConstructSourceFileFlags() const
|
|||||||
for(std::vector<std::string>::iterator it = relFiles.begin();
|
for(std::vector<std::string>::iterator it = relFiles.begin();
|
||||||
it != relFiles.end(); ++it)
|
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];
|
SourceFileFlags& flags = this->SourceFlagsMap[sf];
|
||||||
flags.MacFolder = "PrivateHeaders";
|
flags.MacFolder = "PrivateHeaders";
|
||||||
@ -1083,7 +1083,7 @@ void cmGeneratorTarget::ConstructSourceFileFlags() const
|
|||||||
for(std::vector<std::string>::iterator it = relFiles.begin();
|
for(std::vector<std::string>::iterator it = relFiles.begin();
|
||||||
it != relFiles.end(); ++it)
|
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];
|
SourceFileFlags& flags = this->SourceFlagsMap[sf];
|
||||||
flags.MacFolder = "Resources";
|
flags.MacFolder = "Resources";
|
||||||
|
@ -66,14 +66,14 @@ bool cmGetCMakePropertyCommand
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
const char *prop =
|
const char *prop =
|
||||||
this->Makefile->GetCMakeInstance()->GetProperty(args[1].c_str());
|
this->Makefile->GetCMakeInstance()->GetProperty(args[1]);
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
output = prop;
|
output = prop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this->Makefile->AddDefinition(variable.c_str(), output.c_str());
|
this->Makefile->AddDefinition(variable, output.c_str());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ bool cmGetDirectoryPropertyCommand
|
|||||||
// lookup the makefile from the directory name
|
// lookup the makefile from the directory name
|
||||||
cmLocalGenerator *lg =
|
cmLocalGenerator *lg =
|
||||||
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
|
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
|
||||||
FindLocalGenerator(sd.c_str());
|
FindLocalGenerator(sd);
|
||||||
if (!lg)
|
if (!lg)
|
||||||
{
|
{
|
||||||
this->SetError
|
this->SetError
|
||||||
@ -79,18 +79,18 @@ bool cmGetDirectoryPropertyCommand
|
|||||||
"providing the name of the variable to get.");
|
"providing the name of the variable to get.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
output = dir->GetSafeDefinition(i->c_str());
|
output = dir->GetSafeDefinition(*i);
|
||||||
this->Makefile->AddDefinition(variable.c_str(), output.c_str());
|
this->Makefile->AddDefinition(variable, output.c_str());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *prop = dir->GetProperty(i->c_str());
|
const char *prop = dir->GetProperty(*i);
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(variable.c_str(), prop);
|
this->Makefile->AddDefinition(variable, prop);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
this->Makefile->AddDefinition(variable.c_str(), "");
|
this->Makefile->AddDefinition(variable, "");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ bool cmGetFilenameComponentCommand
|
|||||||
// already, if so use that value
|
// already, if so use that value
|
||||||
if(args.size() == 4 && args[3] == "CACHE")
|
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))
|
if(cacheValue && !cmSystemTools::IsNOTFOUND(cacheValue))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
@ -107,7 +107,7 @@ bool cmGetFilenameComponentCommand
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string err = "unknown component " + args[2];
|
std::string err = "unknown component " + args[2];
|
||||||
this->SetError(err.c_str());
|
this->SetError(err);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,12 +116,12 @@ bool cmGetFilenameComponentCommand
|
|||||||
if(programArgs.size() && storeArgs.size())
|
if(programArgs.size() && storeArgs.size())
|
||||||
{
|
{
|
||||||
this->Makefile->AddCacheDefinition
|
this->Makefile->AddCacheDefinition
|
||||||
(storeArgs.c_str(), programArgs.c_str(),
|
(storeArgs, programArgs.c_str(),
|
||||||
"", args[2] == "PATH" ? cmCacheManager::FILEPATH
|
"", args[2] == "PATH" ? cmCacheManager::FILEPATH
|
||||||
: cmCacheManager::STRING);
|
: cmCacheManager::STRING);
|
||||||
}
|
}
|
||||||
this->Makefile->AddCacheDefinition
|
this->Makefile->AddCacheDefinition
|
||||||
(args[0].c_str(), result.c_str(), "",
|
(args[0], result.c_str(), "",
|
||||||
args[2] == "PATH" ? cmCacheManager::FILEPATH
|
args[2] == "PATH" ? cmCacheManager::FILEPATH
|
||||||
: cmCacheManager::STRING);
|
: cmCacheManager::STRING);
|
||||||
}
|
}
|
||||||
@ -129,9 +129,9 @@ bool cmGetFilenameComponentCommand
|
|||||||
{
|
{
|
||||||
if(programArgs.size() && storeArgs.size())
|
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;
|
return true;
|
||||||
|
@ -73,7 +73,7 @@ bool cmGetPropertyCommand
|
|||||||
e << "given invalid scope " << args[1] << ". "
|
e << "given invalid scope " << args[1] << ". "
|
||||||
<< "Valid scopes are "
|
<< "Valid scopes are "
|
||||||
<< "GLOBAL, DIRECTORY, TARGET, SOURCE, TEST, VARIABLE, CACHE.";
|
<< "GLOBAL, DIRECTORY, TARGET, SOURCE, TEST, VARIABLE, CACHE.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ bool cmGetPropertyCommand
|
|||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "given invalid argument \"" << args[i] << "\".";
|
e << "given invalid argument \"" << args[i] << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -139,7 +139,7 @@ bool cmGetPropertyCommand
|
|||||||
std::string output;
|
std::string output;
|
||||||
if(cmPropertyDefinition* def =
|
if(cmPropertyDefinition* def =
|
||||||
this->Makefile->GetCMakeInstance()->
|
this->Makefile->GetCMakeInstance()->
|
||||||
GetPropertyDefinition(this->PropertyName.c_str(), scope))
|
GetPropertyDefinition(this->PropertyName, scope))
|
||||||
{
|
{
|
||||||
output = def->GetShortDescription();
|
output = def->GetShortDescription();
|
||||||
}
|
}
|
||||||
@ -147,7 +147,7 @@ bool cmGetPropertyCommand
|
|||||||
{
|
{
|
||||||
output = "NOTFOUND";
|
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)
|
else if(this->InfoType == OutFullDoc)
|
||||||
{
|
{
|
||||||
@ -155,7 +155,7 @@ bool cmGetPropertyCommand
|
|||||||
std::string output;
|
std::string output;
|
||||||
if(cmPropertyDefinition* def =
|
if(cmPropertyDefinition* def =
|
||||||
this->Makefile->GetCMakeInstance()->
|
this->Makefile->GetCMakeInstance()->
|
||||||
GetPropertyDefinition(this->PropertyName.c_str(), scope))
|
GetPropertyDefinition(this->PropertyName, scope))
|
||||||
{
|
{
|
||||||
output = def->GetFullDescription();
|
output = def->GetFullDescription();
|
||||||
}
|
}
|
||||||
@ -163,19 +163,19 @@ bool cmGetPropertyCommand
|
|||||||
{
|
{
|
||||||
output = "NOTFOUND";
|
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)
|
else if(this->InfoType == OutDefined)
|
||||||
{
|
{
|
||||||
// Lookup if the property is defined
|
// Lookup if the property is defined
|
||||||
if(this->Makefile->GetCMakeInstance()->
|
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
|
else
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(this->Variable.c_str(), "0");
|
this->Makefile->AddDefinition(this->Variable, "0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -204,17 +204,17 @@ bool cmGetPropertyCommand::StoreResult(const char* value)
|
|||||||
{
|
{
|
||||||
if(this->InfoType == OutSet)
|
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)
|
else // if(this->InfoType == OutValue)
|
||||||
{
|
{
|
||||||
if(value)
|
if(value)
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(this->Variable.c_str(), value);
|
this->Makefile->AddDefinition(this->Variable, value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->Makefile->RemoveDefinition(this->Variable.c_str());
|
this->Makefile->RemoveDefinition(this->Variable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -231,7 +231,7 @@ bool cmGetPropertyCommand::HandleGlobalMode()
|
|||||||
|
|
||||||
// Get the property.
|
// Get the property.
|
||||||
cmake* cm = this->Makefile->GetCMakeInstance();
|
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.
|
// Lookup the generator.
|
||||||
if(cmLocalGenerator* lg =
|
if(cmLocalGenerator* lg =
|
||||||
(this->Makefile->GetLocalGenerator()
|
(this->Makefile->GetLocalGenerator()
|
||||||
->GetGlobalGenerator()->FindLocalGenerator(dir.c_str())))
|
->GetGlobalGenerator()->FindLocalGenerator(dir)))
|
||||||
{
|
{
|
||||||
// Use the makefile for the directory found.
|
// Use the makefile for the directory found.
|
||||||
mf = lg->GetMakefile();
|
mf = lg->GetMakefile();
|
||||||
@ -276,7 +276,7 @@ bool cmGetPropertyCommand::HandleDirectoryMode()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the property.
|
// 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))
|
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
|
else
|
||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "could not find TARGET " << this->Name
|
e << "could not find TARGET " << this->Name
|
||||||
<< ". Perhaps it has not yet been created.";
|
<< ". Perhaps it has not yet been created.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -325,17 +325,17 @@ bool cmGetPropertyCommand::HandleSourceMode()
|
|||||||
|
|
||||||
// Get the source file.
|
// Get the source file.
|
||||||
if(cmSourceFile* sf =
|
if(cmSourceFile* sf =
|
||||||
this->Makefile->GetOrCreateSource(this->Name.c_str()))
|
this->Makefile->GetOrCreateSource(this->Name))
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
this->StoreResult(sf->GetPropertyForUser(this->PropertyName.c_str()));
|
this->StoreResult(sf->GetPropertyForUser(this->PropertyName));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "given SOURCE name that could not be found or created: "
|
e << "given SOURCE name that could not be found or created: "
|
||||||
<< this->Name;
|
<< this->Name;
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -350,15 +350,15 @@ bool cmGetPropertyCommand::HandleTestMode()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Loop over all tests looking for matching names.
|
// 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.
|
// If not found it is an error.
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "given TEST name that does not exist: " << this->Name;
|
e << "given TEST name that does not exist: " << this->Name;
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -372,7 +372,7 @@ bool cmGetPropertyCommand::HandleVariableMode()
|
|||||||
}
|
}
|
||||||
|
|
||||||
return this->StoreResult
|
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());
|
this->Makefile->GetCacheManager()->GetCacheIterator(this->Name.c_str());
|
||||||
if(!it.IsAtEnd())
|
if(!it.IsAtEnd())
|
||||||
{
|
{
|
||||||
value = it.GetProperty(this->PropertyName.c_str());
|
value = it.GetProperty(this->PropertyName);
|
||||||
}
|
}
|
||||||
this->StoreResult(value);
|
this->StoreResult(value);
|
||||||
return true;
|
return true;
|
||||||
|
@ -38,7 +38,7 @@ bool cmGetSourceFilePropertyCommand
|
|||||||
this->Makefile->AddDefinition(var, sf->GetLanguage().c_str());
|
this->Makefile->AddDefinition(var, sf->GetLanguage().c_str());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
const char *prop = sf->GetPropertyForUser(args[2].c_str());
|
const char *prop = sf->GetPropertyForUser(args[2]);
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(var, prop);
|
this->Makefile->AddDefinition(var, prop);
|
||||||
|
@ -20,7 +20,7 @@ bool cmGetTargetPropertyCommand
|
|||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
std::string var = args[0].c_str();
|
std::string var = args[0];
|
||||||
const std::string& targetName = args[1];
|
const std::string& targetName = args[1];
|
||||||
std::string prop;
|
std::string prop;
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ bool cmGetTargetPropertyCommand
|
|||||||
else if(cmTarget* tgt = this->Makefile->FindTargetToUse(targetName))
|
else if(cmTarget* tgt = this->Makefile->FindTargetToUse(targetName))
|
||||||
{
|
{
|
||||||
cmTarget& target = *tgt;
|
cmTarget& target = *tgt;
|
||||||
const char* prop_cstr = target.GetProperty(args[2].c_str());
|
const char* prop_cstr = target.GetProperty(args[2]);
|
||||||
if(prop_cstr)
|
if(prop_cstr)
|
||||||
{
|
{
|
||||||
prop = prop_cstr;
|
prop = prop_cstr;
|
||||||
@ -67,7 +67,7 @@ bool cmGetTargetPropertyCommand
|
|||||||
{
|
{
|
||||||
e << "get_target_property() called with non-existent target \""
|
e << "get_target_property() called with non-existent target \""
|
||||||
<< targetName << "\".";
|
<< targetName << "\".";
|
||||||
this->Makefile->IssueMessage(messageType, e.str().c_str());
|
this->Makefile->IssueMessage(messageType, e.str());
|
||||||
if (messageType == cmake::FATAL_ERROR)
|
if (messageType == cmake::FATAL_ERROR)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -76,10 +76,10 @@ bool cmGetTargetPropertyCommand
|
|||||||
}
|
}
|
||||||
if (!prop.empty())
|
if (!prop.empty())
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(var.c_str(), prop.c_str());
|
this->Makefile->AddDefinition(var, prop.c_str());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
this->Makefile->AddDefinition(var.c_str(), (var+"-NOTFOUND").c_str());
|
this->Makefile->AddDefinition(var, (var+"-NOTFOUND").c_str());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,17 +26,17 @@ bool cmGetTestPropertyCommand
|
|||||||
|
|
||||||
std::string testName = args[0];
|
std::string testName = args[0];
|
||||||
std::string var = args[2];
|
std::string var = args[2];
|
||||||
cmTest *test = this->Makefile->GetTest(testName.c_str());
|
cmTest *test = this->Makefile->GetTest(testName);
|
||||||
if (test)
|
if (test)
|
||||||
{
|
{
|
||||||
const char *prop = test->GetProperty(args[1].c_str());
|
const char *prop = test->GetProperty(args[1]);
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(var.c_str(), prop);
|
this->Makefile->AddDefinition(var, prop);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this->Makefile->AddDefinition(var.c_str(), "NOTFOUND");
|
this->Makefile->AddDefinition(var, "NOTFOUND");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
|
|||||||
langComp += lang;
|
langComp += lang;
|
||||||
langComp += "_COMPILER";
|
langComp += "_COMPILER";
|
||||||
|
|
||||||
if(!mf->GetDefinition(langComp.c_str()))
|
if(!mf->GetDefinition(langComp))
|
||||||
{
|
{
|
||||||
if(!optional)
|
if(!optional)
|
||||||
{
|
{
|
||||||
@ -132,7 +132,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const char* name = mf->GetRequiredDefinition(langComp.c_str());
|
const char* name = mf->GetRequiredDefinition(langComp);
|
||||||
std::string path;
|
std::string path;
|
||||||
if(!cmSystemTools::FileIsFullPath(name))
|
if(!cmSystemTools::FileIsFullPath(name))
|
||||||
{
|
{
|
||||||
@ -150,7 +150,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
|
|||||||
std::string doc = lang;
|
std::string doc = lang;
|
||||||
doc += " compiler.";
|
doc += " compiler.";
|
||||||
const char* cname = this->GetCMakeInstance()->
|
const char* cname = this->GetCMakeInstance()->
|
||||||
GetCacheManager()->GetCacheValue(langComp.c_str());
|
GetCacheManager()->GetCacheValue(langComp);
|
||||||
std::string changeVars;
|
std::string changeVars;
|
||||||
if(cname && !optional)
|
if(cname && !optional)
|
||||||
{
|
{
|
||||||
@ -185,7 +185,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
|
|||||||
changeVars.c_str());
|
changeVars.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mf->AddCacheDefinition(langComp.c_str(), path.c_str(),
|
mf->AddCacheDefinition(langComp, path.c_str(),
|
||||||
doc.c_str(), cmCacheManager::FILEPATH);
|
doc.c_str(), cmCacheManager::FILEPATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -457,7 +457,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
|||||||
std::string loadedLang = "CMAKE_";
|
std::string loadedLang = "CMAKE_";
|
||||||
loadedLang += lang;
|
loadedLang += lang;
|
||||||
loadedLang += "_COMPILER_LOADED";
|
loadedLang += "_COMPILER_LOADED";
|
||||||
if(!mf->GetDefinition(loadedLang.c_str()))
|
if(!mf->GetDefinition(loadedLang))
|
||||||
{
|
{
|
||||||
fpath = rootBin;
|
fpath = rootBin;
|
||||||
fpath += "/CMake";
|
fpath += "/CMake";
|
||||||
@ -518,9 +518,9 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
|||||||
std::string compilerEnv = "CMAKE_";
|
std::string compilerEnv = "CMAKE_";
|
||||||
compilerEnv += lang;
|
compilerEnv += lang;
|
||||||
compilerEnv += "_COMPILER_ENV_VAR";
|
compilerEnv += "_COMPILER_ENV_VAR";
|
||||||
std::string envVar = mf->GetRequiredDefinition(compilerEnv.c_str());
|
std::string envVar = mf->GetRequiredDefinition(compilerEnv);
|
||||||
std::string envVarValue =
|
std::string envVarValue =
|
||||||
mf->GetRequiredDefinition(compilerName.c_str());
|
mf->GetRequiredDefinition(compilerName);
|
||||||
std::string env = envVar;
|
std::string env = envVar;
|
||||||
env += "=";
|
env += "=";
|
||||||
env += envVarValue;
|
env += envVarValue;
|
||||||
@ -578,7 +578,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
|||||||
compilerEnv += lang;
|
compilerEnv += lang;
|
||||||
compilerEnv += "_COMPILER_ENV_VAR";
|
compilerEnv += "_COMPILER_ENV_VAR";
|
||||||
cmOStringStream noCompiler;
|
cmOStringStream noCompiler;
|
||||||
const char* compilerFile = mf->GetDefinition(compilerName.c_str());
|
const char* compilerFile = mf->GetDefinition(compilerName);
|
||||||
if(!compilerFile || !*compilerFile ||
|
if(!compilerFile || !*compilerFile ||
|
||||||
cmSystemTools::IsNOTFOUND(compilerFile))
|
cmSystemTools::IsNOTFOUND(compilerFile))
|
||||||
{
|
{
|
||||||
@ -621,7 +621,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
|||||||
if(!this->CMakeInstance->GetIsInTryCompile())
|
if(!this->CMakeInstance->GetIsInTryCompile())
|
||||||
{
|
{
|
||||||
this->PrintCompilerAdvice(noCompiler, lang,
|
this->PrintCompilerAdvice(noCompiler, lang,
|
||||||
mf->GetDefinition(compilerEnv.c_str()));
|
mf->GetDefinition(compilerEnv));
|
||||||
mf->IssueMessage(cmake::FATAL_ERROR, noCompiler.str());
|
mf->IssueMessage(cmake::FATAL_ERROR, noCompiler.str());
|
||||||
fatalError = true;
|
fatalError = true;
|
||||||
}
|
}
|
||||||
@ -631,7 +631,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
|||||||
std::string langLoadedVar = "CMAKE_";
|
std::string langLoadedVar = "CMAKE_";
|
||||||
langLoadedVar += lang;
|
langLoadedVar += lang;
|
||||||
langLoadedVar += "_INFORMATION_LOADED";
|
langLoadedVar += "_INFORMATION_LOADED";
|
||||||
if (!mf->GetDefinition(langLoadedVar.c_str()))
|
if (!mf->GetDefinition(langLoadedVar))
|
||||||
{
|
{
|
||||||
fpath = "CMake";
|
fpath = "CMake";
|
||||||
fpath += lang;
|
fpath += lang;
|
||||||
@ -678,7 +678,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
|||||||
// if the compiler did not work, then remove the
|
// if the compiler did not work, then remove the
|
||||||
// CMake(LANG)Compiler.cmake file so that it will get tested the
|
// CMake(LANG)Compiler.cmake file so that it will get tested the
|
||||||
// next time cmake is run
|
// next time cmake is run
|
||||||
if(!mf->IsOn(compilerWorks.c_str()))
|
if(!mf->IsOn(compilerWorks))
|
||||||
{
|
{
|
||||||
std::string compilerLangFile = rootBin;
|
std::string compilerLangFile = rootBin;
|
||||||
compilerLangFile += "/CMake";
|
compilerLangFile += "/CMake";
|
||||||
@ -693,7 +693,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
|||||||
sharedLibFlagsVar += lang;
|
sharedLibFlagsVar += lang;
|
||||||
sharedLibFlagsVar += "_FLAGS";
|
sharedLibFlagsVar += "_FLAGS";
|
||||||
const char* sharedLibFlags =
|
const char* sharedLibFlags =
|
||||||
mf->GetSafeDefinition(sharedLibFlagsVar.c_str());
|
mf->GetSafeDefinition(sharedLibFlagsVar);
|
||||||
if (sharedLibFlags)
|
if (sharedLibFlags)
|
||||||
{
|
{
|
||||||
this->LanguageToOriginalSharedLibFlags[lang] = sharedLibFlags;
|
this->LanguageToOriginalSharedLibFlags[lang] = sharedLibFlags;
|
||||||
@ -753,7 +753,7 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf,
|
|||||||
std::string const& lang) const
|
std::string const& lang) const
|
||||||
{
|
{
|
||||||
std::string compilerIdVar = "CMAKE_" + lang + "_COMPILER_ID";
|
std::string compilerIdVar = "CMAKE_" + lang + "_COMPILER_ID";
|
||||||
const char* compilerId = mf->GetDefinition(compilerIdVar.c_str());
|
const char* compilerId = mf->GetDefinition(compilerIdVar);
|
||||||
if(!compilerId)
|
if(!compilerId)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -776,7 +776,7 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf,
|
|||||||
}
|
}
|
||||||
case cmPolicies::OLD:
|
case cmPolicies::OLD:
|
||||||
// OLD behavior is to convert AppleClang to Clang.
|
// OLD behavior is to convert AppleClang to Clang.
|
||||||
mf->AddDefinition(compilerIdVar.c_str(), "Clang");
|
mf->AddDefinition(compilerIdVar, "Clang");
|
||||||
break;
|
break;
|
||||||
case cmPolicies::REQUIRED_IF_USED:
|
case cmPolicies::REQUIRED_IF_USED:
|
||||||
case cmPolicies::REQUIRED_ALWAYS:
|
case cmPolicies::REQUIRED_ALWAYS:
|
||||||
@ -807,7 +807,7 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf,
|
|||||||
}
|
}
|
||||||
case cmPolicies::OLD:
|
case cmPolicies::OLD:
|
||||||
// OLD behavior is to convert QCC to GNU.
|
// OLD behavior is to convert QCC to GNU.
|
||||||
mf->AddDefinition(compilerIdVar.c_str(), "GNU");
|
mf->AddDefinition(compilerIdVar, "GNU");
|
||||||
break;
|
break;
|
||||||
case cmPolicies::REQUIRED_IF_USED:
|
case cmPolicies::REQUIRED_IF_USED:
|
||||||
case cmPolicies::REQUIRED_ALWAYS:
|
case cmPolicies::REQUIRED_ALWAYS:
|
||||||
@ -917,7 +917,7 @@ void cmGlobalGenerator::SetLanguageEnabledMaps(const std::string& l,
|
|||||||
|
|
||||||
std::string linkerPrefVar = std::string("CMAKE_") +
|
std::string linkerPrefVar = std::string("CMAKE_") +
|
||||||
std::string(l) + std::string("_LINKER_PREFERENCE");
|
std::string(l) + std::string("_LINKER_PREFERENCE");
|
||||||
const char* linkerPref = mf->GetDefinition(linkerPrefVar.c_str());
|
const char* linkerPref = mf->GetDefinition(linkerPrefVar);
|
||||||
int preference = 0;
|
int preference = 0;
|
||||||
if(linkerPref)
|
if(linkerPref)
|
||||||
{
|
{
|
||||||
@ -950,7 +950,7 @@ void cmGlobalGenerator::SetLanguageEnabledMaps(const std::string& l,
|
|||||||
|
|
||||||
std::string outputExtensionVar = std::string("CMAKE_") +
|
std::string outputExtensionVar = std::string("CMAKE_") +
|
||||||
std::string(l) + std::string("_OUTPUT_EXTENSION");
|
std::string(l) + std::string("_OUTPUT_EXTENSION");
|
||||||
const char* outputExtension = mf->GetDefinition(outputExtensionVar.c_str());
|
const char* outputExtension = mf->GetDefinition(outputExtensionVar);
|
||||||
if(outputExtension)
|
if(outputExtension)
|
||||||
{
|
{
|
||||||
this->LanguageToOutputExtension[l] = outputExtension;
|
this->LanguageToOutputExtension[l] = outputExtension;
|
||||||
@ -968,7 +968,7 @@ void cmGlobalGenerator::SetLanguageEnabledMaps(const std::string& l,
|
|||||||
|
|
||||||
std::string ignoreExtensionsVar = std::string("CMAKE_") +
|
std::string ignoreExtensionsVar = std::string("CMAKE_") +
|
||||||
std::string(l) + std::string("_IGNORE_EXTENSIONS");
|
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;
|
std::vector<std::string> extensionList;
|
||||||
cmSystemTools::ExpandListArgument(ignoreExts, extensionList);
|
cmSystemTools::ExpandListArgument(ignoreExts, extensionList);
|
||||||
for(std::vector<std::string>::iterator i = extensionList.begin();
|
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 extensionsVar = std::string("CMAKE_") +
|
||||||
std::string(l) + std::string("_SOURCE_FILE_EXTENSIONS");
|
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;
|
std::vector<std::string> extensionList;
|
||||||
cmSystemTools::ExpandListArgument(exts, extensionList);
|
cmSystemTools::ExpandListArgument(exts, extensionList);
|
||||||
for(std::vector<std::string>::iterator i = extensionList.begin();
|
for(std::vector<std::string>::iterator i = extensionList.begin();
|
||||||
@ -1389,8 +1389,8 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo()
|
|||||||
{
|
{
|
||||||
std::string defPropName = "COMPILE_DEFINITIONS_";
|
std::string defPropName = "COMPILE_DEFINITIONS_";
|
||||||
defPropName += cmSystemTools::UpperCase(*ci);
|
defPropName += cmSystemTools::UpperCase(*ci);
|
||||||
t->AppendProperty(defPropName.c_str(),
|
t->AppendProperty(defPropName,
|
||||||
mf->GetProperty(defPropName.c_str()));
|
mf->GetProperty(defPropName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1572,7 +1572,7 @@ void cmGlobalGenerator::CheckLocalGenerators()
|
|||||||
std::string incDirs = cmGeneratorExpression::Preprocess(incDirProp,
|
std::string incDirs = cmGeneratorExpression::Preprocess(incDirProp,
|
||||||
cmGeneratorExpression::StripAllGeneratorExpressions);
|
cmGeneratorExpression::StripAllGeneratorExpressions);
|
||||||
|
|
||||||
cmSystemTools::ExpandListArgument(incDirs.c_str(), incs);
|
cmSystemTools::ExpandListArgument(incDirs, incs);
|
||||||
|
|
||||||
for( std::vector<std::string>::const_iterator incDir = incs.begin();
|
for( std::vector<std::string>::const_iterator incDir = incs.begin();
|
||||||
incDir != incs.end(); ++incDir)
|
incDir != incs.end(); ++incDir)
|
||||||
@ -1665,7 +1665,7 @@ int cmGlobalGenerator::TryCompile(const std::string& srcdir,
|
|||||||
std::string config =
|
std::string config =
|
||||||
mf->GetSafeDefinition("CMAKE_TRY_COMPILE_CONFIGURATION");
|
mf->GetSafeDefinition("CMAKE_TRY_COMPILE_CONFIGURATION");
|
||||||
return this->Build(srcdir,bindir,projectName,
|
return this->Build(srcdir,bindir,projectName,
|
||||||
newTarget.c_str(),
|
newTarget,
|
||||||
output,"",config,false,fast,
|
output,"",config,false,fast,
|
||||||
this->TryCompileTimeout);
|
this->TryCompileTimeout);
|
||||||
}
|
}
|
||||||
@ -2115,7 +2115,7 @@ cmGlobalGenerator::NameResolvesToFramework(const std::string& libname) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cmTarget* tgt = this->FindTarget(libname.c_str()))
|
if(cmTarget* tgt = this->FindTarget(libname))
|
||||||
{
|
{
|
||||||
if(tgt->IsFrameworkOnApple())
|
if(tgt->IsFrameworkOnApple())
|
||||||
{
|
{
|
||||||
@ -2318,14 +2318,14 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
|
|||||||
it != componentsSet->end();
|
it != componentsSet->end();
|
||||||
++ it )
|
++ it )
|
||||||
{
|
{
|
||||||
ostr << " \"" << it->c_str() << "\"";
|
ostr << " \"" << *it << "\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ostr << "Only default component available";
|
ostr << "Only default component available";
|
||||||
}
|
}
|
||||||
singleLine.push_back(ostr.str().c_str());
|
singleLine.push_back(ostr.str());
|
||||||
(*targets)["list_install_components"]
|
(*targets)["list_install_components"]
|
||||||
= this->CreateGlobalTarget("list_install_components",
|
= this->CreateGlobalTarget("list_install_components",
|
||||||
ostr.str().c_str(),
|
ostr.str().c_str(),
|
||||||
@ -2356,7 +2356,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
|
|||||||
// automatically convert this name to the build-time location.
|
// automatically convert this name to the build-time location.
|
||||||
cmd = "cmake";
|
cmd = "cmake";
|
||||||
}
|
}
|
||||||
singleLine.push_back(cmd.c_str());
|
singleLine.push_back(cmd);
|
||||||
if ( cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.' )
|
if ( cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.' )
|
||||||
{
|
{
|
||||||
std::string cfgArg = "-DBUILD_TYPE=";
|
std::string cfgArg = "-DBUILD_TYPE=";
|
||||||
@ -2494,7 +2494,7 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(
|
|||||||
std::vector<std::string>::iterator dit;
|
std::vector<std::string>::iterator dit;
|
||||||
for ( dit = depends.begin(); dit != depends.end(); ++ dit )
|
for ( dit = depends.begin(); dit != depends.end(); ++ dit )
|
||||||
{
|
{
|
||||||
target.AddUtility(dit->c_str());
|
target.AddUtility(*dit);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Organize in the "predefined targets" folder:
|
// 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).
|
// Shorten the output name (in expected use case).
|
||||||
cmLocalGenerator* lg = this->GetLocalGenerators()[0];
|
cmLocalGenerator* lg = this->GetLocalGenerators()[0];
|
||||||
std::string fname = lg->Convert(outputs[0].c_str(),
|
std::string fname = lg->Convert(outputs[0],
|
||||||
cmLocalGenerator::HOME_OUTPUT);
|
cmLocalGenerator::HOME_OUTPUT);
|
||||||
|
|
||||||
// Associate the hash with this output.
|
// Associate the hash with this output.
|
||||||
|
@ -183,7 +183,7 @@ bool cmGlobalKdevelopGenerator
|
|||||||
(strstr(tmp.c_str(),
|
(strstr(tmp.c_str(),
|
||||||
cmake::GetCMakeFilesDirectoryPostSlash())==0))
|
cmake::GetCMakeFilesDirectoryPostSlash())==0))
|
||||||
{
|
{
|
||||||
files.insert(tmp.c_str());
|
files.insert(tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -360,7 +360,7 @@ void cmGlobalKdevelopGenerator
|
|||||||
if (strstr(line, "<general>"))
|
if (strstr(line, "<general>"))
|
||||||
{
|
{
|
||||||
fout<< " <projectmanagement>KDevCustomProject</projectmanagement>\n";
|
fout<< " <projectmanagement>KDevCustomProject</projectmanagement>\n";
|
||||||
fout<< " <projectdirectory>" <<projectDir.c_str()
|
fout<< " <projectdirectory>" <<projectDir
|
||||||
<< "</projectdirectory>\n"; //this one is important
|
<< "</projectdirectory>\n"; //this one is important
|
||||||
fout<<" <absoluteprojectpath>true</absoluteprojectpath>\n";
|
fout<<" <absoluteprojectpath>true</absoluteprojectpath>\n";
|
||||||
//and this one
|
//and this one
|
||||||
@ -368,14 +368,14 @@ void cmGlobalKdevelopGenerator
|
|||||||
// inside kdevcustomproject the <filelistdirectory> must be put
|
// inside kdevcustomproject the <filelistdirectory> must be put
|
||||||
if (strstr(line, "<kdevcustomproject>"))
|
if (strstr(line, "<kdevcustomproject>"))
|
||||||
{
|
{
|
||||||
fout<<" <filelistdirectory>"<<outputDir.c_str()
|
fout<<" <filelistdirectory>"<<outputDir
|
||||||
<<"</filelistdirectory>\n";
|
<<"</filelistdirectory>\n";
|
||||||
}
|
}
|
||||||
// buildtool and builddir go inside <build>
|
// buildtool and builddir go inside <build>
|
||||||
if (strstr(line, "<build>"))
|
if (strstr(line, "<build>"))
|
||||||
{
|
{
|
||||||
fout<<" <buildtool>make</buildtool>\n";
|
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"
|
" <projectmanagement>KDevCustomProject</projectmanagement>\n"
|
||||||
" <primarylanguage>" << primaryLanguage << "</primarylanguage>\n"
|
" <primarylanguage>" << primaryLanguage << "</primarylanguage>\n"
|
||||||
" <ignoreparts/>\n"
|
" <ignoreparts/>\n"
|
||||||
" <projectdirectory>" << projectDir.c_str() <<
|
" <projectdirectory>" << projectDir <<
|
||||||
"</projectdirectory>\n"; //this one is important
|
"</projectdirectory>\n"; //this one is important
|
||||||
fout<<" <absoluteprojectpath>true</absoluteprojectpath>\n"; //and this one
|
fout<<" <absoluteprojectpath>true</absoluteprojectpath>\n"; //and this one
|
||||||
|
|
||||||
@ -444,12 +444,12 @@ void cmGlobalKdevelopGenerator
|
|||||||
|
|
||||||
fout<<" </general>\n"
|
fout<<" </general>\n"
|
||||||
" <kdevcustomproject>\n"
|
" <kdevcustomproject>\n"
|
||||||
" <filelistdirectory>" << outputDir.c_str() <<
|
" <filelistdirectory>" << outputDir <<
|
||||||
"</filelistdirectory>\n"
|
"</filelistdirectory>\n"
|
||||||
" <run>\n"
|
" <run>\n"
|
||||||
" <mainprogram>" << executable.c_str() << "</mainprogram>\n"
|
" <mainprogram>" << executable << "</mainprogram>\n"
|
||||||
" <directoryradio>custom</directoryradio>\n"
|
" <directoryradio>custom</directoryradio>\n"
|
||||||
" <customdirectory>"<<outputDir.c_str()<<"</customdirectory>\n"
|
" <customdirectory>"<<outputDir<<"</customdirectory>\n"
|
||||||
" <programargs></programargs>\n"
|
" <programargs></programargs>\n"
|
||||||
" <terminal>false</terminal>\n"
|
" <terminal>false</terminal>\n"
|
||||||
" <autocompile>true</autocompile>\n"
|
" <autocompile>true</autocompile>\n"
|
||||||
@ -457,7 +457,7 @@ void cmGlobalKdevelopGenerator
|
|||||||
" </run>\n"
|
" </run>\n"
|
||||||
" <build>\n"
|
" <build>\n"
|
||||||
" <buildtool>make</buildtool>\n"; //this one is important
|
" <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"
|
fout<<" </build>\n"
|
||||||
" <make>\n"
|
" <make>\n"
|
||||||
" <abortonerror>false</abortonerror>\n"
|
" <abortonerror>false</abortonerror>\n"
|
||||||
@ -480,7 +480,7 @@ void cmGlobalKdevelopGenerator
|
|||||||
dirIt != this->Blacklist.end();
|
dirIt != this->Blacklist.end();
|
||||||
++dirIt)
|
++dirIt)
|
||||||
{
|
{
|
||||||
fout<<" <path>" << dirIt->c_str() << "</path>\n";
|
fout<<" <path>" << *dirIt << "</path>\n";
|
||||||
}
|
}
|
||||||
fout<<" </blacklist>\n";
|
fout<<" </blacklist>\n";
|
||||||
|
|
||||||
@ -558,7 +558,7 @@ void cmGlobalKdevelopGenerator
|
|||||||
// command
|
// command
|
||||||
fout<<" <kdevfileview>\n"
|
fout<<" <kdevfileview>\n"
|
||||||
" <groups>\n"
|
" <groups>\n"
|
||||||
" <group pattern=\"" << cmakeFilePattern.c_str() <<
|
" <group pattern=\"" << cmakeFilePattern <<
|
||||||
"\" name=\"CMake\" />\n";
|
"\" name=\"CMake\" />\n";
|
||||||
|
|
||||||
if (enableCxx)
|
if (enableCxx)
|
||||||
@ -601,7 +601,7 @@ void cmGlobalKdevelopGenerator
|
|||||||
"<!DOCTYPE KDevPrjSession>\n"
|
"<!DOCTYPE KDevPrjSession>\n"
|
||||||
"<KDevPrjSession>\n"
|
"<KDevPrjSession>\n"
|
||||||
" <DocsAndViews NumberOfDocuments=\"1\" >\n"
|
" <DocsAndViews NumberOfDocuments=\"1\" >\n"
|
||||||
" <Doc0 NumberOfViews=\"1\" URL=\"file://" << fileToOpen.c_str() <<
|
" <Doc0 NumberOfViews=\"1\" URL=\"file://" << fileToOpen <<
|
||||||
"\" >\n"
|
"\" >\n"
|
||||||
" <View0 line=\"0\" Type=\"Source\" />\n"
|
" <View0 line=\"0\" Type=\"Source\" />\n"
|
||||||
" </Doc0>\n"
|
" </Doc0>\n"
|
||||||
|
@ -1159,7 +1159,7 @@ void cmGlobalNinjaGenerator::WriteTargetClean(std::ostream& os)
|
|||||||
{
|
{
|
||||||
WriteRule(*this->RulesFileStream,
|
WriteRule(*this->RulesFileStream,
|
||||||
"CLEAN",
|
"CLEAN",
|
||||||
(ninjaCmd() + " -t clean").c_str(),
|
ninjaCmd() + " -t clean",
|
||||||
"Cleaning all built files...",
|
"Cleaning all built files...",
|
||||||
"Rule for cleaning all built files.",
|
"Rule for cleaning all built files.",
|
||||||
/*depfile=*/ "",
|
/*depfile=*/ "",
|
||||||
@ -1182,7 +1182,7 @@ void cmGlobalNinjaGenerator::WriteTargetHelp(std::ostream& os)
|
|||||||
{
|
{
|
||||||
WriteRule(*this->RulesFileStream,
|
WriteRule(*this->RulesFileStream,
|
||||||
"HELP",
|
"HELP",
|
||||||
(ninjaCmd() + " -t targets").c_str(),
|
ninjaCmd() + " -t targets",
|
||||||
"All primary targets available:",
|
"All primary targets available:",
|
||||||
"Rule for printing all primary targets available.",
|
"Rule for printing all primary targets available.",
|
||||||
/*depfile=*/ "",
|
/*depfile=*/ "",
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user