The PrintfMatcher depends on printf which is in stdio. Stdio is currently fullbuild only, but the matcher wasn't, causing failing builds when fullbuild was off. This patch adds the fullbuild condition to the PrintfMatcher cmake. Differential Revision: https://reviews.llvm.org/D124304
77 lines
1.8 KiB
CMake
77 lines
1.8 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_header_library(
|
|
string_utils
|
|
HDRS
|
|
StringUtils.h
|
|
DEPENDS
|
|
libc.src.__support.CPP.type_traits
|
|
)
|
|
|
|
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.utils.UnitTest.string_utils
|
|
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
|
|
)
|
|
|
|
if(NOT LLVM_LIBC_FULL_BUILD) # TODO(michaelrj): make a more permanant solution.
|
|
return()
|
|
endif()
|
|
|
|
#currently stdio is fullbuild only, so this matcher that depends on a piece of
|
|
#printf also has to be fullbuild only.
|
|
|
|
add_library(
|
|
LibcPrintfHelpers
|
|
PrintfMatcher.h
|
|
PrintfMatcher.cpp
|
|
)
|
|
target_include_directories(LibcPrintfHelpers PUBLIC ${LIBC_SOURCE_DIR})
|
|
target_link_libraries(LibcPrintfHelpers LibcUnitTest)
|
|
add_dependencies(
|
|
LibcPrintfHelpers
|
|
LibcUnitTest
|
|
libc.utils.UnitTest.string_utils
|
|
libc.src.stdio.printf_core.core_structs
|
|
)
|