Skip to content
Snippets Groups Projects
Commit 89420cd9 authored by Tadej Novak's avatar Tadej Novak
Browse files

Merge branch 'cppcheck' into 'main'

CxxUtils: enable cppcheck by default

See merge request atlas/athena!75575
parents aab75a4f 53c7e283
No related branches found
No related tags found
No related merge requests found
...@@ -29,9 +29,8 @@ endif() ...@@ -29,9 +29,8 @@ endif()
set( ATLAS_GCC_CHECKERS_CONFIG ${_config} set( ATLAS_GCC_CHECKERS_CONFIG ${_config}
CACHE STRING "Configuration file(s) for the GCC checker plugins" FORCE ) CACHE STRING "Configuration file(s) for the GCC checker plugins" FORCE )
# CppCheck options: # CppCheck options:
option( ATLAS_USE_CPPCHECK "Use CppCheck in the build" OFF ) option( ATLAS_USE_CPPCHECK "Use CppCheck in the build" ON )
# User-defined cppcheck command line options: # User-defined cppcheck command line options:
set( ATLAS_CPPCHECK_OPTIONS "--enable=warning,portability" set( ATLAS_CPPCHECK_OPTIONS "--enable=warning,portability"
......
...@@ -128,6 +128,8 @@ if( ATLAS_USE_CPPCHECK ) ...@@ -128,6 +128,8 @@ if( ATLAS_USE_CPPCHECK )
list( JOIN CMAKE_CPPCHECK_DEFAULT " " _cmd ) list( JOIN CMAKE_CPPCHECK_DEFAULT " " _cmd )
message( STATUS "Checking C/C++ files with: ${_cmd}" ) message( STATUS "Checking C/C++ files with: ${_cmd}" )
endif() endif()
else()
message( WARNING "Cppcheck is enabled via ATLAS_USE_CPPCHECK but cannot be found.")
endif() endif()
endif() endif()
......
...@@ -138,6 +138,8 @@ if( ATLAS_USE_CPPCHECK ) ...@@ -138,6 +138,8 @@ if( ATLAS_USE_CPPCHECK )
list( JOIN CMAKE_CPPCHECK_DEFAULT " " _cmd ) list( JOIN CMAKE_CPPCHECK_DEFAULT " " _cmd )
message( STATUS "Checking C/C++ files with: ${_cmd}" ) message( STATUS "Checking C/C++ files with: ${_cmd}" )
endif() endif()
else()
message( WARNING "Cppcheck is enabled via ATLAS_USE_CPPCHECK but cannot be found.")
endif() endif()
endif() endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment