use standard llvm cmake formatting for targets defined in plugin tests

llvm-svn: 332709
This commit is contained in:
Nico Weber 2018-05-18 12:42:30 +00:00
parent 5ec03cdaa3
commit 718a42cfce
2 changed files with 15 additions and 5 deletions

View File

@ -9,10 +9,14 @@ if (LLVM_ENABLE_PLUGINS)
add_definitions(-DLLVM_ENABLE_PLUGINS)
endif()
add_llvm_unittest(PluginsTests PluginsTest.cpp)
add_llvm_unittest(PluginsTests
PluginsTest.cpp
)
export_executable_symbols(PluginsTests)
add_library(TestPlugin MODULE TestPlugin.cpp)
add_library(TestPlugin MODULE
TestPlugin.cpp
)
set_output_directory(TestPlugin
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}

View File

@ -3,15 +3,21 @@ set(LLVM_OPTIONAL_SOURCES ExportedFuncs.cpp PipSqueak.cpp)
set(LLVM_LINK_COMPONENTS Support)
add_library(DynamicLibraryLib STATIC ExportedFuncs.cpp)
add_library(DynamicLibraryLib STATIC
ExportedFuncs.cpp
)
set_target_properties(DynamicLibraryLib PROPERTIES FOLDER "Tests")
add_llvm_unittest(DynamicLibraryTests DynamicLibraryTest.cpp)
add_llvm_unittest(DynamicLibraryTests
DynamicLibraryTest.cpp
)
target_link_libraries(DynamicLibraryTests PRIVATE DynamicLibraryLib)
export_executable_symbols(DynamicLibraryTests)
function(dynlib_add_module NAME)
add_library(${NAME} MODULE PipSqueak.cpp)
add_library(${NAME} MODULE
PipSqueak.cpp
)
set_target_properties(${NAME} PROPERTIES FOLDER "Tests")
set_output_directory(${NAME}