forked from OSchip/llvm-project
Another fix for r329293: Unbreak the windows bots
Only build the unittest if plugins are enabled. Link components into the TestPlugin on windows and cygwin. llvm-svn: 329318
This commit is contained in:
parent
4e150c4c88
commit
802ee317e6
|
@ -1,19 +1,26 @@
|
||||||
set(LLVM_LINK_COMPONENTS Support Passes Core)
|
set(LLVM_LINK_COMPONENTS Support Passes Core)
|
||||||
|
|
||||||
add_llvm_unittest(PluginsTests PluginsTest.cpp)
|
if (LLVM_ENABLE_PLUGINS)
|
||||||
export_executable_symbols(PluginsTests)
|
add_llvm_unittest(PluginsTests PluginsTest.cpp)
|
||||||
|
export_executable_symbols(PluginsTests)
|
||||||
|
|
||||||
add_library(TestPlugin MODULE TestPlugin.cxx)
|
add_library(TestPlugin MODULE TestPlugin.cxx)
|
||||||
|
|
||||||
set_output_directory(TestPlugin
|
set_output_directory(TestPlugin
|
||||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
|
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
|
||||||
LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
|
LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(TestPlugin
|
set_target_properties(TestPlugin
|
||||||
PROPERTIES PREFIX ""
|
PROPERTIES PREFIX ""
|
||||||
SUFFIX ".so"
|
SUFFIX ".so"
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(TestPlugin intrinsics_gen)
|
if (WIN32 OR CYGWIN)
|
||||||
add_dependencies(PluginsTests TestPlugin)
|
llvm_map_components_to_libnames(LLVM_DEPS ${LLVM_LINK_COMPONENTS})
|
||||||
|
target_link_libraries(TestPlugin ${LLVM_DEPS})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_dependencies(TestPlugin intrinsics_gen)
|
||||||
|
add_dependencies(PluginsTests TestPlugin)
|
||||||
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue