From 8ddf663ac60332cfa83f829b8d40596f9fe1c926 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 30 Jun 2019 14:13:14 +0900 Subject: CMakeLists.txt: add clang-format invocation to update-api target ...instead of using a separate update-format-api target. --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 874594e8..eafa95f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,13 +164,11 @@ if (MATRIX_DOC_PATH AND GTAD_PATH) list(APPEND api_HDRS ${H}) endforeach() set(CLANG_FORMAT_ARGS -i -sort-includes -verbose) - add_custom_target(update-format-api + add_custom_command(TARGET update-api POST_BUILD COMMAND ${ABS_CLANG_FORMAT} ${CLANG_FORMAT_ARGS} ${api_SRCS} COMMAND ${ABS_CLANG_FORMAT} ${CLANG_FORMAT_ARGS} ${api_HDRS} - DEPENDS update-api WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} VERBATIM - SOURCES .clang-format ) endif() endif() -- cgit v1.2.3