diff --git a/CMakeLists.txt b/CMakeLists.txt index baaed5452c7458f8a28e9861ff8cd4e1ca46ed32..b2fe95e144a61eb7bbe4c21c2cd25dbe546e9c89 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 a9b17e2f26042ad45bb2378f169178761e819387..8a26b4117b567dea4b5c3bb095964c2125ced813 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()