From fe733f28b9d3e21b7fcb8c7dc3969cf0d2724210 Mon Sep 17 00:00:00 2001 From: thomaslepoix Date: Mon, 22 Nov 2021 23:51:56 +0100 Subject: [PATCH] =?UTF-8?q?[=F0=9F=91=B7][#15]=20CMake=20:=20follow=20a=20?= =?UTF-8?q?cmake-utils=20refactor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 3 ++- src/CMakeLists.txt | 10 +++++----- test/unit/CMakeLists.txt | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c8172c..d191718 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,11 +45,12 @@ add_subdirectory( "${CMAKE_SOURCE_DIR}/src" ) add_subdirectory( "${CMAKE_SOURCE_DIR}/test" ) coverage_global() -static_analysis_codechecker( +codechecker( GLOBAL NO_CTU SKIP +${CMAKE_SOURCE_DIR}/src + +${CMAKE_SOURCE_DIR}/test/unit -* ARGS "${CMAKE_BINARY_DIR}/compile_commands.json" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 002595d..abff3b7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -70,7 +70,7 @@ target_include_directories( raisin file( GLOB_RECURSE RAISIN_HEADERS "*.hpp" ) -static_analysis_lizard( +lizard( TARGET raisin ADDITIONAL_FILES ${RAISIN_HEADERS} @@ -79,7 +79,7 @@ static_analysis_lizard( --sort cyclomatic_complexity ) -static_analysis_iwyu( +iwyu( TARGET raisin ARGS --std=c++17 # Useless with -p ? @@ -88,21 +88,21 @@ static_analysis_iwyu( --no_comments ) -static_analysis_tidy( +clang_tidy( TARGET raisin ARGS -p="${CMAKE_BINARY_DIR}" -checks=* ) -static_analysis_format( +clang_format( TARGET raisin ADDITIONAL_FILES ${RAISIN_HEADERS} ARGS ) -static_analysis_cppcheck( +cppcheck( TARGET raisin ADDITIONAL_FILES ${RAISIN_HEADERS} diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index 55c8afe..67951fa 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -49,7 +49,7 @@ if( Catch2_FOUND ) TARGETS_TO_COVER raisin ) - static_analysis_iwyu( + iwyu( TARGET raisin_unittest ARGS --std=c++17 # Useless with -p ? @@ -58,7 +58,7 @@ if( Catch2_FOUND ) --no_comments ) - static_analysis_format( + clang_format( TARGET raisin_unittest ADDITIONAL_FILES ${RAISIN_UNITTEST_HEADERS}