From 2f40f935e7979b2786aefcbac10cfb3a5e97d261 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Fri, 19 Apr 2024 19:05:31 +0000 Subject: [PATCH] Make conditional --- unittests/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index 6100f7346..b72d902f2 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -12,7 +12,11 @@ endif() # Produces a binary named 'basename(test_dirname)'. function(add_clad_unittest test_dirname) - add_unittest(CladUnitTests ${test_dirname} ${ARGN}) + if (LLVM_LINK_LLVM_DYLIB) + set(no_libllvm_so DISABLE_LLVM_LINK_LLVM_DYLIB) + endif(LLVM_LINK_LLVM_DYLIB) + + add_unittest(CladUnitTests ${test_dirname} ${ARGN} ${no_libllvm_so}) # Remove the llvm_gtest_* coming from add_unittest. get_target_property(GTEST_LINKED_LIBS ${test_dirname} LINK_LIBRARIES)