forked from OSchip/llvm-project
[Polly] Don't redundantly link libPolly into unittests.
With LLVM_LINK_LLVM_DYLIB and LLVM_POLLY_LINK_INTO_TOOLS, Polly is already linked into libLLVM.so, linking libPolly.a as well into unittests results in duplicate command line registration errors.
This commit is contained in:
parent
039b469b85
commit
cdbc86dd22
|
@ -16,7 +16,13 @@ function(add_polly_unittest test_name)
|
|||
|
||||
set_property(TARGET ${test_name} PROPERTY FOLDER "Polly")
|
||||
endif()
|
||||
target_link_libraries(${test_name} PRIVATE Polly)
|
||||
|
||||
if(LLVM_LINK_LLVM_DYLIB AND LLVM_POLLY_LINK_INTO_TOOLS)
|
||||
# In this case Polly is already present in libLLVM,
|
||||
# no need to link it again.
|
||||
else()
|
||||
target_link_libraries(${test_name} PRIVATE Polly)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
add_subdirectory(Isl)
|
||||
|
|
Loading…
Reference in New Issue