Previously, the entire support/CPP folder was in one header library, which meant that a lot of headers were included where they shouldn't be. This patch splits each header into its own target, as well as adjusting each place they were included to only include what is used. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D121237
47 lines
1.1 KiB
CMake
47 lines
1.1 KiB
CMake
add_library(
|
|
LibcUnitTest
|
|
Test.h
|
|
LibcTest.cpp
|
|
LibcTest.h
|
|
)
|
|
target_include_directories(LibcUnitTest PUBLIC ${LIBC_SOURCE_DIR})
|
|
add_dependencies(LibcUnitTest libc.src.__support.CPP.type_traits)
|
|
target_link_libraries(LibcUnitTest PUBLIC libc_test_utils)
|
|
|
|
add_library(
|
|
LibcUnitTestMain
|
|
LibcTestMain.cpp
|
|
)
|
|
|
|
target_include_directories(LibcUnitTestMain PUBLIC ${LIBC_SOURCE_DIR})
|
|
add_dependencies(LibcUnitTestMain LibcUnitTest)
|
|
target_link_libraries(LibcUnitTestMain PUBLIC LibcUnitTest libc_test_utils)
|
|
|
|
add_library(
|
|
LibcFPTestHelpers
|
|
FPExceptMatcher.cpp
|
|
FPExceptMatcher.h
|
|
FPMatcher.cpp
|
|
FPMatcher.h
|
|
)
|
|
target_include_directories(LibcFPTestHelpers PUBLIC ${LIBC_SOURCE_DIR})
|
|
target_link_libraries(LibcFPTestHelpers LibcUnitTest)
|
|
add_dependencies(
|
|
LibcFPTestHelpers
|
|
LibcUnitTest
|
|
libc.src.__support.FPUtil.fputil
|
|
)
|
|
|
|
add_library(
|
|
LibcMemoryHelpers
|
|
MemoryMatcher.h
|
|
MemoryMatcher.cpp
|
|
)
|
|
target_include_directories(LibcMemoryHelpers PUBLIC ${LIBC_SOURCE_DIR})
|
|
target_link_libraries(LibcMemoryHelpers LibcUnitTest)
|
|
add_dependencies(
|
|
LibcMemoryHelpers
|
|
LibcUnitTest
|
|
libc.src.__support.CPP.array_ref
|
|
)
|