[cmake] Fix a unittest when `LLVM_LINK_LLVM_DYLIB` is requested.

llvm-svn: 342150
This commit is contained in:
Richard Diamond 2018-09-13 16:39:52 +00:00
parent 37e464876b
commit 939468d4b2
1 changed files with 6 additions and 4 deletions

View File

@ -10,12 +10,17 @@ endif()
set(LLVM_LINK_COMPONENTS Support Passes Core)
add_llvm_unittest(PluginsTests
PluginsTest.cpp
DEPENDS
TestPlugin
)
export_executable_symbols(PluginsTests)
set(LLVM_LINK_COMPONENTS)
add_llvm_loadable_module(TestPlugin
TestPlugin.cpp
DEPENDS
intrinsics_gen
)
# Put plugin next to the unit test executable.
@ -24,6 +29,3 @@ set_output_directory(TestPlugin
LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
)
set_target_properties(TestPlugin PROPERTIES FOLDER "Tests")
add_dependencies(TestPlugin intrinsics_gen)
add_dependencies(PluginsTests TestPlugin)