mirror of
https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer.git
synced 2025-12-28 14:20:10 +01:00
Integrate clang-tidy-8 with cmake build
We will now run clang-tidy if available as part of the standard build with the bugprone-* and modernize-* checks Change-Id: I4c9d3cf8712f802b912d32a443bca1584169a8b3 Signed-off-by: Ben Davis <ben.davis@arm.com>
This commit is contained in:
parent
6ef056b517
commit
a7a53ef092
1 changed files with 7 additions and 0 deletions
|
|
@ -26,6 +26,13 @@ project(VkLayer_window_system_integration)
|
|||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(VULKAN_PKG_CONFIG vulkan)
|
||||
|
||||
find_program(CLANG_TIDY clang-tidy-8)
|
||||
|
||||
if (NOT CLANG_TIDY STREQUAL "CLANG_TIDY-NOTFOUND")
|
||||
message(STATUS "Using clang-tidy: ${CLANG_TIDY}")
|
||||
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY} -checks=bugprone-*,modernize-*)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pthread -fPIC")
|
||||
if (DEFINED DEBUG)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue