File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ fast_float_add_cpp_test(rcppfastfloat_test)
6060fast_float_add_cpp_test(example_test)
6161fast_float_add_cpp_test(example_comma_test)
6262fast_float_add_cpp_test(basictest)
63- option (FASTFLOAT_CONSTEXPR_TESTS "Constexpr tests" OFF )
63+ option (FASTFLOAT_CONSTEXPR_TESTS "Require constexpr tests (build will fail if the compiler won't support it) " OFF )
6464if (FASTFLOAT_CONSTEXPR_TESTS)
6565 target_compile_features (basictest PRIVATE cxx_std_20)
6666 target_compile_definitions (basictest PRIVATE FASTFLOAT_CONSTEXPR_TESTS)
Original file line number Diff line number Diff line change 1313#include < type_traits>
1414#include < cfenv>
1515
16+ #if FASTFLOAT_IS_CONSTEXPR
17+ #ifndef FASTFLOAT_CONSTEXPR_TESTS
18+ #define FASTFLOAT_CONSTEXPR_TESTS 1
19+ #endif // #ifndef FASTFLOAT_CONSTEXPR_TESTS
20+ #endif // FASTFLOAT_IS_CONSTEXPR
21+
1622#if FASTFLOAT_HAS_BIT_CAST
1723#include < bit>
1824#endif
@@ -74,6 +80,10 @@ const char * round_name(int d) {
7480
7581TEST_CASE (" system_info" ) {
7682 std::cout << " system info:" << std::endl;
83+ #ifdef FASTFLOAT_CONSTEXPR_TESTS
84+ SHOW_DEFINE (FASTFLOAT_CONSTEXPR_TESTS);
85+
86+ #endif
7787#ifdef _MSC_VER
7888 SHOW_DEFINE (_MSC_VER);
7989#endif
You can’t perform that action at this time.
0 commit comments