[libc][NFC] Skip adding dummy targets for skipped unit tests.

This commit is contained in:
Siva Chandra 2020-12-14 17:51:13 -08:00
parent fc0f4010bb
commit b1067a9b3c
2 changed files with 3 additions and 8 deletions

View File

@ -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()

View File

@ -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()