make FP formatting available to be used at compile-time (#2426)

* works only with FMT_HEADER_ONLY
* works only with float and double types (not long double)
This commit is contained in:
Alexey Ochapov
2021-09-18 08:03:23 -07:00
committed by GitHub
parent d9fd695ac7
commit b4d9d82e1d
6 changed files with 278 additions and 109 deletions
+5
View File
@@ -84,6 +84,11 @@ if (NOT (MSVC AND BUILD_SHARED_LIBS))
endif ()
add_fmt_test(ostream-test)
add_fmt_test(compile-test)
add_fmt_test(compile-fp-test HEADER_ONLY)
if (MSVC)
# Without this option, MSVC returns 199711L for the __cplusplus macro.
target_compile_options(compile-fp-test PRIVATE /Zc:__cplusplus)
endif()
add_fmt_test(printf-test)
add_fmt_test(ranges-test ranges-odr-test.cc)
add_fmt_test(scan-test)