diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-02-16 20:52:58 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-02-19 11:52:22 +0100 |
commit | 31eb41ec2fd2c7ed06406fb4e5ea87af5010d4e5 (patch) | |
tree | 1ec1a7b38fa7098336395ca235e7ee1fac560d45 | |
parent | 4ec6918cd59d0fbf6cd3e93c7f5d86d43a4f44e8 (diff) | |
download | meson-31eb41ec2fd2c7ed06406fb4e5ea87af5010d4e5.zip meson-31eb41ec2fd2c7ed06406fb4e5ea87af5010d4e5.tar.gz meson-31eb41ec2fd2c7ed06406fb4e5ea87af5010d4e5.tar.bz2 |
cmake: traceparser better handle lists
-rw-r--r-- | mesonbuild/cmake/traceparser.py | 7 | ||||
-rw-r--r-- | test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/mesonbuild/cmake/traceparser.py b/mesonbuild/cmake/traceparser.py index 7b29c86..28f22b3 100644 --- a/mesonbuild/cmake/traceparser.py +++ b/mesonbuild/cmake/traceparser.py @@ -300,7 +300,7 @@ class CMakeTraceParser: target = CMakeGeneratorTarget(name) def handle_output(key: str, target: CMakeGeneratorTarget) -> None: - target.outputs += [key] + target.outputs += key.split(';') def handle_command(key: str, target: CMakeGeneratorTarget) -> None: if key == 'ARGS': @@ -308,7 +308,7 @@ class CMakeTraceParser: target.command[-1] += key.split(';') def handle_depends(key: str, target: CMakeGeneratorTarget) -> None: - target.depends += [key] + target.depends += key.split(';') def handle_working_dir(key: str, target: CMakeGeneratorTarget) -> None: if target.working_dir is None: @@ -465,7 +465,8 @@ class CMakeTraceParser: if not target: return self._gen_exception('add_dependencies', 'target not found', tline) - target.depends += args[1:] + for i in args[1:]: + target.depends += i.split(';') def _cmake_target_compile_definitions(self, tline: CMakeTraceLine) -> None: # DOC: https://cmake.org/cmake/help/latest/command/target_compile_definitions.html diff --git a/test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt b/test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt index 8a6ab67..70ac236 100644 --- a/test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt +++ b/test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt @@ -22,7 +22,7 @@ add_custom_command( COMMAND mycpy cpyBase.cpp.in cpyBase.cpp.something COMMAND mycpy cpyBase.cpp.something cpyBase.cpp.IAmRunningOutOfIdeas COMMAND mycpy cpyBase.cpp.IAmRunningOutOfIdeas cpyBase.cpp - DEPENDS cpyBase.cpp.am gen + DEPENDS cpyBase.cpp.am;gen ) add_custom_command( @@ -124,4 +124,4 @@ add_custom_target(args_test_cmd add_custom_target(macro_name_cmd COMMAND macro_name) add_dependencies(cmModLib args_test_cmd) -add_dependencies(args_test_cmd macro_name_cmd) +add_dependencies(args_test_cmd macro_name_cmd;gen;mycpy) |