summaryrefslogtreecommitdiffstats
path: root/Source/cmCMakePathCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-01 15:38:16 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-05-01 15:38:32 (GMT)
commit4dc47f82c2a3fc492d4cb94b4d96a24b9fc9cc47 (patch)
treea76938b9dd21854b079cd0a23de21b1e61cb1eeb /Source/cmCMakePathCommand.cxx
parentc2100084c85aed33eea1f4abe83442dddc393137 (diff)
parent241304190ffdf9cc7d4ede0601da370b111468cc (diff)
downloadCMake-4dc47f82c2a3fc492d4cb94b4d96a24b9fc9cc47.zip
CMake-4dc47f82c2a3fc492d4cb94b4d96a24b9fc9cc47.tar.gz
CMake-4dc47f82c2a3fc492d4cb94b4d96a24b9fc9cc47.tar.bz2
Merge topic 'CMake-uses-cmList-class'
241304190f CMake code rely on cmList class for CMake lists management (part. 2) 87fe031a07 cmList class: various enhancements Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8441
Diffstat (limited to 'Source/cmCMakePathCommand.cxx')
-rw-r--r--Source/cmCMakePathCommand.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmCMakePathCommand.cxx b/Source/cmCMakePathCommand.cxx
index 7755082..0c8f537 100644
--- a/Source/cmCMakePathCommand.cxx
+++ b/Source/cmCMakePathCommand.cxx
@@ -18,6 +18,7 @@
#include "cmArgumentParserTypes.h"
#include "cmCMakePath.h"
#include "cmExecutionStatus.h"
+#include "cmList.h"
#include "cmMakefile.h"
#include "cmRange.h"
#include "cmStringAlgorithms.h"
@@ -626,12 +627,12 @@ bool HandleConvertCommand(std::vector<std::string> const& args,
return false;
}
- std::vector<std::string> paths;
+ cmList paths;
if (action == cmakePath) {
paths = cmSystemTools::SplitString(args[1], pathSep.front());
} else {
- cmExpandList(args[1], paths);
+ paths.assign(args[1]);
}
for (auto& path : paths) {
@@ -648,7 +649,7 @@ bool HandleConvertCommand(std::vector<std::string> const& args,
}
}
- auto value = cmJoin(paths, action == cmakePath ? ";"_s : pathSep);
+ auto value = action == cmakePath ? paths.to_string() : paths.join(pathSep);
status.GetMakefile().AddDefinition(args[3], value);
return true;