Index: polly/unittests/ScopPassManager/CMakeLists.txt =================================================================== --- polly/unittests/ScopPassManager/CMakeLists.txt +++ polly/unittests/ScopPassManager/CMakeLists.txt @@ -1,5 +1,9 @@ -llvm_map_components_to_libnames(llvm_libs Passes Core Analysis) add_polly_unittest(ScopPassManagerTests PassManagerTest.cpp ) -target_link_libraries(ScopPassManagerTests PRIVATE ${llvm_libs}) +if (TARGET LLVM) + target_link_libraries(ScopPassManagerTests PRIVATE LLVM) +else() + llvm_map_components_to_libnames(llvm_libs Passes Core Analysis) + target_link_libraries(ScopPassManagerTests PRIVATE ${llvm_libs}) +endif()