diff --git a/Control/CxxUtils/cmake/CxxUtilsSettingsConfig.cmake b/Control/CxxUtils/cmake/CxxUtilsSettingsConfig.cmake index 26d6f74c11c726af59ab1163737a95f140ed0a6e..5052f2e56724c3f77c57b445864b3d08114b09d0 100644 --- a/Control/CxxUtils/cmake/CxxUtilsSettingsConfig.cmake +++ b/Control/CxxUtils/cmake/CxxUtilsSettingsConfig.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration # # Additional CMake settings for the build. Used by Projects/. # @@ -29,9 +29,6 @@ endif() set( ATLAS_GCC_CHECKERS_CONFIG ${_config} CACHE STRING "Configuration file(s) for the GCC checker plugins" FORCE ) -# CppCheck options: -option( ATLAS_USE_CPPCHECK "Use CppCheck in the build" ON ) - # User-defined cppcheck command line options: set( ATLAS_CPPCHECK_OPTIONS "--enable=warning,portability,performance" CACHE STRING "cppcheck user-defined command line options" ) diff --git a/Projects/Athena/CMakeLists.txt b/Projects/Athena/CMakeLists.txt index 7bac95d5216534a3d499173f9f03e994529f1b0c..ab1dd37ee0d9845c5ac54888e6051d14c780340e 100644 --- a/Projects/Athena/CMakeLists.txt +++ b/Projects/Athena/CMakeLists.txt @@ -79,6 +79,9 @@ set( CxxUtilsSettings_DIR "${CMAKE_SOURCE_DIR}/../../Control/CxxUtils/cmake" ) find_package( CxxUtilsSettings ) +# Enable CppCheck: +option( ATLAS_USE_CPPCHECK "Use CppCheck in the build" ON ) + # Decide whether to enable LTO for AtlasGeant4 and its OBJECT libs include( CheckIPOSupported ) check_ipo_supported( RESULT ATLAS_IPO_CHECK_RESULT ) diff --git a/Projects/Athena/cmake/PreConfig.cmake.in b/Projects/Athena/cmake/PreConfig.cmake.in index c2eeb3e4b4956d1679e3a06a5d8a2627af0bcbe8..a444a03ba6baac03eccef63983f486ce4cc6ac88 100644 --- a/Projects/Athena/cmake/PreConfig.cmake.in +++ b/Projects/Athena/cmake/PreConfig.cmake.in @@ -29,6 +29,9 @@ set( ATLAS_FLAKE8 @ATLAS_FLAKE8@ set( ATLAS_PYTHON_CHECKER @ATLAS_PYTHON_CHECKER@ CACHE STRING "Python checker command to run during Python module compilation" ) +# CppCheck +option( ATLAS_USE_CPPCHECK "Use CppCheck in the build" @ATLAS_USE_CPPCHECK@ ) + # Decide whether to enable LTO for AtlasGeant4 and its OBJECT libs set( ATLAS_GEANT4_USE_LTO @ATLAS_GEANT4_USE_LTO@ CACHE BOOL "Use link-time-optimization in building AtlasGeant4" )