Skip to content

Commit

Permalink
fix protozero cmake config failure on linux if clang-tidy is installed
Browse files Browse the repository at this point in the history
Summary:
addressed #39
change based on mapbox/protozero@4904953

Reviewed By: enpe

Differential Revision: D63415372

fbshipit-source-id: 1fe789c117c2327c820fb6e279f5dca44e834fb1
  • Loading branch information
ASchneiderMeta authored and facebook-github-bot committed Sep 25, 2024
1 parent 1486322 commit 0e981b4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions build/cmake/third-party/protozero/protozero.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b975d49..40a6b0b 100644
index b975d49..e925f53 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,3 +1,5 @@
Expand All @@ -17,7 +17,7 @@ index b975d49..40a6b0b 100644

set(PROTOZERO_DATA_VIEW "" CACHE STRING "Type used for protozero::data_view")
if(NOT PROTOZERO_DATA_VIEW STREQUAL "")
@@ -68,11 +70,11 @@ if(CLANG_TIDY AND PROTOBUF_FOUND)
@@ -68,13 +70,15 @@ if(CLANG_TIDY AND PROTOBUF_FOUND)
add_custom_target(clang-tidy
${CLANG_TIDY}
-p ${CMAKE_BINARY_DIR}
Expand All @@ -32,9 +32,14 @@ index b975d49..40a6b0b 100644
+ ${CMAKE_CURRENT_LIST_DIR}/test/unit/*.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/tools/*.cpp
)
add_dependencies(clang-tidy writer_tests)
- add_dependencies(clang-tidy writer_tests)
+ if(BUILD_TESTING)
+ add_dependencies(clang-tidy writer_tests)
+ endif()
else()
@@ -94,12 +96,12 @@ if(CPPCHECK)
message(STATUS "Looking for clang-tidy - not found")
message(STATUS " Build target 'clang-tidy' will not be available.")
@@ -94,12 +98,12 @@ if(CPPCHECK)
add_custom_target(cppcheck
${CPPCHECK}
-Uassert --std=c++11 --enable=all
Expand Down

0 comments on commit 0e981b4

Please sign in to comment.