diff --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake index 33dc2cc7ca74..421e1a16b700 100644 --- a/libc/cmake/modules/LLVMLibCTestRules.cmake +++ b/libc/cmake/modules/LLVMLibCTestRules.cmake @@ -111,14 +111,6 @@ function(add_libc_unittest target_name) set(msg "Skipping unittest ${fq_target_name} as it has missing deps: " "${skipped_entrypoints_list}.") message(STATUS ${msg}) - add_custom_target(${fq_target_name}) - - # A post build custom command is used to avoid running the command always. - add_custom_command( - TARGET ${fq_target_name} - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E echo ${msg} - ) return() endif() diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt index 44abc401da44..7475be150900 100644 --- a/libc/test/src/math/CMakeLists.txt +++ b/libc/test/src/math/CMakeLists.txt @@ -18,6 +18,9 @@ function(add_fp_unittest name) add_libc_unittest(${name} ${MATH_UNITTEST_UNPARSED_ARGUMENTS}) get_fq_target_name(${name} fq_target_name) + if (NOT TARGET ${fq_target_name}) + return() + endif() if(MATH_UNITTEST_NEED_MPFR) target_link_libraries(${fq_target_name} PRIVATE libcMPFRWrapper -lmpfr -lgmp) endif()