7 # A convenience target to build all differential tests.
8 add_custom_target(libc-math-differential-tests)
10 function(add_diff_binary target_name)
11 cmake_parse_arguments(
13 "" # No optional arguments
14 "SUITE;CXX_STANDARD" # Single value arguments
15 "SRCS;HDRS;DEPENDS;COMPILE_OPTIONS" # Multi-value arguments
19 message(FATAL_ERROR "'add_diff_binary' target requires a SRCS list of .cpp "
23 message(FATAL_ERROR "'add_diff_binary' target requires a DEPENDS list of "
24 "'add_entrypoint_object' targets.")
27 get_fq_target_name(${target_name} fq_target_name)
28 get_fq_deps_list(fq_deps_list ${DIFF_DEPENDS})
29 get_object_files_for_test(
30 link_object_files skipped_entrypoints_list ${fq_deps_list})
31 if(skipped_entrypoints_list)
32 if(LIBC_CMAKE_VERBOSE_LOGGING)
33 set(msg "Will not build ${fq_target_name} as it has missing deps: "
34 "${skipped_entrypoints_list}.")
35 message(STATUS ${msg})
46 target_include_directories(
51 if(DIFF_COMPILE_OPTIONS)
52 target_compile_options(
54 PRIVATE ${DIFF_COMPILE_OPTIONS}
58 target_link_libraries(
60 PRIVATE ${link_object_files} libc_diff_test_utils)
62 set_target_properties(${fq_target_name}
63 PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
66 set_target_properties(
69 CXX_STANDARD ${DIFF_CXX_STANDARD}
75 libc.src.__support.FPUtil.fp_bits
78 add_dependencies(libc-math-differential-tests ${fq_target_name})
82 single_input_single_output_diff
84 SingleInputSingleOutputDiff.h
88 binary_op_single_output_diff
90 BinaryOpSingleOutputDiff.h
98 .single_input_single_output_diff
107 .single_input_single_output_diff
118 .single_input_single_output_diff
127 .single_input_single_output_diff
138 .single_input_single_output_diff
147 .single_input_single_output_diff
158 .single_input_single_output_diff
167 .single_input_single_output_diff
178 .single_input_single_output_diff
187 .single_input_single_output_diff
198 .single_input_single_output_diff
207 .single_input_single_output_diff
218 .single_input_single_output_diff
227 .single_input_single_output_diff
238 .single_input_single_output_diff
247 .single_input_single_output_diff
258 .single_input_single_output_diff
269 .single_input_single_output_diff
280 .single_input_single_output_diff
291 .single_input_single_output_diff
302 .single_input_single_output_diff
313 .single_input_single_output_diff
324 .single_input_single_output_diff
333 .single_input_single_output_diff
344 .single_input_single_output_diff
345 libc.src.math.nearbyintf
353 .single_input_single_output_diff
354 libc.src.math.nearbyintf
364 .single_input_single_output_diff
373 .single_input_single_output_diff
384 .single_input_single_output_diff
393 .single_input_single_output_diff
404 .single_input_single_output_diff
413 .single_input_single_output_diff
424 .single_input_single_output_diff
433 .single_input_single_output_diff
444 .binary_op_single_output_diff
455 .binary_op_single_output_diff
466 .binary_op_single_output_diff
477 .binary_op_single_output_diff
488 .single_input_single_output_diff
497 .single_input_single_output_diff
508 .single_input_single_output_diff
517 .single_input_single_output_diff