Use ctcache to cache clang-tidy results (#3741)
This commit is contained in:
@@ -28,18 +28,7 @@ if (MLN_DRAWABLE_RENDERER)
|
||||
message(FATAL "Do not pass MLN_DRAWABLE_RENDERER, the drawable renderer is now the default")
|
||||
endif()
|
||||
|
||||
if (MLN_WITH_CLANG_TIDY)
|
||||
find_program(CLANG_TIDY_COMMAND NAMES clang-tidy)
|
||||
if(NOT CLANG_TIDY_COMMAND)
|
||||
message(FATAL_ERROR "ENABLE_CLANG_TIDY is ON but clang-tidy is not found!")
|
||||
else()
|
||||
message(STATUS "Found clang-tidy at ${CLANG_TIDY_COMMAND}")
|
||||
endif()
|
||||
# TODO: there are options which are only available on GCC(e.g. -Werror=maybe-uninitialized),
|
||||
# that's why we need to disable this `unknown-warning-option` here.
|
||||
# We could check if current compiler supports particular flag before enabling it.
|
||||
set(CLANG_TIDY_COMMAND "${CLANG_TIDY_COMMAND};--extra-arg=-Wno-unknown-warning-option;--extra-arg=-Wno-pragmas")
|
||||
endif()
|
||||
include(cmake/clang-tidy.cmake)
|
||||
|
||||
if (MLN_WITH_QT AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 13.0)
|
||||
|
||||
Reference in New Issue
Block a user