265 changes: 150 additions & 115 deletions libc/src/math/generic/CMakeLists.txt

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions libc/src/stdio/printf_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ add_header_library(
core_structs.h
DEPENDS
libc.src.__support.CPP.string_view
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
)

add_object_library(
Expand Down Expand Up @@ -65,7 +65,8 @@ add_object_library(
libc.src.__support.CPP.limits
libc.src.__support.CPP.span
libc.src.__support.CPP.string_view
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.integer_to_string
)

Expand Down
14 changes: 7 additions & 7 deletions libc/test/src/fenv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ add_libc_unittest(
libc.src.fenv.feclearexcept
libc.src.fenv.feraiseexcept
libc.src.fenv.fetestexcept
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fenv_impl
)

add_libc_unittest(
Expand All @@ -35,7 +35,7 @@ add_libc_unittest(
libc.src.fenv.fegetround
libc.src.fenv.fesetenv
libc.src.fenv.fesetround
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fenv_impl
)

add_libc_unittest(
Expand All @@ -47,7 +47,7 @@ add_libc_unittest(
DEPENDS
libc.src.fenv.fegetexceptflag
libc.src.fenv.fesetexceptflag
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fenv_impl
)

add_libc_unittest(
Expand All @@ -59,7 +59,7 @@ add_libc_unittest(
DEPENDS
libc.include.signal
libc.src.fenv.feupdateenv
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fenv_impl
)

add_libc_unittest(
Expand All @@ -70,7 +70,7 @@ add_libc_unittest(
feclearexcept_test.cpp
DEPENDS
libc.src.fenv.feclearexcept
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fenv_impl
)

add_libc_unittest(
Expand Down Expand Up @@ -103,7 +103,7 @@ if (NOT (LLVM_USE_SANITIZER OR (${LIBC_TARGET_OS} STREQUAL "windows")
libc.src.fenv.feclearexcept
libc.src.fenv.feraiseexcept
libc.src.fenv.fetestexcept
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fenv_impl
)

add_fp_unittest(
Expand All @@ -115,6 +115,6 @@ if (NOT (LLVM_USE_SANITIZER OR (${LIBC_TARGET_OS} STREQUAL "windows")
DEPENDS
libc.include.fenv
libc.src.fenv.feholdexcept
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fenv_impl
)
endif()
245 changes: 148 additions & 97 deletions libc/test/src/math/CMakeLists.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libc/test/src/math/differential_testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function(add_diff_binary target_name)

add_dependencies(
${fq_target_name}
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
${fq_deps_list}
)
endfunction()
Expand Down
38 changes: 19 additions & 19 deletions libc/test/src/math/exhaustive/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ add_fp_unittest(
DEPENDS
libc.include.math
libc.src.math.sqrtf
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
)

add_fp_unittest(
Expand All @@ -33,7 +33,7 @@ add_fp_unittest(
.exhaustive_test
libc.include.math
libc.src.math.sinf
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
LINK_LIBRARIES
-lpthread
)
Expand All @@ -50,7 +50,7 @@ add_fp_unittest(
.exhaustive_test
libc.include.math
libc.src.math.cosf
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
LINK_LIBRARIES
-lpthread
)
Expand All @@ -67,7 +67,7 @@ add_fp_unittest(
.exhaustive_test
libc.include.math
libc.src.math.sincosf
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
LINK_LIBRARIES
-lpthread
)
Expand All @@ -84,7 +84,7 @@ add_fp_unittest(
.exhaustive_test
libc.include.math
libc.src.math.tanf
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
LINK_LIBRARIES
-lpthread
)
Expand All @@ -101,7 +101,7 @@ add_fp_unittest(
.exhaustive_test
libc.include.math
libc.src.math.expf
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
LINK_LIBRARIES
-lpthread
)
Expand All @@ -118,7 +118,7 @@ add_fp_unittest(
.exhaustive_test
libc.include.math
libc.src.math.exp2f
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
LINK_LIBRARIES
-lpthread
)
Expand All @@ -135,7 +135,7 @@ add_fp_unittest(
.exhaustive_test
libc.include.math
libc.src.math.expm1f
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
LINK_LIBRARIES
-lpthread
)
Expand All @@ -152,7 +152,7 @@ add_fp_unittest(
.exhaustive_test
libc.include.math
libc.src.math.logf
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
LINK_LIBRARIES
-lpthread
)
Expand All @@ -169,7 +169,7 @@ add_fp_unittest(
.exhaustive_test
libc.include.math
libc.src.math.log10f
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
LINK_LIBRARIES
-lpthread
)
Expand All @@ -186,7 +186,7 @@ add_fp_unittest(
.exhaustive_test
libc.include.math
libc.src.math.log1pf
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
LINK_LIBRARIES
-lpthread
)
Expand All @@ -203,7 +203,7 @@ add_fp_unittest(
.exhaustive_test
libc.include.math
libc.src.math.log2f
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
LINK_LIBRARIES
-lpthread
)
Expand All @@ -222,7 +222,7 @@ add_fp_unittest(
.exhaustive_test
libc.include.math
libc.src.math.hypotf
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
LINK_LIBRARIES
-lpthread
)
Expand All @@ -236,7 +236,7 @@ add_fp_unittest(
SRCS
fmod_generic_impl_test.cpp
DEPENDS
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.generic.fmod
)

Expand All @@ -252,7 +252,7 @@ add_fp_unittest(
.exhaustive_test
libc.include.math
libc.src.math.coshf
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
LINK_LIBRARIES
-lpthread
)
Expand All @@ -269,7 +269,7 @@ add_fp_unittest(
.exhaustive_test
libc.include.math
libc.src.math.sinhf
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
LINK_LIBRARIES
-lpthread
)
Expand All @@ -286,7 +286,7 @@ add_fp_unittest(
.exhaustive_test
libc.include.math
libc.src.math.tanhf
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
LINK_LIBRARIES
-lpthread
)
Expand All @@ -303,7 +303,7 @@ add_fp_unittest(
.exhaustive_test
libc.include.math
libc.src.math.atanhf
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
LINK_LIBRARIES
-lpthread
)
Expand All @@ -320,7 +320,7 @@ add_fp_unittest(
.exhaustive_test
libc.include.math
libc.src.math.atanf
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
LINK_LIBRARIES
-lpthread
)
Expand Down
3 changes: 0 additions & 3 deletions libc/test/src/math/generic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ add_fp_unittest(
DEPENDS
libc.include.math
libc.src.math.generic.ceil
libc.src.__support.FPUtil.fputil
)

add_fp_unittest(
Expand All @@ -21,7 +20,6 @@ add_fp_unittest(
DEPENDS
libc.include.math
libc.src.math.generic.ceilf
libc.src.__support.FPUtil.fputil
)

add_fp_unittest(
Expand All @@ -34,6 +32,5 @@ add_fp_unittest(
DEPENDS
libc.include.math
libc.src.math.generic.ceill
libc.src.__support.FPUtil.fputil
)

3 changes: 2 additions & 1 deletion libc/test/src/stdio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ add_libc_unittest(
sprintf_test.cpp
DEPENDS
libc.src.stdio.sprintf
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.platform_defs
)

add_libc_unittest(
Expand Down Expand Up @@ -107,7 +109,6 @@ add_libc_unittest(
DEPENDS
libc.src.stdio.printf
libc.src.fenv.fesetround
libc.src.__support.FPUtil.fputil
)

add_subdirectory(printf_core)
Expand Down
2 changes: 1 addition & 1 deletion libc/test/utils/FPUtil/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ if((${LIBC_TARGET_OS} STREQUAL "linux") AND (${LIBC_TARGET_ARCHITECTURE_IS_X86})
x86_long_double_test.cpp
DEPENDS
libc.include.math
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
)
endif()
3 changes: 2 additions & 1 deletion libc/utils/MPFRWrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ if(LIBC_TESTS_CAN_USE_MPFR)
libcMPFRWrapper
libc.src.__support.CPP.string_view
libc.src.__support.CPP.type_traits
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.platform_defs
LibcUnitTest
libc_test_utils
)
Expand Down
5 changes: 3 additions & 2 deletions libc/utils/UnitTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ add_dependencies(
LibcFPTestHelpers
LibcUnitTest
libc.utils.UnitTest.string_utils
libc.src.__support.FPUtil.fputil
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.fenv_impl
)

add_library(
Expand All @@ -64,7 +65,7 @@ target_link_libraries(LibcPrintfHelpers LibcUnitTest)
add_dependencies(
LibcPrintfHelpers
LibcUnitTest
libc.src.__support.FPUtil.fputil #FPBits
libc.src.__support.FPUtil.fp_bits
libc.src.stdio.printf_core.core_structs
libc.utils.UnitTest.string_utils
)