From 255f0f432bc34669812e23ecf5ac93ed196043e8 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Sat, 18 Apr 2020 18:45:46 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=20=D1=80=D0=B0=D0=B7=D1=80=D0=B5=D1=88=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=B0=D0=B2=D1=82=D0=BE=D0=BC=D0=B0=D1=82?= =?UTF-8?q?=D0=B8=D1=87=D0=B5=D1=81=D0=BA=D0=BE=D0=B3=D0=BE=20=D0=B8=D1=81?= =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BE?= =?UTF-8?q?=D1=88=D0=B8=D0=B1=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibCodeAnalysisClangAnalyze.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMLibCodeAnalysisClangAnalyze.cmake b/CMLibCodeAnalysisClangAnalyze.cmake index 8673cfb..5b20aad 100644 --- a/CMLibCodeAnalysisClangAnalyze.cmake +++ b/CMLibCodeAnalysisClangAnalyze.cmake @@ -8,14 +8,15 @@ find_program( clang-check-6.0 clang-check) if(CLANG_CHECK_EXE) - option(CLANG_ANALYZE_FIX "Perform fixes for Clang-Check" OFF) + option(CMLIB_CLANG_ANALYZE_FIX "Perform fixes for Clang-Check" OFF) endif() function(add_clang_analyze_check target) set(_sources ${ARGN}) + set(_args -analyze -extra-arg="-Wno-unknown-warning-option") if(CLANG_CHECK_EXE) - if(CLANG_CHECK_FIX) + if(CMLIB_CLANG_ANALYZE_FIX) list(APPEND _args "-fix") endif() if(NOT TARGET clang-analyze-check) @@ -23,8 +24,7 @@ function(add_clang_analyze_check target) endif() add_custom_target( clang-analyze-check-${target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${CLANG_CHECK_EXE} -analyze -extra-arg="-Wno-unknown-warning-option" -p ${CMAKE_BINARY_DIR} - ${_sources}) + COMMAND ${CLANG_CHECK_EXE} ${_args} -p ${CMAKE_BINARY_DIR} ${_sources}) add_dependencies(clang-analyze-check-${target} ${target}) add_dependencies(clang-analyze-check clang-analyze-check-${target}) else()