Remove some c_str() calls.
Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
This commit is contained in:
parent
e21ffaf8fe
commit
21c573f682
|
@ -506,7 +506,7 @@ int cmCPackDebGenerator::createDeb()
|
||||||
controlExtraList.begin(); i != controlExtraList.end(); ++i)
|
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;
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
|
@ -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,
|
||||||
|
@ -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 =
|
||||||
|
@ -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"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
|
|
|
@ -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\\"
|
||||||
|
|
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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.
|
||||||
|
@ -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 )
|
||||||
{
|
{
|
||||||
|
@ -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
|
||||||
|
@ -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 + "\" " +
|
||||||
|
@ -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());
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ bool cmCTestEmptyBinaryDirectoryCommand
|
||||||
{
|
{
|
||||||
cmOStringStream ostr;
|
cmOStringStream ostr;
|
||||||
ostr << "problem removing the binary directory: " << args[0].c_str();
|
ostr << "problem removing the binary directory: " << args[0].c_str();
|
||||||
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,7 +121,7 @@ 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().c_str()
|
||||||
|
@ -153,7 +153,7 @@ 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().c_str() << std::endl);
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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();
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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" )
|
||||||
|
|
|
@ -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())
|
||||||
{
|
{
|
||||||
|
@ -288,7 +288,7 @@ bool cmAddCustomCommandCommand
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "given APPEND option with output \"" << output[0].c_str()
|
e << "given APPEND option with output \"" << output[0].c_str()
|
||||||
<< "\" 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ bool cmCMakeMinimumRequired
|
||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "could not parse VERSION \"" << version_string.c_str() << "\".";
|
e << "could not parse VERSION \"" << version_string.c_str() << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
|
|
@ -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))
|
||||||
|
@ -688,7 +688,7 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
||||||
{
|
{
|
||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
@ -2611,7 +2611,7 @@ 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->c_str() << std::endl);
|
||||||
vec.push_back(it->c_str());
|
vec.push_back(*it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key,
|
||||||
{
|
{
|
||||||
if (this->EscapeQuotes)
|
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)
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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)
|
||||||
|
@ -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,7 +274,7 @@ 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;
|
||||||
|
|
|
@ -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,7 +449,7 @@ 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;
|
||||||
|
@ -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";
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
@ -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)
|
||||||
|
@ -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")
|
||||||
{
|
{
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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]);
|
||||||
|
@ -269,7 +269,7 @@ bool cmFindPackageCommand
|
||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "called with invalid argument \"" << args[i].c_str() << "\"";
|
e << "called with invalid argument \"" << args[i].c_str() << "\"";
|
||||||
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())
|
||||||
{
|
{
|
||||||
|
@ -2325,7 +2325,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
|
||||||
{
|
{
|
||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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=*/ "",
|
||||||
|
|
|
@ -356,14 +356,14 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||||
<< "# The top level Makefile was generated from the following files:\n"
|
<< "# The top level Makefile was generated from the following files:\n"
|
||||||
<< "set(CMAKE_MAKEFILE_DEPENDS\n"
|
<< "set(CMAKE_MAKEFILE_DEPENDS\n"
|
||||||
<< " \""
|
<< " \""
|
||||||
<< lg->Convert(cache.c_str(),
|
<< lg->Convert(cache,
|
||||||
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n";
|
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n";
|
||||||
for(std::vector<std::string>::const_iterator i = lfiles.begin();
|
for(std::vector<std::string>::const_iterator i = lfiles.begin();
|
||||||
i != lfiles.end(); ++i)
|
i != lfiles.end(); ++i)
|
||||||
{
|
{
|
||||||
cmakefileStream
|
cmakefileStream
|
||||||
<< " \""
|
<< " \""
|
||||||
<< lg->Convert(i->c_str(), cmLocalGenerator::START_OUTPUT).c_str()
|
<< lg->Convert(*i, cmLocalGenerator::START_OUTPUT).c_str()
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
}
|
}
|
||||||
cmakefileStream
|
cmakefileStream
|
||||||
|
@ -379,10 +379,10 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||||
<< "# The corresponding makefile is:\n"
|
<< "# The corresponding makefile is:\n"
|
||||||
<< "set(CMAKE_MAKEFILE_OUTPUTS\n"
|
<< "set(CMAKE_MAKEFILE_OUTPUTS\n"
|
||||||
<< " \""
|
<< " \""
|
||||||
<< lg->Convert(makefileName.c_str(),
|
<< lg->Convert(makefileName,
|
||||||
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n"
|
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n"
|
||||||
<< " \""
|
<< " \""
|
||||||
<< lg->Convert(check.c_str(),
|
<< lg->Convert(check,
|
||||||
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n";
|
cmLocalGenerator::START_OUTPUT).c_str() << "\"\n";
|
||||||
cmakefileStream << " )\n\n";
|
cmakefileStream << " )\n\n";
|
||||||
|
|
||||||
|
@ -397,7 +397,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||||
k != outfiles.end(); ++k)
|
k != outfiles.end(); ++k)
|
||||||
{
|
{
|
||||||
cmakefileStream << " \"" <<
|
cmakefileStream << " \"" <<
|
||||||
lg->Convert(k->c_str(),cmLocalGenerator::HOME_OUTPUT).c_str()
|
lg->Convert(*k,cmLocalGenerator::HOME_OUTPUT).c_str()
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -411,7 +411,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
|
||||||
tmpStr += cmake::GetCMakeFilesDirectory();
|
tmpStr += cmake::GetCMakeFilesDirectory();
|
||||||
tmpStr += "/CMakeDirectoryInformation.cmake";
|
tmpStr += "/CMakeDirectoryInformation.cmake";
|
||||||
cmakefileStream << " \"" <<
|
cmakefileStream << " \"" <<
|
||||||
lg->Convert(tmpStr.c_str(),cmLocalGenerator::HOME_OUTPUT).c_str()
|
lg->Convert(tmpStr,cmLocalGenerator::HOME_OUTPUT).c_str()
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
}
|
}
|
||||||
cmakefileStream << " )\n\n";
|
cmakefileStream << " )\n\n";
|
||||||
|
@ -494,7 +494,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
if((!check_all || !gtarget->GetPropertyAsBool("EXCLUDE_FROM_ALL")) &&
|
if((!check_all || !gtarget->GetPropertyAsBool("EXCLUDE_FROM_ALL")) &&
|
||||||
(!check_relink ||
|
(!check_relink ||
|
||||||
gtarget->Target
|
gtarget->Target
|
||||||
->NeedRelinkBeforeInstall(lg->ConfigurationName.c_str())))
|
->NeedRelinkBeforeInstall(lg->ConfigurationName)))
|
||||||
{
|
{
|
||||||
std::string tname = lg->GetRelativeTargetDirectory(*gtarget->Target);
|
std::string tname = lg->GetRelativeTargetDirectory(*gtarget->Target);
|
||||||
tname += "/";
|
tname += "/";
|
||||||
|
@ -530,7 +530,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
doc += "\" pass in the directory.";
|
doc += "\" pass in the directory.";
|
||||||
std::vector<std::string> no_commands;
|
std::vector<std::string> no_commands;
|
||||||
lg->WriteMakeRule(ruleFileStream, doc.c_str(),
|
lg->WriteMakeRule(ruleFileStream, doc.c_str(),
|
||||||
makeTarget.c_str(), depends, no_commands, true);
|
makeTarget, depends, no_commands, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -547,7 +547,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
|
|
||||||
// Begin the directory-level rules section.
|
// Begin the directory-level rules section.
|
||||||
std::string dir = lg->GetMakefile()->GetStartOutputDirectory();
|
std::string dir = lg->GetMakefile()->GetStartOutputDirectory();
|
||||||
dir = lg->Convert(dir.c_str(), cmLocalGenerator::HOME_OUTPUT,
|
dir = lg->Convert(dir, cmLocalGenerator::HOME_OUTPUT,
|
||||||
cmLocalGenerator::MAKEFILE);
|
cmLocalGenerator::MAKEFILE);
|
||||||
lg->WriteDivider(ruleFileStream);
|
lg->WriteDivider(ruleFileStream);
|
||||||
ruleFileStream
|
ruleFileStream
|
||||||
|
@ -612,7 +612,7 @@ void cmGlobalUnixMakefileGenerator3
|
||||||
{
|
{
|
||||||
tname += "/fast";
|
tname += "/fast";
|
||||||
}
|
}
|
||||||
tname = lg->Convert(tname.c_str(),cmLocalGenerator::HOME_OUTPUT);
|
tname = lg->Convert(tname,cmLocalGenerator::HOME_OUTPUT);
|
||||||
cmSystemTools::ConvertToOutputSlashes(tname);
|
cmSystemTools::ConvertToOutputSlashes(tname);
|
||||||
makeCommand.push_back(tname);
|
makeCommand.push_back(tname);
|
||||||
if (!this->LocalGenerators.size())
|
if (!this->LocalGenerators.size())
|
||||||
|
@ -697,14 +697,14 @@ cmGlobalUnixMakefileGenerator3
|
||||||
localName = name;
|
localName = name;
|
||||||
localName += "/fast";
|
localName += "/fast";
|
||||||
commands.push_back(lg->GetRecursiveMakeCall
|
commands.push_back(lg->GetRecursiveMakeCall
|
||||||
(makefileName.c_str(), makeTargetName.c_str()));
|
(makefileName.c_str(), makeTargetName));
|
||||||
lg->WriteMakeRule(ruleFileStream, "fast build rule for target.",
|
lg->WriteMakeRule(ruleFileStream, "fast build rule for target.",
|
||||||
localName.c_str(), depends, commands, true);
|
localName, depends, commands, true);
|
||||||
|
|
||||||
// Add a local name for the rule to relink the target before
|
// Add a local name for the rule to relink the target before
|
||||||
// installation.
|
// installation.
|
||||||
if(gtarget->Target
|
if(gtarget->Target
|
||||||
->NeedRelinkBeforeInstall(lg->ConfigurationName.c_str()))
|
->NeedRelinkBeforeInstall(lg->ConfigurationName))
|
||||||
{
|
{
|
||||||
makeTargetName = lg->GetRelativeTargetDirectory(*gtarget->Target);
|
makeTargetName = lg->GetRelativeTargetDirectory(*gtarget->Target);
|
||||||
makeTargetName += "/preinstall";
|
makeTargetName += "/preinstall";
|
||||||
|
@ -713,10 +713,10 @@ cmGlobalUnixMakefileGenerator3
|
||||||
depends.clear();
|
depends.clear();
|
||||||
commands.clear();
|
commands.clear();
|
||||||
commands.push_back(lg->GetRecursiveMakeCall
|
commands.push_back(lg->GetRecursiveMakeCall
|
||||||
(makefileName.c_str(), makeTargetName.c_str()));
|
(makefileName.c_str(), makeTargetName));
|
||||||
lg->WriteMakeRule(ruleFileStream,
|
lg->WriteMakeRule(ruleFileStream,
|
||||||
"Manual pre-install relink rule for target.",
|
"Manual pre-install relink rule for target.",
|
||||||
localName.c_str(), depends, commands, true);
|
localName, depends, commands, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -778,7 +778,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
makeTargetName = localName;
|
makeTargetName = localName;
|
||||||
makeTargetName += "/depend";
|
makeTargetName += "/depend";
|
||||||
commands.push_back(lg->GetRecursiveMakeCall
|
commands.push_back(lg->GetRecursiveMakeCall
|
||||||
(makefileName.c_str(),makeTargetName.c_str()));
|
(makefileName.c_str(),makeTargetName));
|
||||||
|
|
||||||
// add requires if we need it for this generator
|
// add requires if we need it for this generator
|
||||||
if (needRequiresStep)
|
if (needRequiresStep)
|
||||||
|
@ -786,12 +786,12 @@ cmGlobalUnixMakefileGenerator3
|
||||||
makeTargetName = localName;
|
makeTargetName = localName;
|
||||||
makeTargetName += "/requires";
|
makeTargetName += "/requires";
|
||||||
commands.push_back(lg->GetRecursiveMakeCall
|
commands.push_back(lg->GetRecursiveMakeCall
|
||||||
(makefileName.c_str(),makeTargetName.c_str()));
|
(makefileName.c_str(),makeTargetName));
|
||||||
}
|
}
|
||||||
makeTargetName = localName;
|
makeTargetName = localName;
|
||||||
makeTargetName += "/build";
|
makeTargetName += "/build";
|
||||||
commands.push_back(lg->GetRecursiveMakeCall
|
commands.push_back(lg->GetRecursiveMakeCall
|
||||||
(makefileName.c_str(),makeTargetName.c_str()));
|
(makefileName.c_str(),makeTargetName));
|
||||||
|
|
||||||
// Write the rule.
|
// Write the rule.
|
||||||
localName += "/all";
|
localName += "/all";
|
||||||
|
@ -804,7 +804,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
cmOStringStream progCmd;
|
cmOStringStream progCmd;
|
||||||
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report ";
|
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report ";
|
||||||
// all target counts
|
// all target counts
|
||||||
progCmd << lg->Convert(progressDir.c_str(),
|
progCmd << lg->Convert(progressDir,
|
||||||
cmLocalGenerator::FULL,
|
cmLocalGenerator::FULL,
|
||||||
cmLocalGenerator::SHELL);
|
cmLocalGenerator::SHELL);
|
||||||
progCmd << " ";
|
progCmd << " ";
|
||||||
|
@ -823,7 +823,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
|
|
||||||
this->AppendGlobalTargetDepends(depends,*gtarget->Target);
|
this->AppendGlobalTargetDepends(depends,*gtarget->Target);
|
||||||
lg->WriteMakeRule(ruleFileStream, "All Build rule for target.",
|
lg->WriteMakeRule(ruleFileStream, "All Build rule for target.",
|
||||||
localName.c_str(), depends, commands, true);
|
localName, depends, commands, true);
|
||||||
|
|
||||||
// add the all/all dependency
|
// add the all/all dependency
|
||||||
if(!this->IsExcluded(this->LocalGenerators[0], *gtarget->Target))
|
if(!this->IsExcluded(this->LocalGenerators[0], *gtarget->Target))
|
||||||
|
@ -845,7 +845,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
cmOStringStream progCmd;
|
cmOStringStream progCmd;
|
||||||
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
|
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
|
||||||
// # in target
|
// # in target
|
||||||
progCmd << lg->Convert(progressDir.c_str(),
|
progCmd << lg->Convert(progressDir,
|
||||||
cmLocalGenerator::FULL,
|
cmLocalGenerator::FULL,
|
||||||
cmLocalGenerator::SHELL);
|
cmLocalGenerator::SHELL);
|
||||||
//
|
//
|
||||||
|
@ -857,11 +857,11 @@ cmGlobalUnixMakefileGenerator3
|
||||||
std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
|
std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
|
||||||
tmp += "Makefile2";
|
tmp += "Makefile2";
|
||||||
commands.push_back(lg->GetRecursiveMakeCall
|
commands.push_back(lg->GetRecursiveMakeCall
|
||||||
(tmp.c_str(),localName.c_str()));
|
(tmp.c_str(),localName));
|
||||||
{
|
{
|
||||||
cmOStringStream progCmd;
|
cmOStringStream progCmd;
|
||||||
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
|
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
|
||||||
progCmd << lg->Convert(progressDir.c_str(),
|
progCmd << lg->Convert(progressDir,
|
||||||
cmLocalGenerator::FULL,
|
cmLocalGenerator::FULL,
|
||||||
cmLocalGenerator::SHELL);
|
cmLocalGenerator::SHELL);
|
||||||
progCmd << " 0";
|
progCmd << " 0";
|
||||||
|
@ -873,7 +873,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
localName += "/rule";
|
localName += "/rule";
|
||||||
lg->WriteMakeRule(ruleFileStream,
|
lg->WriteMakeRule(ruleFileStream,
|
||||||
"Build rule for subdir invocation for target.",
|
"Build rule for subdir invocation for target.",
|
||||||
localName.c_str(), depends, commands, true);
|
localName, depends, commands, true);
|
||||||
|
|
||||||
// Add a target with the canonical name (no prefix, suffix or path).
|
// Add a target with the canonical name (no prefix, suffix or path).
|
||||||
commands.clear();
|
commands.clear();
|
||||||
|
@ -884,17 +884,17 @@ cmGlobalUnixMakefileGenerator3
|
||||||
|
|
||||||
// Add rules to prepare the target for installation.
|
// Add rules to prepare the target for installation.
|
||||||
if(gtarget->Target
|
if(gtarget->Target
|
||||||
->NeedRelinkBeforeInstall(lg->ConfigurationName.c_str()))
|
->NeedRelinkBeforeInstall(lg->ConfigurationName))
|
||||||
{
|
{
|
||||||
localName = lg->GetRelativeTargetDirectory(*gtarget->Target);
|
localName = lg->GetRelativeTargetDirectory(*gtarget->Target);
|
||||||
localName += "/preinstall";
|
localName += "/preinstall";
|
||||||
depends.clear();
|
depends.clear();
|
||||||
commands.clear();
|
commands.clear();
|
||||||
commands.push_back(lg->GetRecursiveMakeCall
|
commands.push_back(lg->GetRecursiveMakeCall
|
||||||
(makefileName.c_str(), localName.c_str()));
|
(makefileName.c_str(), localName));
|
||||||
lg->WriteMakeRule(ruleFileStream,
|
lg->WriteMakeRule(ruleFileStream,
|
||||||
"Pre-install relink rule for target.",
|
"Pre-install relink rule for target.",
|
||||||
localName.c_str(), depends, commands, true);
|
localName, depends, commands, true);
|
||||||
|
|
||||||
if(!this->IsExcluded(this->LocalGenerators[0], *gtarget->Target))
|
if(!this->IsExcluded(this->LocalGenerators[0], *gtarget->Target))
|
||||||
{
|
{
|
||||||
|
@ -913,9 +913,9 @@ cmGlobalUnixMakefileGenerator3
|
||||||
depends.clear();
|
depends.clear();
|
||||||
commands.clear();
|
commands.clear();
|
||||||
commands.push_back(lg->GetRecursiveMakeCall
|
commands.push_back(lg->GetRecursiveMakeCall
|
||||||
(makefileName.c_str(), makeTargetName.c_str()));
|
(makefileName.c_str(), makeTargetName));
|
||||||
lg->WriteMakeRule(ruleFileStream, "clean rule for target.",
|
lg->WriteMakeRule(ruleFileStream, "clean rule for target.",
|
||||||
makeTargetName.c_str(), depends, commands, true);
|
makeTargetName, depends, commands, true);
|
||||||
commands.clear();
|
commands.clear();
|
||||||
depends.push_back(makeTargetName);
|
depends.push_back(makeTargetName);
|
||||||
lg->WriteMakeRule(ruleFileStream, "clean rule for target.",
|
lg->WriteMakeRule(ruleFileStream, "clean rule for target.",
|
||||||
|
@ -1121,7 +1121,7 @@ bool cmGlobalUnixMakefileGenerator3
|
||||||
std::string var = "CMAKE_NEEDS_REQUIRES_STEP_";
|
std::string var = "CMAKE_NEEDS_REQUIRES_STEP_";
|
||||||
var += *l;
|
var += *l;
|
||||||
var += "_FLAG";
|
var += "_FLAG";
|
||||||
if(target.GetMakefile()->GetDefinition(var.c_str()))
|
if(target.GetMakefile()->GetDefinition(var))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,7 +192,7 @@ void cmGraphVizWriter::WriteTargetDependersFiles(const char* fileName)
|
||||||
std::cout << "Writing " << currentFilename << "..." << std::endl;
|
std::cout << "Writing " << currentFilename << "..." << std::endl;
|
||||||
this->WriteHeader(str);
|
this->WriteHeader(str);
|
||||||
|
|
||||||
this->WriteDependerConnections(ptrIt->first.c_str(),
|
this->WriteDependerConnections(ptrIt->first,
|
||||||
insertedNodes, insertedConnections, str);
|
insertedNodes, insertedConnections, str);
|
||||||
|
|
||||||
this->WriteFooter(str);
|
this->WriteFooter(str);
|
||||||
|
@ -241,7 +241,7 @@ void cmGraphVizWriter::WritePerTargetFiles(const char* fileName)
|
||||||
std::cout << "Writing " << currentFilename << "..." << std::endl;
|
std::cout << "Writing " << currentFilename << "..." << std::endl;
|
||||||
this->WriteHeader(str);
|
this->WriteHeader(str);
|
||||||
|
|
||||||
this->WriteConnections(ptrIt->first.c_str(),
|
this->WriteConnections(ptrIt->first,
|
||||||
insertedNodes, insertedConnections, str);
|
insertedNodes, insertedConnections, str);
|
||||||
this->WriteFooter(str);
|
this->WriteFooter(str);
|
||||||
}
|
}
|
||||||
|
@ -280,7 +280,7 @@ void cmGraphVizWriter::WriteGlobalFile(const char* fileName)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->WriteConnections(ptrIt->first.c_str(),
|
this->WriteConnections(ptrIt->first,
|
||||||
insertedNodes, insertedConnections, str);
|
insertedNodes, insertedConnections, str);
|
||||||
}
|
}
|
||||||
this->WriteFooter(str);
|
this->WriteFooter(str);
|
||||||
|
@ -407,7 +407,7 @@ void cmGraphVizWriter::WriteDependerConnections(const std::string& targetName,
|
||||||
llit != ll->end();
|
llit != ll->end();
|
||||||
++ llit )
|
++ llit )
|
||||||
{
|
{
|
||||||
std::string libName = llit->first.c_str();
|
std::string libName = llit->first;
|
||||||
if (libName == targetName)
|
if (libName == targetName)
|
||||||
{
|
{
|
||||||
// So this target links against targetName.
|
// So this target links against targetName.
|
||||||
|
@ -424,13 +424,13 @@ void cmGraphVizWriter::WriteDependerConnections(const std::string& targetName,
|
||||||
insertedConnections.end())
|
insertedConnections.end())
|
||||||
{
|
{
|
||||||
insertedConnections.insert(connectionName);
|
insertedConnections.insert(connectionName);
|
||||||
this->WriteNode(dependerIt->first.c_str(), dependerIt->second,
|
this->WriteNode(dependerIt->first, dependerIt->second,
|
||||||
insertedNodes, str);
|
insertedNodes, str);
|
||||||
|
|
||||||
str << " \"" << dependerNodeNameIt->second << "\" -> \""
|
str << " \"" << dependerNodeNameIt->second << "\" -> \""
|
||||||
<< myNodeName << "\"";
|
<< myNodeName << "\"";
|
||||||
str << " // " <<targetName<< " -> " <<dependerIt->first<<std::endl;
|
str << " // " <<targetName<< " -> " <<dependerIt->first<<std::endl;
|
||||||
this->WriteDependerConnections(dependerIt->first.c_str(),
|
this->WriteDependerConnections(dependerIt->first,
|
||||||
insertedNodes, insertedConnections, str);
|
insertedNodes, insertedConnections, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ static std::string cmIfCommandError(
|
||||||
i != args.end(); ++i)
|
i != args.end(); ++i)
|
||||||
{
|
{
|
||||||
err += " ";
|
err += " ";
|
||||||
err += lg->EscapeForCMake(i->c_str());
|
err += lg->EscapeForCMake(*i);
|
||||||
}
|
}
|
||||||
err += "\n";
|
err += "\n";
|
||||||
return err;
|
return err;
|
||||||
|
@ -199,7 +199,7 @@ bool cmIfCommand
|
||||||
err += errorString;
|
err += errorString;
|
||||||
if (status == cmake::FATAL_ERROR)
|
if (status == cmake::FATAL_ERROR)
|
||||||
{
|
{
|
||||||
this->SetError(err.c_str());
|
this->SetError(err);
|
||||||
cmSystemTools::SetFatalErrorOccured();
|
cmSystemTools::SetFatalErrorOccured();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -261,7 +261,7 @@ namespace
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check definition.
|
// Check definition.
|
||||||
const char* def = mf->GetDefinition(arg.c_str());
|
const char* def = mf->GetDefinition(arg);
|
||||||
return !cmSystemTools::IsOff(def);
|
return !cmSystemTools::IsOff(def);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,12 +277,12 @@ namespace
|
||||||
else if(arg == "1")
|
else if(arg == "1")
|
||||||
{ return true; }
|
{ return true; }
|
||||||
else
|
else
|
||||||
{ return !cmSystemTools::IsOff(mf->GetDefinition(arg.c_str())); }
|
{ return !cmSystemTools::IsOff(mf->GetDefinition(arg)); }
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Old GetVariableOrNumber behavior.
|
// Old GetVariableOrNumber behavior.
|
||||||
const char* def = mf->GetDefinition(arg.c_str());
|
const char* def = mf->GetDefinition(arg);
|
||||||
if(!def && atoi(arg.c_str()))
|
if(!def && atoi(arg.c_str()))
|
||||||
{
|
{
|
||||||
def = arg.c_str();
|
def = arg.c_str();
|
||||||
|
@ -559,7 +559,7 @@ namespace
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bdef = makefile->IsDefinitionSet((argP1)->c_str());
|
bdef = makefile->IsDefinitionSet(*(argP1));
|
||||||
}
|
}
|
||||||
HandlePredicate(bdef, reducible, arg, newArgs, argP1, argP2);
|
HandlePredicate(bdef, reducible, arg, newArgs, argP1, argP2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ bool cmIncludeCommand
|
||||||
{
|
{
|
||||||
std::string errorText = "called with invalid argument: ";
|
std::string errorText = "called with invalid argument: ";
|
||||||
errorText += args[i];
|
errorText += args[i];
|
||||||
this->SetError(errorText.c_str());
|
this->SetError(errorText);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ bool cmIncludeCommand
|
||||||
"command. It " << modal << " not be used as the argument to the "
|
"command. It " << modal << " not be used as the argument to the "
|
||||||
"include() command. Use ALIAS targets instead to refer to targets "
|
"include() command. Use ALIAS targets instead to refer to targets "
|
||||||
"by alternative names.\n";
|
"by alternative names.\n";
|
||||||
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;
|
||||||
|
@ -139,7 +139,7 @@ bool cmIncludeCommand
|
||||||
// add the location of the included file if a result variable was given
|
// add the location of the included file if a result variable was given
|
||||||
if (resultVarName.size())
|
if (resultVarName.size())
|
||||||
{
|
{
|
||||||
this->Makefile->AddDefinition(resultVarName.c_str(),
|
this->Makefile->AddDefinition(resultVarName,
|
||||||
readit?fullFilePath.c_str():"NOTFOUND");
|
readit?fullFilePath.c_str():"NOTFOUND");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ bool cmIncludeCommand
|
||||||
"could not find load file:\n"
|
"could not find load file:\n"
|
||||||
" ";
|
" ";
|
||||||
m += fname;
|
m += fname;
|
||||||
this->SetError(m.c_str());
|
this->SetError(m);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -24,7 +24,7 @@ bool cmIncludeRegularExpressionCommand
|
||||||
|
|
||||||
if(args.size() > 1)
|
if(args.size() > 1)
|
||||||
{
|
{
|
||||||
this->Makefile->SetComplainRegularExpression(args[1].c_str());
|
this->Makefile->SetComplainRegularExpression(args[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -99,7 +99,7 @@ bool cmInstallCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
// Unknown mode.
|
// Unknown mode.
|
||||||
std::string e = "called with unknown mode ";
|
std::string e = "called with unknown mode ";
|
||||||
e += args[0];
|
e += args[0];
|
||||||
this->SetError(e.c_str());
|
this->SetError(e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
// Unknown argument.
|
// Unknown argument.
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "TARGETS given unknown argument \"" << unknownArgs[0] << "\".";
|
e << "TARGETS given unknown argument \"" << unknownArgs[0] << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,7 +370,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "TARGETS given target \"" << (*targetIt)
|
e << "TARGETS given target \"" << (*targetIt)
|
||||||
<< "\" which is an alias.";
|
<< "\" which is an alias.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Lookup this target in the current directory.
|
// Lookup this target in the current directory.
|
||||||
|
@ -387,7 +387,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "TARGETS given target \"" << (*targetIt)
|
e << "TARGETS given target \"" << (*targetIt)
|
||||||
<< "\" which is not an executable, library, or module.";
|
<< "\" which is not an executable, library, or module.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if(target->GetType() == cmTarget::OBJECT_LIBRARY)
|
else if(target->GetType() == cmTarget::OBJECT_LIBRARY)
|
||||||
|
@ -395,7 +395,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "TARGETS given OBJECT library \"" << (*targetIt)
|
e << "TARGETS given OBJECT library \"" << (*targetIt)
|
||||||
<< "\" which may not be installed.";
|
<< "\" which may not be installed.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Store the target in the list to be installed.
|
// Store the target in the list to be installed.
|
||||||
|
@ -407,7 +407,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "TARGETS given target \"" << (*targetIt)
|
e << "TARGETS given target \"" << (*targetIt)
|
||||||
<< "\" which does not exist in this directory.";
|
<< "\" which does not exist in this directory.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -499,7 +499,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "TARGETS given no FRAMEWORK DESTINATION for shared library "
|
e << "TARGETS given no FRAMEWORK DESTINATION for shared library "
|
||||||
"FRAMEWORK target \"" << target.GetName() << "\".";
|
"FRAMEWORK target \"" << target.GetName() << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -519,7 +519,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "TARGETS given no LIBRARY DESTINATION for shared library "
|
e << "TARGETS given no LIBRARY DESTINATION for shared library "
|
||||||
"target \"" << target.GetName() << "\".";
|
"target \"" << target.GetName() << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -539,7 +539,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "TARGETS given no ARCHIVE DESTINATION for static library "
|
e << "TARGETS given no ARCHIVE DESTINATION for static library "
|
||||||
"target \"" << target.GetName() << "\".";
|
"target \"" << target.GetName() << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -560,7 +560,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "TARGETS given no LIBRARY DESTINATION for module target \""
|
e << "TARGETS given no LIBRARY DESTINATION for module target \""
|
||||||
<< target.GetName() << "\".";
|
<< target.GetName() << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -595,7 +595,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE "
|
e << "TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE "
|
||||||
"executable target \"" << target.GetName() << "\".";
|
"executable target \"" << target.GetName() << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -612,7 +612,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "TARGETS given no RUNTIME DESTINATION for executable "
|
e << "TARGETS given no RUNTIME DESTINATION for executable "
|
||||||
"target \"" << target.GetName() << "\".";
|
"target \"" << target.GetName() << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -851,7 +851,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args)
|
||||||
// Unknown argument.
|
// Unknown argument.
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " given unknown argument \"" << unknownArgs[0] << "\".";
|
e << args[0] << " given unknown argument \"" << unknownArgs[0] << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -866,7 +866,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args)
|
||||||
// The rename option works only with one file.
|
// The rename option works only with one file.
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " given RENAME option with more than one file.";
|
e << args[0] << " given RENAME option with more than one file.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -886,7 +886,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args)
|
||||||
// A destination is required.
|
// A destination is required.
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " given no DESTINATION!";
|
e << args[0] << " given no DESTINATION!";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -927,7 +927,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " does not allow \""
|
e << args[0] << " does not allow \""
|
||||||
<< args[i] << "\" after PATTERN or REGEX.";
|
<< args[i] << "\" after PATTERN or REGEX.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -941,7 +941,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " does not allow \""
|
e << args[0] << " does not allow \""
|
||||||
<< args[i] << "\" after PATTERN or REGEX.";
|
<< args[i] << "\" after PATTERN or REGEX.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -969,7 +969,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " does not allow \""
|
e << args[0] << " does not allow \""
|
||||||
<< args[i] << "\" before a PATTERN or REGEX is given.";
|
<< args[i] << "\" before a PATTERN or REGEX is given.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
literal_args += " EXCLUDE";
|
literal_args += " EXCLUDE";
|
||||||
|
@ -982,7 +982,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " does not allow \""
|
e << args[0] << " does not allow \""
|
||||||
<< args[i] << "\" before a PATTERN or REGEX is given.";
|
<< args[i] << "\" before a PATTERN or REGEX is given.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -997,7 +997,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " does not allow \""
|
e << args[0] << " does not allow \""
|
||||||
<< args[i] << "\" after PATTERN or REGEX.";
|
<< args[i] << "\" after PATTERN or REGEX.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1011,7 +1011,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " does not allow \""
|
e << args[0] << " does not allow \""
|
||||||
<< args[i] << "\" after PATTERN or REGEX.";
|
<< args[i] << "\" after PATTERN or REGEX.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1025,7 +1025,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " does not allow \""
|
e << args[0] << " does not allow \""
|
||||||
<< args[i] << "\" after PATTERN or REGEX.";
|
<< args[i] << "\" after PATTERN or REGEX.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1040,7 +1040,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " does not allow \""
|
e << args[0] << " does not allow \""
|
||||||
<< args[i] << "\" after PATTERN or REGEX.";
|
<< args[i] << "\" after PATTERN or REGEX.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1055,7 +1055,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " does not allow \""
|
e << args[0] << " does not allow \""
|
||||||
<< args[i] << "\" after PATTERN or REGEX.";
|
<< args[i] << "\" after PATTERN or REGEX.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1069,7 +1069,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " does not allow \""
|
e << args[0] << " does not allow \""
|
||||||
<< args[i] << "\" after PATTERN or REGEX.";
|
<< args[i] << "\" after PATTERN or REGEX.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1094,7 +1094,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " given non-directory \""
|
e << args[0] << " given non-directory \""
|
||||||
<< args[i] << "\" to install.";
|
<< args[i] << "\" to install.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1150,7 +1150,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " given invalid file permission \""
|
e << args[0] << " given invalid file permission \""
|
||||||
<< args[i] << "\".";
|
<< args[i] << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1162,7 +1162,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " given invalid directory permission \""
|
e << args[0] << " given invalid directory permission \""
|
||||||
<< args[i] << "\".";
|
<< args[i] << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1174,7 +1174,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " given invalid permission \""
|
e << args[0] << " given invalid permission \""
|
||||||
<< args[i] << "\".";
|
<< args[i] << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1183,7 +1183,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
// Unknown argument.
|
// Unknown argument.
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " given unknown argument \"" << args[i] << "\".";
|
e << args[0] << " given unknown argument \"" << args[i] << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1204,7 +1204,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
// A destination is required.
|
// A destination is required.
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " given no DESTINATION!";
|
e << args[0] << " given no DESTINATION!";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1247,7 +1247,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
|
||||||
// Unknown argument.
|
// Unknown argument.
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " given unknown argument \"" << unknownArgs[0] << "\".";
|
e << args[0] << " given unknown argument \"" << unknownArgs[0] << "\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1262,7 +1262,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
|
||||||
// A destination is required.
|
// A destination is required.
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " given no DESTINATION!";
|
e << args[0] << " given no DESTINATION!";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1274,7 +1274,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
|
||||||
e << args[0] << " given invalid export file name \"" << fname << "\". "
|
e << args[0] << " given invalid export file name \"" << fname << "\". "
|
||||||
<< "The FILE argument may not contain a path. "
|
<< "The FILE argument may not contain a path. "
|
||||||
<< "Specify the path in the DESTINATION argument.";
|
<< "Specify the path in the DESTINATION argument.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1285,7 +1285,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << args[0] << " given invalid export file name \"" << fname << "\". "
|
e << args[0] << " given invalid export file name \"" << fname << "\". "
|
||||||
<< "The FILE argument must specify a name ending in \".cmake\".";
|
<< "The FILE argument must specify a name ending in \".cmake\".";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1302,7 +1302,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
|
||||||
<< "This name cannot be safely converted to a file name. "
|
<< "This name cannot be safely converted to a file name. "
|
||||||
<< "Specify a different export name or use the FILE option to set "
|
<< "Specify a different export name or use the FILE option to set "
|
||||||
<< "a file name explicitly.";
|
<< "a file name explicitly.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1327,7 +1327,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
|
||||||
<< "EXPORT_LINK_INTERFACE_LIBRARIES" << "\", but target \""
|
<< "EXPORT_LINK_INTERFACE_LIBRARIES" << "\", but target \""
|
||||||
<< te->Target->GetName()
|
<< te->Target->GetName()
|
||||||
<< "\" does not have policy CMP0022 set to NEW.";
|
<< "\" does not have policy CMP0022 set to NEW.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1368,7 +1368,7 @@ bool cmInstallCommand::MakeFilesFullPath(const char* modeName,
|
||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << modeName << " given directory \"" << (*fileIt) << "\" to install.";
|
e << modeName << " given directory \"" << (*fileIt) << "\" to install.";
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Store the file for installation.
|
// Store the file for installation.
|
||||||
|
|
|
@ -94,7 +94,7 @@ void cmInstallExportGenerator::ComputeTempDir()
|
||||||
{
|
{
|
||||||
// Replace the destination path with a hash to keep it short.
|
// Replace the destination path with a hash to keep it short.
|
||||||
this->TempDir +=
|
this->TempDir +=
|
||||||
cmSystemTools::ComputeStringMD5(this->Destination.c_str());
|
cmSystemTools::ComputeStringMD5(this->Destination);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -138,7 +138,7 @@ void cmInstallExportGenerator::GenerateScript(std::ostream& os)
|
||||||
|
|
||||||
// Generate the import file for this export set.
|
// Generate the import file for this export set.
|
||||||
this->EFGen->SetExportFile(this->MainImportFile.c_str());
|
this->EFGen->SetExportFile(this->MainImportFile.c_str());
|
||||||
this->EFGen->SetNamespace(this->Namespace.c_str());
|
this->EFGen->SetNamespace(this->Namespace);
|
||||||
this->EFGen->SetExportOld(this->ExportOld);
|
this->EFGen->SetExportOld(this->ExportOld);
|
||||||
if(this->ConfigurationTypes->empty())
|
if(this->ConfigurationTypes->empty())
|
||||||
{
|
{
|
||||||
|
@ -157,7 +157,7 @@ void cmInstallExportGenerator::GenerateScript(std::ostream& os)
|
||||||
ci = this->ConfigurationTypes->begin();
|
ci = this->ConfigurationTypes->begin();
|
||||||
ci != this->ConfigurationTypes->end(); ++ci)
|
ci != this->ConfigurationTypes->end(); ++ci)
|
||||||
{
|
{
|
||||||
this->EFGen->AddConfiguration(ci->c_str());
|
this->EFGen->AddConfiguration(*ci);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this->EFGen->GenerateImportFile();
|
this->EFGen->GenerateImportFile();
|
||||||
|
@ -182,7 +182,7 @@ cmInstallExportGenerator::GenerateScriptConfigs(std::ostream& os,
|
||||||
i != this->EFGen->GetConfigImportFiles().end(); ++i)
|
i != this->EFGen->GetConfigImportFiles().end(); ++i)
|
||||||
{
|
{
|
||||||
files.push_back(i->second);
|
files.push_back(i->second);
|
||||||
std::string config_test = this->CreateConfigTest(i->first.c_str());
|
std::string config_test = this->CreateConfigTest(i->first);
|
||||||
os << indent << "if(" << config_test << ")\n";
|
os << indent << "if(" << config_test << ")\n";
|
||||||
this->AddInstallRule(os, cmInstallType_FILES, files, false,
|
this->AddInstallRule(os, cmInstallType_FILES, files, false,
|
||||||
this->FilePermissions.c_str(), 0, 0, 0,
|
this->FilePermissions.c_str(), 0, 0, 0,
|
||||||
|
|
|
@ -100,9 +100,9 @@ void cmInstallFilesCommand::FinalPass()
|
||||||
else // reg exp list
|
else // reg exp list
|
||||||
{
|
{
|
||||||
std::vector<std::string> files;
|
std::vector<std::string> files;
|
||||||
std::string regex = this->FinalArgs[0].c_str();
|
std::string regex = this->FinalArgs[0];
|
||||||
cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(),
|
cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(),
|
||||||
regex.c_str(), files);
|
regex, files);
|
||||||
|
|
||||||
std::vector<std::string>::iterator s = files.begin();
|
std::vector<std::string>::iterator s = files.begin();
|
||||||
// for each argument, get the files
|
// for each argument, get the files
|
||||||
|
|
|
@ -68,7 +68,7 @@ void cmInstallProgramsCommand::FinalPass()
|
||||||
{
|
{
|
||||||
std::vector<std::string> programs;
|
std::vector<std::string> programs;
|
||||||
cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(),
|
cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(),
|
||||||
this->FinalArgs[0].c_str(), programs);
|
this->FinalArgs[0], programs);
|
||||||
|
|
||||||
std::vector<std::string>::iterator s = programs.begin();
|
std::vector<std::string>::iterator s = programs.begin();
|
||||||
// for each argument, get the programs
|
// for each argument, get the programs
|
||||||
|
|
|
@ -52,7 +52,7 @@ bool cmInstallTargetsCommand
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string str = "Cannot find target: \"" + *s + "\" to install.";
|
std::string str = "Cannot find target: \"" + *s + "\" to install.";
|
||||||
this->SetError(str.c_str());
|
this->SetError(str);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,5 +66,5 @@ void cmLinkDirectoriesCommand::AddLinkDir(std::string const& dir)
|
||||||
unixPath = tmp;
|
unixPath = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this->Makefile->AddLinkDirectory(unixPath.c_str());
|
this->Makefile->AddLinkDirectory(unixPath);
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue