summaryrefslogtreecommitdiff
path: root/unittests/Support/DynamicLibrary/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Support/DynamicLibrary/CMakeLists.txt')
-rw-r--r--unittests/Support/DynamicLibrary/CMakeLists.txt25
1 files changed, 15 insertions, 10 deletions
diff --git a/unittests/Support/DynamicLibrary/CMakeLists.txt b/unittests/Support/DynamicLibrary/CMakeLists.txt
index f0e945e78b182..2fa4bf237d409 100644
--- a/unittests/Support/DynamicLibrary/CMakeLists.txt
+++ b/unittests/Support/DynamicLibrary/CMakeLists.txt
@@ -4,16 +4,21 @@ add_llvm_unittest(DynamicLibraryTests DynamicLibraryTest.cpp)
export_executable_symbols(DynamicLibraryTests)
-add_library(PipSqueak SHARED PipSqueak.cxx)
+function(dynlib_add_module NAME)
+ add_library(${NAME} SHARED PipSqueak.cxx)
-set_output_directory(PipSqueak
- BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
- LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
- )
+ set_output_directory(${NAME}
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+ LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+ )
-set_target_properties(PipSqueak
- PROPERTIES PREFIX ""
- SUFFIX ".so"
- )
+ set_target_properties(${NAME}
+ PROPERTIES PREFIX ""
+ SUFFIX ".so"
+ )
-add_dependencies(DynamicLibraryTests PipSqueak)
+ add_dependencies(DynamicLibraryTests ${NAME})
+endfunction(dynlib_add_module)
+
+dynlib_add_module(PipSqueak)
+dynlib_add_module(SecondLib)