From 636a30998166668f49a8ccca9daa193f6e7ca432 Mon Sep 17 00:00:00 2001 From: Dundar Goc Date: Sat, 18 Jun 2022 17:31:01 +0200 Subject: build(cmake): simplify def_cmd_target function Instead of appending to a command output, append to an existing target instead. The primary benefit is intermediary ...-cmd targets aren't needed, we can instead append commands to the relevant target directly. --- src/nvim/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 0d0fba265b..f465d911f9 100755 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -805,7 +805,7 @@ add_custom_target(lintc DEPENDS ${LINT_TARGETS}) def_cmd_target(lintuncrustify ${UNCRUSTIFY_PRG} UNCRUSTIFY_PRG false) if(UNCRUSTIFY_PRG) - add_custom_command(OUTPUT lintuncrustify-cmd APPEND + add_custom_command(TARGET lintuncrustify COMMAND ${CMAKE_COMMAND} -D UNCRUSTIFY_PRG=${UNCRUSTIFY_PRG} -D PROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} -- cgit