From a401afbe998af8555fe679a9263838e14031e95c Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Wed, 29 Dec 2021 12:50:56 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=82=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D1=8B=D0=B9=20=D1=84=D0=B0=D0=B9=D0=BB=20=D0=BD=D0=B0=D1=81?= =?UTF-8?q?=D1=82=D1=80=D0=BE=D0=B5=D0=BA=20uncrustify.cfg=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=BA=D0=B0=D0=B6=D0=B4=D0=BE=D0=B9=20=D1=86=D0=B5?= =?UTF-8?q?=D0=BB=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MyxCMake/modules/MyxCMakeFormatSources.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MyxCMake/modules/MyxCMakeFormatSources.cmake b/MyxCMake/modules/MyxCMakeFormatSources.cmake index 5498acf..f6a7674 100644 --- a/MyxCMake/modules/MyxCMakeFormatSources.cmake +++ b/MyxCMake/modules/MyxCMakeFormatSources.cmake @@ -54,23 +54,23 @@ function(myx_cmake_format_sources target) endif() if(EXISTS ${CMAKE_SOURCE_DIR}/.uncrustify.cfg) - add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/uncrustify.cfg + add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/uncrustify-${target}.cfg COMMAND ${UNCRUSTIFY_EXE} --update-config-with-doc -c ${CMAKE_SOURCE_DIR}/.uncrustify.cfg - -o ${CMAKE_BINARY_DIR}/uncrustify.cfg) - list(APPEND UNCRUSTIFY_OPTS -c ${CMAKE_BINARY_DIR}/uncrustify.cfg) + -o ${CMAKE_BINARY_DIR}/uncrustify-${target}.cfg) + list(APPEND UNCRUSTIFY_OPTS -c ${CMAKE_BINARY_DIR}/uncrustify-${target}.cfg) endif() # cmake-format: off add_custom_target(${target}-format-sources-check-uncrustify - DEPENDS ${CMAKE_BINARY_DIR}/uncrustify.cfg + DEPENDS ${CMAKE_BINARY_DIR}/uncrustify-${target}.cfg COMMAND ${UNCRUSTIFY_EXE} ${UNCRUSTIFY_OPTS} --check ${__sources}) list(APPEND UNCRUSTIFY_OPTS --replace --no-backup) add_custom_target(${target}-format-sources-uncrustify - DEPENDS ${CMAKE_BINARY_DIR}/uncrustify.cfg + DEPENDS ${CMAKE_BINARY_DIR}/uncrustify-${target}.cfg COMMAND ${UNCRUSTIFY_EXE} ${UNCRUSTIFY_OPTS} --mtime ${__sources}) add_custom_target(${target}-doc-doxygen-append-comments - DEPENDS ${CMAKE_BINARY_DIR}/uncrustify.cfg + DEPENDS ${CMAKE_BINARY_DIR}/uncrustify-${target}.cfg COMMAND ${UNCRUSTIFY_EXE} ${UNCRUSTIFY_OPTS} --set cmt_insert_class_header=uncrustify-classheader.txt --set cmt_insert_file_footer=uncrustify-filefooter.txt