From 9ef0a32c2273d617b81fe47e1557f9d2754f0930 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 12 Jun 2020 12:55:33 +0200 Subject: CMakeLists.txt: fix update-api target when there's no clang-format --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e56e856..3eef0384 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -221,6 +221,7 @@ if (MATRIX_DOC_PATH AND GTAD_PATH) ${API_DEFS} VERBATIM ) + add_custom_target(update-api DEPENDS generate-unformatted-api) if (ABS_CLANG_FORMAT) set(CLANG_FORMAT_ARGS -i -sort-includes ${CLANG_FORMAT_ARGS}) # FIXME: the list of files should be produced after GTAD has run. @@ -235,9 +236,7 @@ if (MATRIX_DOC_PATH AND GTAD_PATH) ${ABS_CLANG_FORMAT} ${CLANG_FORMAT_ARGS} ${api_ALL_SRCS} DEPENDS generate-unformatted-api VERBATIM) - add_custom_target(update-api DEPENDS format-api) - else() - add_custom_target(update-api DEPENDS generate-unformatted-api) + add_dependencies(update-api DEPENDS format-api) endif() endif() endif() -- cgit v1.2.3