From f4ea735208e3ad462a0bddc976d63f822ce7b17f Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Sat, 20 Jul 2019 11:39:42 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=83=D1=82=D1=8C=20=D0=BA=20=D1=84?= =?UTF-8?q?=D0=B0=D0=B9=D0=BB=D1=83=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE?= =?UTF-8?q?=D0=B9=D0=BA=D0=B8=20uncrustify=20=D0=B2=D0=BD=D1=83=D1=82?= =?UTF-8?q?=D1=80=D0=B8=20=D0=BF=D1=80=D0=BE=D0=B5=D0=BA=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibFormatSources.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMLibFormatSources.cmake b/CMLibFormatSources.cmake index 3e07567..13d7fc9 100644 --- a/CMLibFormatSources.cmake +++ b/CMLibFormatSources.cmake @@ -8,8 +8,12 @@ function(add_uncrustify_format) if(NOT TARGET uncrustify-format) add_custom_target(uncrustify-format) endif() + list(APPEND OPTS -lCPP --replace --no-backup) + if(EXISTS ${CMAKE_SOURCE_DIR}/cmake/etc/uncrustify/default.cfg) + list(APPEND OPTS -c ${CMAKE_SOURCE_DIR}/cmake/etc/uncrustify/default.cfg) + endif() add_custom_target(uncrustify-format-${_target} - COMMAND ${UNCRUSTIFY_EXE} -lCPP --replace --no-backup ${_sources}) + COMMAND ${UNCRUSTIFY_EXE} ${OPTS} ${_sources}) add_dependencies(uncrustify-format uncrustify-format-${_target}) else() message(WARNING "Uncrustify is not found")