Skip to content

Commit 542fcf7

Browse files
authored
Merge pull request #111 from elfprince13/patch-1
Fix missing dependency error when BUILD_TESTING=OFF
2 parents f379578 + 4904953 commit 542fcf7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ if(CLANG_TIDY AND PROTOBUF_FOUND)
7474
${CMAKE_SOURCE_DIR}/test/unit/*.cpp
7575
${CMAKE_SOURCE_DIR}/tools/*.cpp
7676
)
77-
add_dependencies(clang-tidy writer_tests)
77+
if(BUILD_TESTING)
78+
add_dependencies(clang-tidy writer_tests)
79+
endif()
7880
else()
7981
message(STATUS "Looking for clang-tidy - not found")
8082
message(STATUS " Build target 'clang-tidy' will not be available.")

0 commit comments

Comments
 (0)