From d318585fb27d4be598e95b1a4f435a9a2a12599f Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 13 Jul 2019 13:56:15 +0200 Subject: [PATCH] Add EXCLUDED_FILES variable When adding source files to the _FILES variables conditionally those are so far not being formatted or translated. Adding these files at least to the EXCLUDED_FILES will fix this. Replaces DOC_ONLY_FILES which served the same purpose but was limited to documentation. --- cmake/modules/BasicConfig.cmake | 3 ++- cmake/modules/Doxygen.cmake | 4 ++-- doc/buildvariables.md | 6 +++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/cmake/modules/BasicConfig.cmake b/cmake/modules/BasicConfig.cmake index a92c467..86426c8 100644 --- a/cmake/modules/BasicConfig.cmake +++ b/cmake/modules/BasicConfig.cmake @@ -274,7 +274,8 @@ set(FORMATABLE_FILES ${WIDGETS_HEADER_FILES} ${WIDGETS_SRC_FILES} ${QML_HEADER_FILES} - ${QML_SRC_FILES}) + ${QML_SRC_FILES} + ${EXCLUDED_FILES}) # only format C/C++ files (and not eg. QML files) if (FORMATABLE_FILES) list(FILTER diff --git a/cmake/modules/Doxygen.cmake b/cmake/modules/Doxygen.cmake index ae51455..31ea93d 100644 --- a/cmake/modules/Doxygen.cmake +++ b/cmake/modules/Doxygen.cmake @@ -44,8 +44,8 @@ set(DOXY_INPUT_FILES ${WIDGETS_SRC_FILES} ${QML_HEADER_FILES} ${QML_SRC_FILES} - ${DOC_FILES} - ${DOC_ONLY_FILES}) + ${EXCLUDED_FILES} + ${DOC_FILES}) set(DOXY_PATH_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/") list(GET DOC_FILES 0 DOXY_MAIN_PAGE_FILE) set(DOXY_MAIN_PAGE_FILE "${DOXY_PATH_PREFIX}${DOXY_MAIN_PAGE_FILE}") diff --git a/doc/buildvariables.md b/doc/buildvariables.md index 20cf58e..8c44518 100644 --- a/doc/buildvariables.md +++ b/doc/buildvariables.md @@ -227,9 +227,13 @@ and qtutilities. only required for Qt Widgets GUI * `QML_HEADER_FILES`/`QML_SRC_FILES`/`QML_RES_FILES`: specifies C++ header/source files and Qt resouce files only required for Qt Quick GUI +* `EXCLUDED_FILES`: specifies C++ files which are part of the project (and therefore + should be formatted by the `tidy` target, added to the documentation and considered + for translations) but are excluded from the actual build; when adding files + conditionally to the other `_FILES` variables, be sure to add them at least + to `EXCLUDED_FILES` * `DOC_FILES`: additional markdown files to be inlcuded in the documentation created via Doxygen; the first file is used as the main page -* `DOC_ONLY_FILES`: specifies documentation-only files * `REQUIRED_ICONS`: names of the icons required by the application and the used libraries (can be generated with [findicons](https://github.com/Martchus/findicons))