aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
1 files changed, 1 insertions, 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()