diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 9b473812df2..c460a5e340b 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -22,4 +22,14 @@ if(WITH_LEGACY_OPENGL) add_definitions(-DWITH_LEGACY_OPENGL) endif() +if(WITH_CLANG_TIDY) + if(NOT CMAKE_C_COMPILER_ID MATCHES "Clang") + message(FATAL_ERROR "Currently Clang-Tidy is only supported when using Clang compiler") + endif() + + find_package(ClangTidy REQUIRED) + set(CMAKE_C_CLANG_TIDY ${CLANG_TIDY_EXECUTABLE}) + set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXECUTABLE}) +endif() + add_subdirectory(blender) |