From 71a5ff718a8c967971bb8f9ea6e064d551f3a9eb Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Fri, 28 Jun 2019 13:37:02 +0200 Subject: cmake: Skip ARGS key in COMMAND --- mesonbuild/cmake/traceparser.py | 2 ++ test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mesonbuild/cmake/traceparser.py b/mesonbuild/cmake/traceparser.py index e9437177f..806b4fb1f 100644 --- a/mesonbuild/cmake/traceparser.py +++ b/mesonbuild/cmake/traceparser.py @@ -231,6 +231,8 @@ class CMakeTraceParser: target.outputs += [key] def handle_command(key: str, target: CMakeGeneratorTarget) -> None: + if key == 'ARGS': + return target.command[-1] += [key] def handle_depends(key: str, target: CMakeGeneratorTarget) -> None: 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 7143cf323..259151c2c 100644 --- a/test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt +++ b/test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt @@ -11,7 +11,7 @@ add_executable(mycpy cp.cpp) add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/genTest.cpp" "${CMAKE_CURRENT_BINARY_DIR}/genTest.hpp" - COMMAND gen genTest + COMMAND gen ARGS genTest ) add_custom_command( -- cgit v1.2.3