diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-08-23 14:17:39 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-08-23 15:07:49 (GMT) |
commit | aaf59120bfd77a960317923da30e1a70ce0d8aae (patch) | |
tree | 9fba0f2e6c0157887ccf0848c3357dae58edee0a /Source/cmake.cxx | |
parent | 19612dffd27d90d73e3b7cff9cbba241294c17e9 (diff) | |
download | CMake-aaf59120bfd77a960317923da30e1a70ce0d8aae.zip CMake-aaf59120bfd77a960317923da30e1a70ce0d8aae.tar.gz CMake-aaf59120bfd77a960317923da30e1a70ce0d8aae.tar.bz2 |
Source sweep: Replace cmExpandList with the shorter cmExpandedList
This replaces the code pattern
```
std::vector<std::string> args;
cmExpandList(valueStr, args, ...)
```
with
```
std::vector<std::string> args = cmExpandedList(valueStr, ...)
```
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index a5c8d46..077ea4d 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -531,8 +531,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args) } } else if (mode == "COMPILE") { std::string includes = mf->GetSafeDefinition("PACKAGE_INCLUDE_DIRS"); - std::vector<std::string> includeDirs; - cmExpandList(includes, includeDirs); + std::vector<std::string> includeDirs = cmExpandedList(includes); gg->CreateGenerationObjects(); cmLocalGenerator* lg = gg->LocalGenerators[0]; @@ -548,8 +547,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args) tgt->SetProperty("LINKER_LANGUAGE", language.c_str()); std::string libs = mf->GetSafeDefinition("PACKAGE_LIBRARIES"); - std::vector<std::string> libList; - cmExpandList(libs, libList); + std::vector<std::string> libList = cmExpandedList(libs); for (std::string const& lib : libList) { tgt->AddLinkLibrary(*mf, lib, GENERAL_LibraryType); } @@ -1264,8 +1262,7 @@ struct SaveCacheEntry int cmake::HandleDeleteCacheVariables(const std::string& var) { - std::vector<std::string> argsSplit; - cmExpandList(std::string(var), argsSplit, true); + std::vector<std::string> argsSplit = cmExpandedList(std::string(var), true); // erase the property to avoid infinite recursion this->State->SetGlobalProperty("__CMAKE_DELETE_CACHE_CHANGE_VARS_", ""); if (this->State->GetIsInTryCompile()) { |