mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-27 15:41:46 +00:00
a52aea0ba6
This cleans up several CMakeLists.txt's where -Wno-suggest-override was manually specified. These test targets now inherit this flag from the gtest target. Some unittests CMakeLists.txt's, in particular Flang and LLDB, are not touched by this patch. Flang manually adds the gtest sources itself in some configurations, rather than linking to LLVM's gtest target, so this fix would be insufficient to cover those cases. Similarly, LLDB has subdirectories that manually add the gtest headers to their include path without linking to the gtest target, so those subdirectories still need -Wno-suggest-override to be manually specified to compile without warnings. Differential Revision: https://reviews.llvm.org/D84554
17 lines
538 B
CMake
17 lines
538 B
CMake
add_custom_target(LLDUnitTests)
|
|
set_target_properties(LLDUnitTests PROPERTIES FOLDER "lld tests")
|
|
|
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH OFF)
|
|
|
|
# add_lld_unittest(test_dirname file1.cpp file2.cpp)
|
|
#
|
|
# Will compile the list of files together and link against lld
|
|
# Produces a binary named 'basename(test_dirname)'.
|
|
function(add_lld_unittest test_dirname)
|
|
add_unittest(LLDUnitTests ${test_dirname} ${ARGN})
|
|
target_link_libraries(${test_dirname} ${LLVM_COMMON_LIBS})
|
|
endfunction()
|
|
|
|
add_subdirectory(DriverTests)
|
|
add_subdirectory(MachOTests)
|