xref: /llvm-project/llvm/unittests/Passes/Plugins/CMakeLists.txt (revision 2e18f636fd39b59a85194c2a8f10732138a0f8ec)
1# The plugin expects to not link against the Support and Core libraries,
2# but expects them to exist in the process loading the plugin. This doesn't
3# work with DLLs on Windows (where a shared library can't have undefined
4# references), so just skip this testcase on Windows.
5if (NOT WIN32 AND NOT CYGWIN)
6  set(LLVM_LINK_COMPONENTS Support Passes Core AsmParser)
7  add_llvm_unittest(PluginsTests
8    PluginsTest.cpp
9
10    EXPORT_SYMBOLS
11    )
12  target_link_libraries(PluginsTests PRIVATE LLVMTestingSupport)
13
14  unset(LLVM_LINK_COMPONENTS)
15  add_subdirectory(TestPlugin)
16  add_subdirectory(DoublerPlugin)
17endif()
18