Commit f4f3c689 authored by Sebastian Holtermann's avatar Sebastian Holtermann

Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgument

parent ff42dec8
......@@ -5,6 +5,7 @@
#include "cmCPackGenerator.h"
#include "cmCPackIFWGenerator.h"
#include "cmCPackLog.h" // IWYU pragma: keep
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmTimestamp.h"
#include "cmVersionConfig.h"
......@@ -78,7 +79,7 @@ void cmCPackIFWCommon::ExpandListArgument(
const std::string& arg, std::map<std::string, std::string>& argsOut)
{
std::vector<std::string> args;
cmSystemTools::ExpandListArgument(arg, args, false);
cmExpandList(arg, args, false);
if (args.empty()) {
return;
}
......@@ -100,7 +101,7 @@ void cmCPackIFWCommon::ExpandListArgument(
const std::string& arg, std::multimap<std::string, std::string>& argsOut)
{
std::vector<std::string> args;
cmSystemTools::ExpandListArgument(arg, args, false);
cmExpandList(arg, args, false);
if (args.empty()) {
return;
}
......
......@@ -11,6 +11,7 @@
#include "cmCPackLog.h" // IWYU pragma: keep
#include "cmDuration.h"
#include "cmGeneratedFileStream.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include <sstream>
......@@ -292,14 +293,14 @@ int cmCPackIFWGenerator::InitializeInternal()
// Additional packages dirs
this->PkgsDirsVector.clear();
if (const char* dirs = this->GetOption("CPACK_IFW_PACKAGES_DIRECTORIES")) {
cmSystemTools::ExpandListArgument(dirs, this->PkgsDirsVector);
cmExpandList(dirs, this->PkgsDirsVector);
}
// Additional repositories dirs
this->RepoDirsVector.clear();
if (const char* dirs =
this->GetOption("CPACK_IFW_REPOSITORIES_DIRECTORIES")) {
cmSystemTools::ExpandListArgument(dirs, this->RepoDirsVector);
cmExpandList(dirs, this->RepoDirsVector);
}
// Installer
......@@ -317,7 +318,7 @@ int cmCPackIFWGenerator::InitializeInternal()
// Repositories
if (const char* RepoAllStr = this->GetOption("CPACK_IFW_REPOSITORIES_ALL")) {
std::vector<std::string> RepoAllVector;
cmSystemTools::ExpandListArgument(RepoAllStr, RepoAllVector);
cmExpandList(RepoAllStr, RepoAllVector);
for (std::string const& r : RepoAllVector) {
this->GetRepository(r);
}
......
......@@ -245,8 +245,7 @@ void cmCPackIFWInstaller::ConfigureFromOptions()
if (const char* optIFW_PACKAGE_RESOURCES =
this->GetOption("CPACK_IFW_PACKAGE_RESOURCES")) {
this->Resources.clear();
cmSystemTools::ExpandListArgument(optIFW_PACKAGE_RESOURCES,
this->Resources);
cmExpandList(optIFW_PACKAGE_RESOURCES, this->Resources);
}
}
......
......@@ -8,6 +8,7 @@
#include "cmCPackIFWInstaller.h"
#include "cmCPackLog.h" // IWYU pragma: keep
#include "cmGeneratedFileStream.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmTimestamp.h"
#include "cmXMLWriter.h"
......@@ -196,7 +197,7 @@ int cmCPackIFWPackage::ConfigureFromComponent(cmCPackComponent* component)
// User interfaces
if (const char* option = this->GetOption(prefix + "USER_INTERFACES")) {
this->UserInterfaces.clear();
cmSystemTools::ExpandListArgument(option, this->UserInterfaces);
cmExpandList(option, this->UserInterfaces);
}
// CMake dependencies
......@@ -209,7 +210,7 @@ int cmCPackIFWPackage::ConfigureFromComponent(cmCPackComponent* component)
// Licenses
if (const char* option = this->GetOption(prefix + "LICENSES")) {
this->Licenses.clear();
cmSystemTools::ExpandListArgument(option, this->Licenses);
cmExpandList(option, this->Licenses);
if (this->Licenses.size() % 2 != 0) {
cmCPackIFWLogger(
WARNING,
......@@ -281,13 +282,13 @@ int cmCPackIFWPackage::ConfigureFromGroup(cmCPackComponentGroup* group)
// User interfaces
if (const char* option = this->GetOption(prefix + "USER_INTERFACES")) {
this->UserInterfaces.clear();
cmSystemTools::ExpandListArgument(option, this->UserInterfaces);
cmExpandList(option, this->UserInterfaces);
}
// Licenses
if (const char* option = this->GetOption(prefix + "LICENSES")) {
this->Licenses.clear();
cmSystemTools::ExpandListArgument(option, this->Licenses);
cmExpandList(option, this->Licenses);
if (this->Licenses.size() % 2 != 0) {
cmCPackIFWLogger(
WARNING,
......@@ -398,18 +399,18 @@ int cmCPackIFWPackage::ConfigureFromPrefix(const std::string& prefix)
this->Translations.clear();
} else if (const char* value = this->GetOption(option)) {
this->Translations.clear();
cmSystemTools::ExpandListArgument(value, this->Translations);
cmExpandList(value, this->Translations);
}
// QtIFW dependencies
std::vector<std::string> deps;
option = prefix + "DEPENDS";
if (const char* value = this->GetOption(option)) {
cmSystemTools::ExpandListArgument(value, deps);
cmExpandList(value, deps);
}
option = prefix + "DEPENDENCIES";
if (const char* value = this->GetOption(option)) {
cmSystemTools::ExpandListArgument(value, deps);
cmExpandList(value, deps);
}
for (std::string const& d : deps) {
DependenceStruct dep(d);
......@@ -431,7 +432,7 @@ int cmCPackIFWPackage::ConfigureFromPrefix(const std::string& prefix)
this->AlienAutoDependOn.clear();
} else if (const char* value = this->GetOption(option)) {
std::vector<std::string> depsOn;
cmSystemTools::ExpandListArgument(value, depsOn);
cmExpandList(value, depsOn);
for (std::string const& d : depsOn) {
DependenceStruct dep(d);
if (this->Generator->Packages.count(dep.Name)) {
......@@ -488,7 +489,7 @@ int cmCPackIFWPackage::ConfigureFromPrefix(const std::string& prefix)
this->Replaces.clear();
} else if (const char* value = this->GetOption(option)) {
this->Replaces.clear();
cmSystemTools::ExpandListArgument(value, this->Replaces);
cmExpandList(value, this->Replaces);
}
// Requires admin rights
......
......@@ -7,6 +7,7 @@
#include "cmCryptoHash.h"
#include "cmGeneratedFileStream.h"
#include "cmInstalledFile.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmUuid.h"
#include <algorithm>
......@@ -226,7 +227,7 @@ bool cmCPackWIXGenerator::InitializeWiXConfiguration()
const char* patchFilePath = GetOption("CPACK_WIX_PATCH_FILE");
if (patchFilePath) {
std::vector<std::string> patchFilePaths;
cmSystemTools::ExpandListArgument(patchFilePath, patchFilePaths);
cmExpandList(patchFilePath, patchFilePaths);
for (std::string const& p : patchFilePaths) {
if (!this->Patch->LoadFragments(p)) {
......@@ -300,7 +301,7 @@ void cmCPackWIXGenerator::AppendUserSuppliedExtraSources()
if (!cpackWixExtraSources)
return;
cmSystemTools::ExpandListArgument(cpackWixExtraSources, this->WixSources);
cmExpandList(cpackWixExtraSources, this->WixSources);
}
void cmCPackWIXGenerator::AppendUserSuppliedExtraObjects(std::ostream& stream)
......@@ -311,8 +312,7 @@ void cmCPackWIXGenerator::AppendUserSuppliedExtraObjects(std::ostream& stream)
std::vector<std::string> expandedExtraObjects;
cmSystemTools::ExpandListArgument(cpackWixExtraObjects,
expandedExtraObjects);
cmExpandList(cpackWixExtraObjects, expandedExtraObjects);
for (std::string const& obj : expandedExtraObjects) {
stream << " " << QuotePath(obj);
......@@ -664,8 +664,7 @@ bool cmCPackWIXGenerator::AddComponentsToFeature(
std::vector<std::string> cpackPackageExecutablesList;
const char* cpackPackageExecutables = GetOption("CPACK_PACKAGE_EXECUTABLES");
if (cpackPackageExecutables) {
cmSystemTools::ExpandListArgument(cpackPackageExecutables,
cpackPackageExecutablesList);
cmExpandList(cpackPackageExecutables, cpackPackageExecutablesList);
if (cpackPackageExecutablesList.size() % 2 != 0) {
cmCPackLogger(
cmCPackLog::LOG_ERROR,
......@@ -680,8 +679,7 @@ bool cmCPackWIXGenerator::AddComponentsToFeature(
const char* cpackPackageDesktopLinks =
GetOption("CPACK_CREATE_DESKTOP_LINKS");
if (cpackPackageDesktopLinks) {
cmSystemTools::ExpandListArgument(cpackPackageDesktopLinks,
cpackPackageDesktopLinksList);
cmExpandList(cpackPackageDesktopLinks, cpackPackageDesktopLinksList);
}
AddDirectoryAndFileDefinitions(
......@@ -1137,7 +1135,7 @@ void cmCPackWIXGenerator::CollectExtensions(std::string const& variableName,
return;
std::vector<std::string> list;
cmSystemTools::ExpandListArgument(variableContent, list);
cmExpandList(variableContent, list);
extensions.insert(list.begin(), list.end());
}
......@@ -1149,7 +1147,7 @@ void cmCPackWIXGenerator::AddCustomFlags(std::string const& variableName,
return;
std::vector<std::string> list;
cmSystemTools::ExpandListArgument(variableContent, list);
cmExpandList(variableContent, list);
for (std::string const& i : list) {
stream << " " << QuotePath(i);
......
......@@ -6,6 +6,7 @@
#include <vector>
#include "cmCPackLog.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
cmCPackBundleGenerator::cmCPackBundleGenerator() = default;
......@@ -206,7 +207,7 @@ int cmCPackBundleGenerator::SignBundle(const std::string& src_dir)
: "";
std::vector<std::string> relFiles;
cmSystemTools::ExpandListArgument(sign_files, relFiles);
cmExpandList(sign_files, relFiles);
// sign the files supplied by the user, ie. frameworks.
for (auto const& file : relFiles) {
......
......@@ -8,6 +8,7 @@
#include "cmCPackLog.h"
#include "cmCryptoHash.h"
#include "cmGeneratedFileStream.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cm_sys_stat.h"
......@@ -378,7 +379,7 @@ bool DebGenerator::generateControlTar(std::string const& md5Filename) const
control_tar.ClearPermissions();
std::vector<std::string> controlExtraList;
cmSystemTools::ExpandListArgument(ControlExtra, controlExtraList);
cmExpandList(ControlExtra, controlExtraList);
for (std::string const& i : controlExtraList) {
std::string filenamename = cmsys::SystemTools::GetFilenameName(i);
std::string localcopy = WorkDir + "/" + filenamename;
......
......@@ -6,6 +6,7 @@
#include "cmCPackLog.h"
#include "cmDuration.h"
#include "cmGeneratedFileStream.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmsys/FStream.hxx"
......@@ -128,8 +129,7 @@ int cmCPackDragNDropGenerator::InitializeInternal()
}
std::vector<std::string> languages;
cmSystemTools::ExpandListArgument(
this->GetOption("CPACK_DMG_SLA_LANGUAGES"), languages);
cmExpandList(this->GetOption("CPACK_DMG_SLA_LANGUAGES"), languages);
if (languages.empty()) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
"CPACK_DMG_SLA_LANGUAGES set but empty" << std::endl);
......@@ -527,7 +527,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
std::vector<std::string> languages;
if (!oldStyle) {
cmSystemTools::ExpandListArgument(cpack_dmg_languages, languages);
cmExpandList(cpack_dmg_languages, languages);
}
cmGeneratedFileStream ofs(sla_r);
......
......@@ -6,6 +6,7 @@
#include "cmCPackArchiveGenerator.h"
#include "cmCPackLog.h"
#include "cmGeneratedFileStream.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
// Needed for ::open() and ::stat()
......@@ -228,8 +229,7 @@ void cmCPackFreeBSDGenerator::write_manifest_fields(
"desc", var_lookup("CPACK_FREEBSD_PACKAGE_DESCRIPTION"));
manifest << ManifestKeyValue("www", var_lookup("CPACK_FREEBSD_PACKAGE_WWW"));
std::vector<std::string> licenses;
cmSystemTools::ExpandListArgument(
var_lookup("CPACK_FREEBSD_PACKAGE_LICENSE"), licenses);
cmExpandList(var_lookup("CPACK_FREEBSD_PACKAGE_LICENSE"), licenses);
std::string licenselogic("single");
if (licenses.empty()) {
cmSystemTools::SetFatalErrorOccured();
......@@ -239,13 +239,11 @@ void cmCPackFreeBSDGenerator::write_manifest_fields(
manifest << ManifestKeyValue("licenselogic", licenselogic);
manifest << (ManifestKeyListValue("licenses") << licenses);
std::vector<std::string> categories;
cmSystemTools::ExpandListArgument(
var_lookup("CPACK_FREEBSD_PACKAGE_CATEGORIES"), categories);
cmExpandList(var_lookup("CPACK_FREEBSD_PACKAGE_CATEGORIES"), categories);
manifest << (ManifestKeyListValue("categories") << categories);
manifest << ManifestKeyValue("prefix", var_lookup("CMAKE_INSTALL_PREFIX"));
std::vector<std::string> deps;
cmSystemTools::ExpandListArgument(var_lookup("CPACK_FREEBSD_PACKAGE_DEPS"),
deps);
cmExpandList(var_lookup("CPACK_FREEBSD_PACKAGE_DEPS"), deps);
if (!deps.empty()) {
manifest << (ManifestKeyDepsValue("deps") << deps);
}
......
......@@ -212,7 +212,7 @@ int cmCPackGenerator::InstallProject()
this->GetOption("CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS");
if (default_dir_install_permissions && *default_dir_install_permissions) {
std::vector<std::string> items;
cmSystemTools::ExpandListArgument(default_dir_install_permissions, items);
cmExpandList(default_dir_install_permissions, items);
for (const auto& arg : items) {
if (!cmFSPermissions::stringToModeT(arg, default_dir_mode_v)) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
......@@ -275,7 +275,7 @@ int cmCPackGenerator::InstallProjectViaInstallCommands(
tempInstallDirectoryEnv += tempInstallDirectory;
cmSystemTools::PutEnv(tempInstallDirectoryEnv);
std::vector<std::string> installCommandsVector;
cmSystemTools::ExpandListArgument(installCommands, installCommandsVector);
cmExpandList(installCommands, installCommandsVector);
for (std::string const& ic : installCommandsVector) {
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << ic << std::endl);
std::string output;
......@@ -312,8 +312,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
const char* cpackIgnoreFiles = this->GetOption("CPACK_IGNORE_FILES");
if (cpackIgnoreFiles) {
std::vector<std::string> ignoreFilesRegexString;
cmSystemTools::ExpandListArgument(cpackIgnoreFiles,
ignoreFilesRegexString);
cmExpandList(cpackIgnoreFiles, ignoreFilesRegexString);
for (std::string const& ifr : ignoreFilesRegexString) {
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
"Create ignore files regex for: " << ifr << std::endl);
......@@ -324,8 +323,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
this->GetOption("CPACK_INSTALLED_DIRECTORIES");
if (installDirectories && *installDirectories) {
std::vector<std::string> installDirectoriesVector;
cmSystemTools::ExpandListArgument(installDirectories,
installDirectoriesVector);
cmExpandList(installDirectories, installDirectoriesVector);
if (installDirectoriesVector.size() % 2 != 0) {
cmCPackLogger(
cmCPackLog::LOG_ERROR,
......@@ -466,7 +464,7 @@ int cmCPackGenerator::InstallProjectViaInstallScript(
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
"- Install scripts: " << cmakeScripts << std::endl);
std::vector<std::string> cmakeScriptsVector;
cmSystemTools::ExpandListArgument(cmakeScripts, cmakeScriptsVector);
cmExpandList(cmakeScripts, cmakeScriptsVector);
for (std::string const& installScript : cmakeScriptsVector) {
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
......@@ -531,7 +529,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
return 0;
}
std::vector<std::string> cmakeProjectsVector;
cmSystemTools::ExpandListArgument(cmakeProjects, cmakeProjectsVector);
cmExpandList(cmakeProjects, cmakeProjectsVector);
std::vector<std::string>::iterator it;
for (it = cmakeProjectsVector.begin(); it != cmakeProjectsVector.end();
++it) {
......@@ -576,7 +574,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
const char* installTypes = this->GetOption(installTypesVar);
if (installTypes && *installTypes) {
std::vector<std::string> installTypesVector;
cmSystemTools::ExpandListArgument(installTypes, installTypesVector);
cmExpandList(installTypes, installTypesVector);
for (std::string const& installType : installTypesVector) {
project.InstallationTypes.push_back(
this->GetInstallationType(project.ProjectName, installType));
......@@ -588,7 +586,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
"CPACK_COMPONENTS_" + cmSystemTools::UpperCase(project.Component);
const char* components = this->GetOption(componentsVar);
if (components && *components) {
cmSystemTools::ExpandListArgument(components, componentsVector);
cmExpandList(components, componentsVector);
for (std::string const& comp : componentsVector) {
project.Components.push_back(
this->GetComponent(project.ProjectName, comp));
......@@ -1505,7 +1503,7 @@ cmCPackComponent* cmCPackGenerator::GetComponent(
const char* installTypes = this->GetOption(macroPrefix + "_INSTALL_TYPES");
if (installTypes && *installTypes) {
std::vector<std::string> installTypesVector;
cmSystemTools::ExpandListArgument(installTypes, installTypesVector);
cmExpandList(installTypes, installTypesVector);
for (std::string const& installType : installTypesVector) {
component->InstallationTypes.push_back(
this->GetInstallationType(projectName, installType));
......@@ -1516,7 +1514,7 @@ cmCPackComponent* cmCPackGenerator::GetComponent(
const char* depends = this->GetOption(macroPrefix + "_DEPENDS");
if (depends && *depends) {
std::vector<std::string> dependsVector;
cmSystemTools::ExpandListArgument(depends, dependsVector);
cmExpandList(depends, dependsVector);
for (std::string const& depend : dependsVector) {
cmCPackComponent* child = GetComponent(projectName, depend);
component->Dependencies.push_back(child);
......
......@@ -7,6 +7,7 @@
#include "cmCPackLog.h"
#include "cmDuration.h"
#include "cmGeneratedFileStream.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmsys/Directory.hxx"
......@@ -459,8 +460,7 @@ int cmCPackNSISGenerator::InitializeInternal()
"CPACK_CREATE_DESKTOP_LINKS: " << cpackPackageDeskTopLinks
<< std::endl);
cmSystemTools::ExpandListArgument(cpackPackageDeskTopLinks,
cpackPackageDesktopLinksVector);
cmExpandList(cpackPackageDeskTopLinks, cpackPackageDesktopLinksVector);
for (std::string const& cpdl : cpackPackageDesktopLinksVector) {
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"CPACK_CREATE_DESKTOP_LINKS: " << cpdl << std::endl);
......@@ -479,8 +479,7 @@ int cmCPackNSISGenerator::InitializeInternal()
"The cpackPackageExecutables: " << cpackPackageExecutables
<< "." << std::endl);
std::vector<std::string> cpackPackageExecutablesVector;
cmSystemTools::ExpandListArgument(cpackPackageExecutables,
cpackPackageExecutablesVector);
cmExpandList(cpackPackageExecutables, cpackPackageExecutablesVector);
if (cpackPackageExecutablesVector.size() % 2 != 0) {
cmCPackLogger(
cmCPackLog::LOG_ERROR,
......@@ -536,7 +535,7 @@ void cmCPackNSISGenerator::CreateMenuLinks(std::ostream& str,
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"The cpackMenuLinks: " << cpackMenuLinks << "." << std::endl);
std::vector<std::string> cpackMenuLinksVector;
cmSystemTools::ExpandListArgument(cpackMenuLinks, cpackMenuLinksVector);
cmExpandList(cpackMenuLinks, cpackMenuLinksVector);
if (cpackMenuLinksVector.size() % 2 != 0) {
cmCPackLogger(
cmCPackLog::LOG_ERROR,
......
......@@ -8,6 +8,7 @@
#include "cmCPackLog.h"
#include "cmDuration.h"
#include "cmGeneratedFileStream.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cm_sys_stat.h"
......@@ -29,8 +30,7 @@ int cmCPackOSXX11Generator::PackageFiles()
std::ostringstream str;
std::ostringstream deleteStr;
std::vector<std::string> cpackPackageExecutablesVector;
cmSystemTools::ExpandListArgument(cpackPackageExecutables,
cpackPackageExecutablesVector);
cmExpandList(cpackPackageExecutables, cpackPackageExecutablesVector);
if (cpackPackageExecutablesVector.size() % 2 != 0) {
cmCPackLogger(
cmCPackLog::LOG_ERROR,
......
......@@ -25,6 +25,7 @@
#include "cmMakefile.h"
#include "cmState.h"
#include "cmStateSnapshot.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmake.h"
......@@ -332,7 +333,7 @@ int main(int argc, char const* const* argv)
"CPack generator not specified" << std::endl);
} else {
std::vector<std::string> generatorsVector;
cmSystemTools::ExpandListArgument(genList, generatorsVector);
cmExpandList(genList, generatorsVector);
for (std::string const& gen : generatorsVector) {
cmMakefile::ScopePushPop raii(&globalMF);
cmMakefile* mf = &globalMF;
......
......@@ -247,13 +247,11 @@ void cmCTestBuildHandler::PopulateCustomVectors(cmMakefile* mf)
// Record the user-specified custom warning rules.
if (const char* customWarningMatchers =
mf->GetDefinition("CTEST_CUSTOM_WARNING_MATCH")) {
cmSystemTools::ExpandListArgument(customWarningMatchers,
this->ReallyCustomWarningMatches);
cmExpandList(customWarningMatchers, this->ReallyCustomWarningMatches);
}
if (const char* customWarningExceptions =
mf->GetDefinition("CTEST_CUSTOM_WARNING_EXCEPTION")) {
cmSystemTools::ExpandListArgument(customWarningExceptions,
this->ReallyCustomWarningExceptions);
cmExpandList(customWarningExceptions, this->ReallyCustomWarningExceptions);
}
}
......
......@@ -6,6 +6,7 @@
#include "cmCTestConfigureHandler.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmake.h"
......@@ -25,7 +26,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
std::vector<std::string> options;
if (this->Values[ctc_OPTIONS]) {
cmSystemTools::ExpandListArgument(this->Values[ctc_OPTIONS], options);
cmExpandList(this->Values[ctc_OPTIONS], options);
}
if (this->CTest->GetCTestConfiguration("BuildDirectory").empty()) {
......
......@@ -212,7 +212,7 @@ bool cmCTestGIT::UpdateByFetchAndReset()
bool cmCTestGIT::UpdateByCustom(std::string const& custom)
{
std::vector<std::string> git_custom_command;
cmSystemTools::ExpandListArgument(custom, git_custom_command, true);
cmExpandList(custom, git_custom_command, true);
std::vector<char const*> git_custom;
git_custom.reserve(git_custom_command.size() + 1);
for (std::string const& i : git_custom_command) {
......
......@@ -7,6 +7,7 @@
#include "cmCTestVC.h"
#include "cmProcessTools.h"
#include "cmRange.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmsys/RegularExpression.hxx"
......@@ -460,7 +461,7 @@ bool cmCTestP4::LoadModifications()
bool cmCTestP4::UpdateCustom(const std::string& custom)
{
std::vector<std::string> p4_custom_command;
cmSystemTools::ExpandListArgument(custom, p4_custom_command, true);
cmExpandList(custom, p4_custom_command, true);
std::vector<char const*> p4_custom;
p4_custom.reserve(p4_custom_command.size() + 1);
......
......@@ -544,7 +544,7 @@ int cmCTestScriptHandler::RunCurrentScript()
// set any environment variables
if (!this->CTestEnv.empty()) {
std::vector<std::string> envArgs;
cmSystemTools::ExpandListArgument(this->CTestEnv, envArgs);
cmExpandList(this->CTestEnv, envArgs);
cmSystemTools::AppendEnv(envArgs);
}
......@@ -651,7 +651,7 @@ int cmCTestScriptHandler::PerformExtraUpdates()
command = this->UpdateCmd;
for (std::string const& eu : this->ExtraUpdates) {
std::vector<std::string> cvsArgs;
cmSystemTools::ExpandListArgument(eu, cvsArgs);
cmExpandList(eu, cvsArgs);
if (cvsArgs.size() == 2) {
std::string fullCommand = command;
fullCommand += " update ";
......@@ -795,7 +795,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
// run ctest, it may be more than one command in here
std::vector<std::string> ctestCommands;
cmSystemTools::ExpandListArgument(this->CTestCmd, ctestCommands);
cmExpandList(this->CTestCmd, ctestCommands);
// for each variable/argument do a putenv
for (std::string const& ctestCommand : ctestCommands) {
command = ctestCommand;
......
......@@ -7,6 +7,7 @@
#include "cmCommand.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include <sstream>
......@@ -68,7 +69,7 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
this->Makefile->GetDefinition("CTEST_NOTES_FILES");
if (notesFilesVariable) {
std::vector<std::string> notesFiles;
cmSystemTools::ExpandListArgument(notesFilesVariable, notesFiles);
cmExpandList(notesFilesVariable, notesFiles);