diff --git a/tools/clang-tidy-plugin/CMakeLists.txt b/tools/clang-tidy-plugin/CMakeLists.txt index 46f3021206537..4d5f5e35fb1f7 100644 --- a/tools/clang-tidy-plugin/CMakeLists.txt +++ b/tools/clang-tidy-plugin/CMakeLists.txt @@ -55,7 +55,9 @@ if (CATA_CLANG_TIDY_EXECUTABLE) else () set(CataAnalyzerName CataAnalyzerPlugin) add_library(${CataAnalyzerName} MODULE ${CataAnalyzerSrc}) - target_link_libraries(${CataAnalyzerName} PRIVATE clangTidy) + if ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") + target_link_options(${CataAnalyzerName} PRIVATE -undefined dynamic_lookup) + endif () endif () target_include_directories(${CataAnalyzerName} SYSTEM PRIVATE