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)
60
60
fast_float_add_cpp_test (example_test )
61
61
fast_float_add_cpp_test (example_comma_test )
62
62
fast_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 )
64
64
if (FASTFLOAT_CONSTEXPR_TESTS )
65
65
target_compile_features (basictest PRIVATE cxx_std_20 )
66
66
target_compile_definitions (basictest PRIVATE FASTFLOAT_CONSTEXPR_TESTS )
Original file line number Diff line number Diff line change 13
13
#include < type_traits>
14
14
#include < cfenv>
15
15
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
+
16
22
#if FASTFLOAT_HAS_BIT_CAST
17
23
#include < bit>
18
24
#endif
@@ -74,6 +80,10 @@ const char * round_name(int d) {
74
80
75
81
TEST_CASE (" system_info" ) {
76
82
std::cout << " system info:" << std::endl;
83
+ #ifdef FASTFLOAT_CONSTEXPR_TESTS
84
+ SHOW_DEFINE (FASTFLOAT_CONSTEXPR_TESTS);
85
+
86
+ #endif
77
87
#ifdef _MSC_VER
78
88
SHOW_DEFINE (_MSC_VER);
79
89
#endif
You can’t perform that action at this time.
0 commit comments