Skip to content

Commit

Permalink
[👷][#15] CMake : follow a cmake-utils refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaslepoix committed Nov 22, 2021
1 parent d2b5002 commit fe733f2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ target_include_directories( raisin

file( GLOB_RECURSE RAISIN_HEADERS "*.hpp" )

static_analysis_lizard(
lizard(
TARGET raisin
ADDITIONAL_FILES
${RAISIN_HEADERS}
Expand All @@ -79,7 +79,7 @@ static_analysis_lizard(
--sort cyclomatic_complexity
)

static_analysis_iwyu(
iwyu(
TARGET raisin
ARGS
--std=c++17 # Useless with -p ?
Expand All @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions test/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?
Expand All @@ -58,7 +58,7 @@ if( Catch2_FOUND )
--no_comments
)

static_analysis_format(
clang_format(
TARGET raisin_unittest
ADDITIONAL_FILES
${RAISIN_UNITTEST_HEADERS}
Expand Down

0 comments on commit fe733f2

Please sign in to comment.