Skip to content

Commit 0fee277

Browse files
committed
Exclude Catch2 from clang-tidy
1 parent 96f5cae commit 0fee277

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

cmake/dependencies/catch.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ function(find_catch2)
2626
POSITION_INDEPENDENT_CODE ON
2727
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "$<TARGET_PROPERTY:Catch2,INTERFACE_INCLUDE_DIRECTORIES>"
2828
)
29+
if(CMAKE_CXX_CLANG_TIDY)
30+
set_target_properties(Catch2 PROPERTIES CXX_CLANG_TIDY "")
31+
endif()
2932
elseif(openPMD_USE_INTERNAL_CATCH AND (openPMD_catch_tar OR openPMD_catch_branch))
3033
include(FetchContent)
3134
if(openPMD_catch_tar)
@@ -47,7 +50,9 @@ function(find_catch2)
4750
POSITION_INDEPENDENT_CODE ON
4851
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "$<TARGET_PROPERTY:Catch2,INTERFACE_INCLUDE_DIRECTORIES>"
4952
)
50-
53+
if(CMAKE_CXX_CLANG_TIDY)
54+
set_target_properties(Catch2 PROPERTIES CXX_CLANG_TIDY "")
55+
endif()
5156
# advanced fetch options
5257
mark_as_advanced(FETCHCONTENT_BASE_DIR)
5358
mark_as_advanced(FETCHCONTENT_FULLY_DISCONNECTED)

0 commit comments

Comments
 (0)