mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-07 08:34:59 +00:00
Improves CMakeLists.txt for Clang's unit tests: make "linked
components" and "used libs" arguments of add_clang_unittest(). Reviewed by jyasskin and chapuni. llvm-svn: 125652
This commit is contained in:
parent
e5ca1e0506
commit
f8a620f8e1
@ -1,4 +1,8 @@
|
||||
function(add_clang_unittest test_dirname)
|
||||
function(add_clang_unittest test_dirname link_components used_libs)
|
||||
separate_arguments(link_components)
|
||||
set(LLVM_LINK_COMPONENTS ${link_components})
|
||||
separate_arguments(used_libs)
|
||||
set(LLVM_USED_LIBS ${used_libs})
|
||||
string(REGEX MATCH "([^/]+)$" test_name ${test_dirname})
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
|
||||
@ -32,16 +36,8 @@ if(SUPPORTS_NO_VARIADIC_MACROS_FLAG)
|
||||
add_definitions("-Wno-variadic-macros")
|
||||
endif()
|
||||
|
||||
set(LLVM_LINK_COMPONENTS
|
||||
Core
|
||||
)
|
||||
|
||||
set(LLVM_USED_LIBS
|
||||
gtest
|
||||
gtest_main
|
||||
clangFrontend
|
||||
)
|
||||
|
||||
add_clang_unittest(Frontend
|
||||
"Core"
|
||||
"gtest gtest_main clangFrontend"
|
||||
Frontend/FrontendActionTest.cpp
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user