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