if (BUILD_UTILS)
  if (LIB_MPFR)
    add_executable(mkrpitab mkrpitab.cpp)
    target_link_libraries(mkrpitab ${LIB_MPFR})
  endif()

  add_executable(genmathcoef genmathcoef.cpp)
endif()

add_library(donothing OBJECT donothing.cpp)
set_property(TARGET donothing PROPERTY INTERPROCEDURAL_OPTIMIZATION FALSE)

if (BUILD_BENCH)
  add_executable(bench_tlfloat_quad bench.cpp)
  target_compile_options(bench_tlfloat_quad PRIVATE ${INLINE_CXX_FLAGS})
  target_compile_definitions(bench_tlfloat_quad PRIVATE TLFLOAT_ENABLE_INLINING=1 CONFIG_TLFLOAT_QUAD=1)
  target_link_libraries(bench_tlfloat_quad donothing)

  add_executable(bench_tlfloat_octuple bench.cpp)
  target_compile_options(bench_tlfloat_octuple PRIVATE ${INLINE_CXX_FLAGS})
  target_compile_definitions(bench_tlfloat_octuple PRIVATE TLFLOAT_ENABLE_INLINING=1 CONFIG_TLFLOAT_OCTUPLE=1)
  target_link_libraries(bench_tlfloat_octuple donothing)

  if (NOT TLFLOAT_COMPILER_SUPPORTS_FLOAT128)
    add_executable(bench_tlfloat_quad_capi bench.cpp)
    target_compile_options(bench_tlfloat_quad_capi PRIVATE ${INLINE_CXX_FLAGS})
    target_compile_definitions(bench_tlfloat_quad_capi PRIVATE TLFLOAT_ENABLE_INLINING=1 CONFIG_TLFLOAT_QUAD_CAPI=1)
    target_link_libraries(bench_tlfloat_quad_capi tlfloat donothing)
  endif()

  add_executable(bench_tlfloat_octuple_capi bench.cpp)
  target_compile_options(bench_tlfloat_octuple_capi PRIVATE ${INLINE_CXX_FLAGS})
  target_compile_definitions(bench_tlfloat_octuple_capi PRIVATE TLFLOAT_ENABLE_INLINING=1 CONFIG_TLFLOAT_OCTUPLE_CAPI=1)
  target_link_libraries(bench_tlfloat_octuple_capi tlfloat donothing)

  if (TLFLOAT_ENABLE_LIBQUADMATH)
    add_executable(bench_libquadmath bench.cpp)
    target_link_libraries(bench_libquadmath quadmath donothing)
    target_compile_options(bench_libquadmath PRIVATE ${INLINE_CXX_FLAGS})
    target_compile_definitions(bench_libquadmath PRIVATE TLFLOAT_ENABLE_INLINING=1 CONFIG_LIBQUADMATH=1)
  endif()

  if (TLFLOAT_LONGDOUBLE_IS_FLOAT128)
    add_executable(bench_longdouble bench.cpp)
    target_compile_options(bench_longdouble PRIVATE ${INLINE_CXX_FLAGS})
    target_compile_definitions(bench_longdouble PRIVATE TLFLOAT_ENABLE_INLINING=1 CONFIG_LONGDOUBLE=1)
    target_link_libraries(bench_longdouble donothing)
  endif()
endif()
