Commit 21c573f6 authored by Stephen Kelly's avatar Stephen Kelly
Browse files

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.
parent e21ffaf8
......@@ -506,7 +506,7 @@ int cmCPackDebGenerator::createDeb()
controlExtraList.begin(); i != controlExtraList.end(); ++i)
{
std::string filenamename =
cmsys::SystemTools::GetFilenameName(i->c_str());
cmsys::SystemTools::GetFilenameName(*i);
std::string localcopy = this->GetOption("WDIR");
localcopy += "/";
localcopy += filenamename;
......@@ -588,9 +588,9 @@ std::string cmCPackDebGenerator::GetComponentInstallDirNameSuffix(
// the current COMPONENT belongs to.
std::string groupVar = "CPACK_COMPONENT_" +
cmSystemTools::UpperCase(componentName) + "_GROUP";
if (NULL != GetOption(groupVar.c_str()))
if (NULL != GetOption(groupVar))
{
return std::string(GetOption(groupVar.c_str()));
return std::string(GetOption(groupVar));
}
else
{
......
......@@ -357,9 +357,9 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
std::list<std::pair<std::string,std::string> > symlinkedFiles;
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Find files" << std::endl);
cmsys::Glob gl;
std::string top = it->c_str();
std::string top = *it;
it ++;
std::string subdir = it->c_str();
std::string subdir = *it;
std::string findExpr = top;
findExpr += "/*";
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
......@@ -473,7 +473,7 @@ int cmCPackGenerator::InstallProjectViaInstallScript(
it != cmakeScriptsVector.end();
++it )
{
std::string installScript = it->c_str();
std::string installScript = *it;
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
"- Install script: " << installScript << std::endl);
......@@ -562,13 +562,13 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
<< std::endl);
return 0;
}
std::string installDirectory = it->c_str();
std::string installDirectory = *it;
++it;
std::string installProjectName = it->c_str();
std::string installProjectName = *it;
++it;
std::string installComponent = it->c_str();
std::string installComponent = *it;
++it;
std::string installSubDirectory = it->c_str();
std::string installSubDirectory = *it;
std::string installFile = installDirectory + "/cmake_install.cmake";
std::vector<std::string> componentsVector;
......@@ -586,7 +586,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
// Determine the installation types for this project (if provided).
std::string installTypesVar = "CPACK_"
+ cmSystemTools::UpperCase(installComponent) + "_INSTALL_TYPES";
const char *installTypes = this->GetOption(installTypesVar.c_str());
const char *installTypes = this->GetOption(installTypesVar);
if (installTypes && *installTypes)
{
std::vector<std::string> installTypesVector;
......@@ -596,15 +596,15 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
installTypeIt != installTypesVector.end();
++installTypeIt)
{
this->GetInstallationType(installProjectName.c_str(),
installTypeIt->c_str());
this->GetInstallationType(installProjectName,
*installTypeIt);
}
}
// Determine the set of components that will be used in this project
std::string componentsVar
= "CPACK_COMPONENTS_" + cmSystemTools::UpperCase(installComponent);
const char *components = this->GetOption(componentsVar.c_str());
const char *components = this->GetOption(componentsVar);
if (components && *components)
{
cmSystemTools::ExpandListArgument(components, componentsVector);
......@@ -613,7 +613,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
compIt != componentsVector.end();
++compIt)
{
GetComponent(installProjectName.c_str(), compIt->c_str());
GetComponent(installProjectName, *compIt);
}
componentInstall = true;
}
......@@ -641,7 +641,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
= this->MakefileMap->GetDefinition("CMAKE_MAKE_PROGRAM");
std::vector<std::string> buildCommand;
globalGenerator->GenerateBuildCommand(buildCommand, cmakeMakeProgram,
installProjectName.c_str(), installDirectory.c_str(),
installProjectName, installDirectory,
globalGenerator->GetPreinstallTargetName(),
buildConfig, false);
std::string buildCommandStr =
......@@ -932,19 +932,19 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
std::string absoluteDestFileComponent =
std::string("CPACK_ABSOLUTE_DESTINATION_FILES")
+ "_" + GetComponentInstallDirNameSuffix(installComponent);
if (NULL != this->GetOption(absoluteDestFileComponent.c_str()))
if (NULL != this->GetOption(absoluteDestFileComponent))
{
std::string absoluteDestFilesListComponent =
this->GetOption(absoluteDestFileComponent.c_str());
this->GetOption(absoluteDestFileComponent);
absoluteDestFilesListComponent +=";";
absoluteDestFilesListComponent +=
mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES");
this->SetOption(absoluteDestFileComponent.c_str(),
this->SetOption(absoluteDestFileComponent,
absoluteDestFilesListComponent.c_str());
}
else
{
this->SetOption(absoluteDestFileComponent.c_str(),
this->SetOption(absoluteDestFileComponent,
mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES"));
}
}
......@@ -1428,14 +1428,14 @@ std::string cmCPackGenerator::GetComponentPackageFileName(
std::string suffix="-"+groupOrComponentName;
/* check if we should use DISPLAY name */
std::string dispNameVar = "CPACK_"+Name+"_USE_DISPLAY_NAME_IN_FILENAME";
if (IsOn(dispNameVar.c_str()))
if (IsOn(dispNameVar))
{
/* the component Group case */
if (isGroupName)
{
std::string groupDispVar = "CPACK_COMPONENT_GROUP_"
+ cmSystemTools::UpperCase(groupOrComponentName) + "_DISPLAY_NAME";
const char* groupDispName = GetOption(groupDispVar.c_str());
const char* groupDispName = GetOption(groupDispVar);
if (groupDispName)
{
suffix = "-"+std::string(groupDispName);
......@@ -1446,7 +1446,7 @@ std::string cmCPackGenerator::GetComponentPackageFileName(
{
std::string dispVar = "CPACK_COMPONENT_"
+ cmSystemTools::UpperCase(groupOrComponentName) + "_DISPLAY_NAME";
const char* dispName = GetOption(dispVar.c_str());
const char* dispName = GetOption(dispVar);
if(dispName)
{
suffix = "-"+std::string(dispName);
......@@ -1497,7 +1497,7 @@ cmCPackGenerator::GetInstallationType(const std::string& projectName,
installType->Name = name;
const char* displayName
= this->GetOption((macroPrefix + "_DISPLAY_NAME").c_str());
= this->GetOption(macroPrefix + "_DISPLAY_NAME");
if (displayName && *displayName)
{
installType->DisplayName = displayName;
......@@ -1527,7 +1527,7 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
+ cmsys::SystemTools::UpperCase(name);
component->Name = name;
const char* displayName
= this->GetOption((macroPrefix + "_DISPLAY_NAME").c_str());
= this->GetOption(macroPrefix + "_DISPLAY_NAME");
if (displayName && *displayName)
{
component->DisplayName = displayName;
......@@ -1537,23 +1537,23 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
component->DisplayName = component->Name;
}
component->IsHidden
= this->IsOn((macroPrefix + "_HIDDEN").c_str());
= this->IsOn(macroPrefix + "_HIDDEN");
component->IsRequired
= this->IsOn((macroPrefix + "_REQUIRED").c_str());
= this->IsOn(macroPrefix + "_REQUIRED");
component->IsDisabledByDefault
= this->IsOn((macroPrefix + "_DISABLED").c_str());
= this->IsOn(macroPrefix + "_DISABLED");
component->IsDownloaded
= this->IsOn((macroPrefix + "_DOWNLOADED").c_str())
= this->IsOn(macroPrefix + "_DOWNLOADED")
|| cmSystemTools::IsOn(this->GetOption("CPACK_DOWNLOAD_ALL"));
const char* archiveFile = this->GetOption((macroPrefix +
"_ARCHIVE_FILE").c_str());
const char* archiveFile = this->GetOption(macroPrefix +
"_ARCHIVE_FILE");
if (archiveFile && *archiveFile)
{
component->ArchiveFile = archiveFile;
}
const char* groupName = this->GetOption((macroPrefix + "_GROUP").c_str());
const char* groupName = this->GetOption(macroPrefix + "_GROUP");
if (groupName && *groupName)
{
component->Group = GetComponentGroup(projectName, groupName);
......@@ -1565,7 +1565,7 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
}
const char* description
= this->GetOption((macroPrefix + "_DESCRIPTION").c_str());
= this->GetOption(macroPrefix + "_DESCRIPTION");
if (description && *description)
{
component->Description = description;
......@@ -1573,7 +1573,7 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
// Determine the installation types.
const char *installTypes
= this->GetOption((macroPrefix + "_INSTALL_TYPES").c_str());
= this->GetOption(macroPrefix + "_INSTALL_TYPES");
if (installTypes && *installTypes)
{
std::vector<std::string> installTypesVector;
......@@ -1589,7 +1589,7 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
}
// Determine the component dependencies.
const char *depends = this->GetOption((macroPrefix + "_DEPENDS").c_str());
const char *depends = this->GetOption(macroPrefix + "_DEPENDS");
if (depends && *depends)
{
std::vector<std::string> dependsVector;
......@@ -1600,7 +1600,7 @@ cmCPackGenerator::GetComponent(const std::string& projectName,
++dependIt)
{
cmCPackComponent *child = GetComponent(projectName,
dependIt->c_str());
*dependIt);
component->Dependencies.push_back(child);
child->ReverseDependencies.push_back(component);
}
......@@ -1624,7 +1624,7 @@ cmCPackGenerator::GetComponentGroup(const std::string& projectName,
// Define the group
group->Name = name;
const char* displayName
= this->GetOption((macroPrefix + "_DISPLAY_NAME").c_str());
= this->GetOption(macroPrefix + "_DISPLAY_NAME");
if (displayName && *displayName)
{
group->DisplayName = displayName;
......@@ -1635,17 +1635,17 @@ cmCPackGenerator::GetComponentGroup(const std::string& projectName,
}
const char* description
= this->GetOption((macroPrefix + "_DESCRIPTION").c_str());
= this->GetOption(macroPrefix + "_DESCRIPTION");
if (description && *description)
{
group->Description = description;
}
group->IsBold
= this->IsOn((macroPrefix + "_BOLD_TITLE").c_str());
= this->IsOn(macroPrefix + "_BOLD_TITLE");
group->IsExpandedByDefault
= this->IsOn((macroPrefix + "_EXPANDED").c_str());
= this->IsOn(macroPrefix + "_EXPANDED");
const char* parentGroupName
= this->GetOption((macroPrefix + "_PARENT_GROUP").c_str());
= this->GetOption(macroPrefix + "_PARENT_GROUP");
if (parentGroupName && *parentGroupName)
{
group->ParentGroup = GetComponentGroup(projectName, parentGroupName);
......
......@@ -629,7 +629,7 @@ void cmCPackNSISGenerator::CreateMenuLinks( cmOStringStream& str,
// if so add a desktop link
std::string desktop = "CPACK_CREATE_DESKTOP_LINK_";
desktop += linkName;
if(this->IsSet(desktop.c_str()))
if(this->IsSet(desktop))
{
str << " StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n";
str << " CreateShortCut \"$DESKTOP\\"
......
......@@ -272,9 +272,9 @@ std::string cmCPackRPMGenerator::GetComponentInstallDirNameSuffix(
// the current COMPONENT belongs to.
std::string groupVar = "CPACK_COMPONENT_" +
cmSystemTools::UpperCase(componentName) + "_GROUP";
if (NULL != GetOption(groupVar.c_str()))
if (NULL != GetOption(groupVar))
{
return std::string(GetOption(groupVar.c_str()));
return std::string(GetOption(groupVar));
}
else
{
......
......@@ -326,7 +326,7 @@ int main (int argc, char const* const* argv)
cdit != definitions.Map.end();
++cdit )
{
globalMF->AddDefinition(cdit->first.c_str(), cdit->second.c_str());
globalMF->AddDefinition(cdit->first, cdit->second.c_str());
}
const char* cpackModulesPath =
......
......@@ -241,11 +241,11 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
{
// Make the generator available for the Build call below.
cm.SetGlobalGenerator(cm.CreateGlobalGenerator(
this->BuildGenerator.c_str()));
this->BuildGenerator));
cm.SetGeneratorToolset(this->BuildGeneratorToolset);
// Load the cache to make CMAKE_MAKE_PROGRAM available.
cm.GetCacheManager()->LoadCache(this->BinaryDir.c_str());
cm.GetCacheManager()->LoadCache(this->BinaryDir);
}
else
{
......@@ -295,9 +295,9 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
config = "Debug";
}
int retVal = cm.GetGlobalGenerator()->Build(
this->SourceDir.c_str(), this->BinaryDir.c_str(),
this->BuildProject.c_str(), tarIt->c_str(),
&output, this->BuildMakeProgram.c_str(),
this->SourceDir, this->BinaryDir,
this->BuildProject, *tarIt,
&output, this->BuildMakeProgram,
config,
!this->BuildNoClean,
false, remainingTime);
......
......@@ -151,7 +151,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
"\n"
"Alternatively, set CTEST_BUILD_COMMAND to build the project "
"with a custom command line.";
this->SetError(ostr.str().c_str());
this->SetError(ostr.str());
return 0;
}
}
......
......@@ -69,7 +69,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
cmOStringStream e;
e << "CMakeLists.txt file does not exist ["
<< cmakelists_file << "]";
this->SetError(e.str().c_str());
this->SetError(e.str());
return 0;
}
......
......@@ -157,7 +157,7 @@ void cmCTestCoverageHandler::CleanCoverageLogFiles(std::ostream& log)
logGlob += this->CTest->GetCurrentTag();
logGlob += "/CoverageLog*";
cmsys::Glob gl;
gl.FindFiles(logGlob.c_str());
gl.FindFiles(logGlob);
std::vector<std::string> const& files = gl.GetFiles();
for(std::vector<std::string>::const_iterator fi = files.begin();
fi != files.end(); ++fi)
......@@ -241,7 +241,7 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file,
bool buildSubDir = cmSystemTools::IsSubDirectory(fFile.c_str(),
fBinDir.c_str());
// Always check parent directory of the file.
std::string fileDir = cmSystemTools::GetFilenamePath(fFile.c_str());
std::string fileDir = cmSystemTools::GetFilenamePath(fFile);
std::string checkDir;
// We also need to check the binary/source directory pair.
......@@ -296,7 +296,7 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file,
checkDir = fSrcDir;
}
fFile = checkDir + "/" + relPath;
fFile = cmSystemTools::GetFilenamePath(fFile.c_str());
fFile = cmSystemTools::GetFilenamePath(fFile);
if ( fileDir == fFile )
{
......@@ -503,7 +503,7 @@ int cmCTestCoverageHandler::ProcessHandler()
}
const std::string fileName
= cmSystemTools::GetFilenameName(fullFileName.c_str());
= cmSystemTools::GetFilenameName(fullFileName);
std::string shortFileName =
this->CTest->GetShortPathToFile(fullFileName.c_str());
const cmCTestCoverageHandlerContainer::SingleFileCoverageVector& fcov
......@@ -947,7 +947,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
// Call gcov to get coverage data for this *.gcda file:
//
std::string fileDir = cmSystemTools::GetFilenamePath(it->c_str());
std::string fileDir = cmSystemTools::GetFilenamePath(*it);
std::string command = "\"" + gcovCommand + "\" " +
gcovExtraFlags + " " +
"-o \"" + fileDir + "\" " +
......@@ -1814,7 +1814,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
total_tested += functionsCalled;
total_untested += (totalFunctions - functionsCalled);
std::string fileName = cmSystemTools::GetFilenameName(file.c_str());
std::string fileName = cmSystemTools::GetFilenameName(file);
std::string shortFileName =
this->CTest->GetShortPathToFile(file.c_str());
......
......@@ -26,7 +26,7 @@ bool cmCTestEmptyBinaryDirectoryCommand
{
cmOStringStream ostr;
ostr << "problem removing the binary directory: " << args[0].c_str();
this->SetError(ostr.str().c_str());
this->SetError(ostr.str());
return false;
}
......
......@@ -75,7 +75,7 @@ void cmCTestGenericHandler::Initialize()
it != this->PersistentOptions.end();
++ it )
{
this->Options[it->first.c_str()] = it->second.c_str();
this->Options[it->first] = it->second.c_str();
}
}
......@@ -121,7 +121,7 @@ bool cmCTestGenericHandler::StartResultingXML(cmCTest::Part part,
return false;
}
if( !this->CTest->OpenOutputFile(this->CTest->GetCurrentTag(),
ostr.str().c_str(), xofs, true) )
ostr.str(), xofs, true) )
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Cannot create resulting XML file: " << ostr.str().c_str()
......@@ -153,7 +153,7 @@ bool cmCTestGenericHandler::StartLogFile(const char* name,
ostr << "_" << this->CTest->GetCurrentTag();
}
ostr << ".log";
if( !this->CTest->OpenOutputFile("Temporary", ostr.str().c_str(), xofs) )
if( !this->CTest->OpenOutputFile("Temporary", ostr.str(), xofs) )
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create log file: "
<< ostr.str().c_str() << std::endl);
......
......@@ -48,7 +48,7 @@ bool cmCTestHandlerCommand
{
cmOStringStream e;
e << "called with unknown argument \"" << args[i] << "\".";
this->SetError(e.str().c_str());
this->SetError(e.str());
return false;
}
......
......@@ -680,8 +680,8 @@ bool cmCTestLaunch::ScrapeLog(std::string const& fname)
continue;
}
if(this->Match(line.c_str(), this->RegexWarning) &&
!this->Match(line.c_str(), this->RegexWarningSuppress))
if(this->Match(line, this->RegexWarning) &&
!this->Match(line, this->RegexWarningSuppress))
{
return true;
}
......
......@@ -352,7 +352,7 @@ void cmCTestP4::SetP4Options(std::vector<char const*> &CommandOptions)
for(std::vector<std::string>::const_iterator ai = args.begin();
ai != args.end(); ++ai)
{
P4Options.push_back(ai->c_str());
P4Options.push_back(*ai);
}
}
......
......@@ -56,7 +56,7 @@ bool cmCTestRunScriptCommand
&ret);
cmOStringStream str;
str << ret;
this->Makefile->AddDefinition(returnVariable.c_str(), str.str().c_str());
this->Makefile->AddDefinition(returnVariable, str.str().c_str());
}
}
return true;
......
......@@ -337,8 +337,8 @@ void cmCTestScriptHandler::CreateCMake()
// Set CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR.
// Also, some commands need Makefile->GetCurrentDirectory().
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
this->Makefile->SetStartDirectory(cwd.c_str());
this->Makefile->SetStartOutputDirectory(cwd.c_str());
this->Makefile->SetStartDirectory(cwd);
this->Makefile->SetStartOutputDirectory(cwd);
// remove all cmake commands which are not scriptable, since they can't be
// used in ctest scripts
......@@ -436,7 +436,7 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
for (std::map<std::string, std::string>::const_iterator it = defs.begin();
it != defs.end(); ++it)
{
this->Makefile->AddDefinition(it->first.c_str(), it->second.c_str());
this->Makefile->AddDefinition(it->first, it->second.c_str());
}
// finally read in the script
......@@ -646,7 +646,7 @@ int cmCTestScriptHandler::RunCurrentScript()
if (!this->CTestEnv.empty())
{
std::vector<std::string> envArgs;
cmSystemTools::ExpandListArgument(this->CTestEnv.c_str(),envArgs);
cmSystemTools::ExpandListArgument(this->CTestEnv,envArgs);
cmSystemTools::AppendEnv(envArgs);
}
......@@ -772,7 +772,7 @@ int cmCTestScriptHandler::PerformExtraUpdates()
++ it )
{
std::vector<std::string> cvsArgs;
cmSystemTools::ExpandListArgument(it->c_str(),cvsArgs);
cmSystemTools::ExpandListArgument(*it,cvsArgs);
if (cvsArgs.size() == 2)
{
std::string fullCommand = command;
......
......@@ -131,7 +131,7 @@ bool cmCTestStartCommand
<< " " << sourceDir << "\n"
<< "which is not an existing directory. "
<< "Set CTEST_CHECKOUT_COMMAND to a command line to create it.";
this->SetError(e.str().c_str());
this->SetError(e.str());
return false;
}
......@@ -160,7 +160,7 @@ bool cmCTestStartCommand::InitialCheckout(
{
// Use a generic VC object to run and log the command.
cmCTestVC vc(this->CTest, ofs);
vc.SetSourceDirectory(sourceDir.c_str());
vc.SetSourceDirectory(sourceDir);
if(!vc.InitialCheckout(initialCheckoutCommand))
{
return false;
......
......@@ -339,7 +339,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
std::string dropMethod(this->CTest->GetCTestConfiguration("DropMethod"));
std::string curlopt(this->CTest->GetCTestConfiguration("CurlOptions"));
std::vector<std::string> args;
cmSystemTools::ExpandListArgument(curlopt.c_str(), args);
cmSystemTools::ExpandListArgument(curlopt, args);
bool verifyPeerOff = false;
bool verifyHostOff = false;
for( std::vector<std::string>::iterator i = args.begin();
......@@ -461,7 +461,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
else
{
char md5[33];
cmSystemTools::ComputeFileMD5(local_file.c_str(), md5);
cmSystemTools::ComputeFileMD5(local_file, md5);
md5[32] = 0;
upload_as += md5;
}
......
......@@ -125,7 +125,7 @@ bool cmCTestSubdirCommand
{
std::string m = "Could not find include file: ";
m += fname;
this->SetError(m.c_str());
this->SetError(m);
return false;
}
}
......@@ -213,7 +213,7 @@ bool cmCTestAddSubdirectoryCommand
{
std::string m = "Could not find include file: ";
m += fname;
this->SetError(m.c_str());
this->SetError(m);
return false;
}
return true;
......@@ -1506,7 +1506,7 @@ std::string cmCTestTestHandler
// then try with the exe extension
else
{
failed.push_back(attempted[ai].c_str());
failed.push_back(attempted[ai]);
tempPath = attempted[ai];
tempPath += cmSystemTools::GetExecutableExtension();
if(cmSystemTools::FileExists(tempPath.c_str())
......@@ -1517,7 +1517,7 @@ std::string cmCTestTestHandler
}
else
{
failed.push_back(tempPath.c_str());
failed.push_back(tempPath);
}
}
}
......@@ -2154,7 +2154,7 @@ bool cmCTestTestHandler::SetTestsProperties(
if ( key == "ATTACHED_FILES" )
{
std::vector<std::string> lval;
cmSystemTools::ExpandListArgument(val.c_str(), lval);
cmSystemTools::ExpandListArgument(val, lval);
for(std::vector<std::string>::iterator f = lval.begin();
f != lval.end(); ++f)
......@@ -2165,7 +2165,7 @@ bool cmCTestTestHandler::SetTestsProperties(
if ( key == "ATTACHED_FILES_ON_FAIL" )
{
std::vector<std::string> lval;
cmSystemTools::ExpandListArgument(val.c_str(), lval);
cmSystemTools::ExpandListArgument(val, lval);