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)