cmake: traceparser better handle lists
This commit is contained in:
parent
4ec6918cd5
commit
31eb41ec2f
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue