Skip to content

Commit

Permalink
Merge pull request redpanda-data#15344 from dotnwat/clang-tidy
Browse files Browse the repository at this point in the history
clang-tidy: tweak find_program hints
  • Loading branch information
dotnwat authored Dec 6, 2023
2 parents 4e820ca + 6d9236c commit f9565f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,9 @@ set(Redpanda_ENABLE_CLANG_TIDY "ON" CACHE STRING

if(NOT Redpanda_ENABLE_CLANG_TIDY STREQUAL OFF)
if(Redpanda_ENABLE_CLANG_TIDY STREQUAL FORCE_ON)
find_program(CLANG_TIDY_COMMAND clang-tidy
PATHS ${PROJECT_SOURCE_DIR}/vbuild/llvm/install/bin
REQUIRED)
find_program(CLANG_TIDY_COMMAND clang-tidy REQUIRED)
else()
find_program(CLANG_TIDY_COMMAND clang-tidy
PATHS ${PROJECT_SOURCE_DIR}/vbuild/llvm/install/bin)
find_program(CLANG_TIDY_COMMAND clang-tidy)
endif()
if(CLANG_TIDY_COMMAND)
set(Redpanda_ENABLE_CLANG_TIDY ON)
Expand Down
2 changes: 1 addition & 1 deletion src/v/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ add_compile_options(-Wall)
option(REDPANDA_RUN_CLANG_TIDY "Enable clang-tidy checks" OFF)
if(REDPANDA_RUN_CLANG_TIDY)
find_program(CLANG_TIDY_COMMAND clang-tidy
PATHS ${PROJECT_SOURCE_DIR}/vbuild/llvm/install/bin)
HINTS ${PROJECT_SOURCE_DIR}/vbuild/llvm/install/bin)
if(NOT CLANG_TIDY_COMMAND)
message(FATAL_ERROR "Could not find clang-tidy program")
endif()
Expand Down

0 comments on commit f9565f4

Please sign in to comment.