From 805908026c90688e3cf7b18671156d131b20de12 Mon Sep 17 00:00:00 2001 From: Daniel <d.hornung@indiscale.com> Date: Wed, 13 Oct 2021 18:07:21 +0200 Subject: [PATCH] FIX: Debug building works now without clang-tidy installed. --- CMakeLists.txt | 6 +++--- cmake/CodeCoverage.cmake | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index baaed54..b2fe95e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -252,15 +252,15 @@ endfunction() option(LINTING "Enable linting with clang-tidy and iwyu when in non-Debug build-type" OFF) -if("${CMAKE_BUILD_TYPE}" MATCHES "Debug" OR LINTING) +if (clang_tidy AND ("${CMAKE_BUILD_TYPE}" MATCHES "Debug" OR LINTING)) set(_LINTING ON) endif() option(SKIP_LINTING "Skip linting even when in Debug build-type" OFF) -if("${CMAKE_BUILD_TYPE}" MATCHES "Debug" AND SKIP_LINTING) +if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug" AND SKIP_LINTING) message(WARNING "Skipping linting due to SKIP_LINTING option") set(_LINTING OFF) endif() -if(_LINTING) +if (_LINTING) ### set paranoid compiler flags add_compiler_flag("-Wall") diff --git a/cmake/CodeCoverage.cmake b/cmake/CodeCoverage.cmake index a9b17e2..8a26b41 100644 --- a/cmake/CodeCoverage.cmake +++ b/cmake/CodeCoverage.cmake @@ -145,7 +145,7 @@ endif() find_library(covlib NAMES gcov lcov) message(STATUS "covlib: >${covlib}<") if (${covlib} STREQUAL "covlib-NOTFOUND") - message(Warning "lcov or gcov libraries not found, skipping code coverage.") + message(STATUS "lcov or gcov libraries not found, skipping code coverage.") return() endif() -- GitLab