summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2023-04-14 14:48:16 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2023-04-24 08:41:10 (GMT)
commite08ba229ee3107bcb814ca45bc9c72a48abf1ba2 (patch)
treec34d2ca05820acbb31202c5bdbc102059441076b /Source/cmake.cxx
parent51b0d45d9120d4bca5c7285d5e6b2f80db5a8310 (diff)
downloadCMake-e08ba229ee3107bcb814ca45bc9c72a48abf1ba2.zip
CMake-e08ba229ee3107bcb814ca45bc9c72a48abf1ba2.tar.gz
CMake-e08ba229ee3107bcb814ca45bc9c72a48abf1ba2.tar.bz2
CMake code rely on cmList class for CMake lists management (part. 1)
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 8dee5cc..623478e 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -53,6 +53,7 @@
# include "cmMakefileProfilingData.h"
#endif
#include "cmJSONState.h"
+#include "cmList.h"
#include "cmMessenger.h"
#include "cmState.h"
#include "cmStateDirectory.h"
@@ -813,7 +814,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
}
} else if (mode == "COMPILE"_s) {
std::string includes = mf->GetSafeDefinition("PACKAGE_INCLUDE_DIRS");
- std::vector<std::string> includeDirs = cmExpandedList(includes);
+ cmList includeDirs{ includes };
this->GlobalGenerator->CreateGenerationObjects();
const auto& lg = this->GlobalGenerator->LocalGenerators[0];
@@ -829,7 +830,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
tgt->SetProperty("LINKER_LANGUAGE", language);
std::string libs = mf->GetSafeDefinition("PACKAGE_LIBRARIES");
- std::vector<std::string> libList = cmExpandedList(libs);
+ cmList libList{ libs };
for (std::string const& lib : libList) {
tgt->AddLinkLibrary(*mf, lib, GENERAL_LibraryType);
}
@@ -1026,7 +1027,7 @@ void cmake::SetArgs(const std::vector<std::string>& args)
CommandArgument{ "--check-build-system", CommandArgument::Values::Two,
[](std::string const& value, cmake* state) -> bool {
- std::vector<std::string> values = cmExpandedList(value);
+ cmList values{ value };
state->CheckBuildSystemArgument = values[0];
state->ClearBuildSystem = (atoi(values[1].c_str()) > 0);
return true;
@@ -2163,7 +2164,7 @@ struct SaveCacheEntry
int cmake::HandleDeleteCacheVariables(const std::string& var)
{
- std::vector<std::string> argsSplit = cmExpandedList(var, true);
+ cmList argsSplit{ var, cmList::EmptyElements::Yes };
// erase the property to avoid infinite recursion
this->State->SetGlobalProperty("__CMAKE_DELETE_CACHE_CHANGE_VARS_", "");
if (this->GetIsInTryCompile()) {