Added clang-tidy detection and activation

feature/integrate-clang-tidy
Michael Mandl 2019-02-27 17:07:57 +01:00
parent 5c6ed8191b
commit 55f719a56f
1 changed files with 9 additions and 1 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.6)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
@ -11,5 +11,13 @@ conan_cmake_run(CONANFILE conanfile.txt
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
find_program(CLANG_TIDY_EXE NAMES "clang-tidy")
if (CLANG_TIDY_EXE)
message(STATUS "clang-tidy found in ${CLANG_TIDY_EXE}")
set(CMAKE_CXX_CLANG_TIDY= "${CLANG_TIDY_EXE}")
else()
message(WARNING "clang-tidy missing, no checks!")
endif()
add_subdirectory(source)
#add_subdirectory(test)