mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
a5ef8dbacb
As far as I can tell from revision history, there's no good reason to call these files .so instead of .dll in Windows, so use the normal extension. Also change PipSquak from SHARED to MODULE -- it's never passed to target_link_libraries() and only loaded via dlopen(), so MODULE is more appropriate. This makes it possible to delete a workaround for SHARED ldflags being not quite right as well. No intended behavior change. https://reviews.llvm.org/D46898 llvm-svn: 332487
35 lines
1.1 KiB
CMake
35 lines
1.1 KiB
CMake
# Needed by LLVM's CMake checks because this file defines multiple targets.
|
|
set(LLVM_OPTIONAL_SOURCES TestPlugin.cpp)
|
|
|
|
set(LLVM_LINK_COMPONENTS Support Passes Core)
|
|
|
|
# If plugins are disabled, this test will disable itself at runtime. Otherwise,
|
|
# reconfiguring with plugins disabled will leave behind a stale executable.
|
|
if (LLVM_ENABLE_PLUGINS)
|
|
add_definitions(-DLLVM_ENABLE_PLUGINS)
|
|
endif()
|
|
|
|
add_llvm_unittest(PluginsTests PluginsTest.cpp)
|
|
export_executable_symbols(PluginsTests)
|
|
|
|
add_library(TestPlugin MODULE TestPlugin.cpp)
|
|
|
|
set_output_directory(TestPlugin
|
|
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
|
|
LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
|
|
)
|
|
|
|
set_target_properties(TestPlugin
|
|
PROPERTIES PREFIX ""
|
|
SUFFIX ${LTDL_SHLIB_EXT}
|
|
)
|
|
set_target_properties(TestPlugin PROPERTIES FOLDER "Tests")
|
|
|
|
if (WIN32 OR CYGWIN OR LLVM_EXPORT_SYMBOLS_FOR_PLUGINS)
|
|
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)
|