diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2023-04-25 17:54:23 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2023-04-29 07:54:31 (GMT) |
commit | 241304190ffdf9cc7d4ede0601da370b111468cc (patch) | |
tree | e35dd7fe5c89da1eed3abe10f37abe3586e64df7 /Source/cmCMakePathCommand.cxx | |
parent | 87fe031a0703f07b8636f8ea59b6746788e71869 (diff) | |
download | CMake-241304190ffdf9cc7d4ede0601da370b111468cc.zip CMake-241304190ffdf9cc7d4ede0601da370b111468cc.tar.gz CMake-241304190ffdf9cc7d4ede0601da370b111468cc.tar.bz2 |
CMake code rely on cmList class for CMake lists management (part. 2)
Diffstat (limited to 'Source/cmCMakePathCommand.cxx')
-rw-r--r-- | Source/cmCMakePathCommand.cxx | 7 |
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; |