diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,4 +150,4 @@ install(FILES org.kde.kdevelop.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) -feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) +feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/analyzers/cppcheck/CMakeLists.txt b/analyzers/cppcheck/CMakeLists.txt --- a/analyzers/cppcheck/CMakeLists.txt +++ b/analyzers/cppcheck/CMakeLists.txt @@ -1,5 +1,13 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kdevcppcheck\") +find_package(Cppcheck QUIET) +set_package_properties(Cppcheck PROPERTIES + DESCRIPTION "A tool for static C/C++ code analysis" + URL "http://cppcheck.sourceforge.net/" + PURPOSE "Required for the Cppcheck plugin" + TYPE RUNTIME +) + include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) diff --git a/cmake/modules/FindCppcheck.cmake b/cmake/modules/FindCppcheck.cmake new file mode 100644 --- /dev/null +++ b/cmake/modules/FindCppcheck.cmake @@ -0,0 +1,22 @@ +# Find the cppcheck executable +# +# Defines the following variables +# Cppcheck_EXECUTABLE - path of the Cppcheck executable + +#============================================================================= +# Copyright 2017 Friedrich W. H. Kossebau +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= + +find_program(Cppcheck_EXECUTABLE NAMES cppcheck) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Cppcheck DEFAULT_MSG Cppcheck_EXECUTABLE) + +mark_as_advanced(Cppcheck_EXECUTABLE)