File tree 5 files changed +21
-14
lines changed
5 files changed +21
-14
lines changed Original file line number Diff line number Diff line change 13
13
runs-on : ubuntu-latest
14
14
steps :
15
15
- uses : actions/checkout@v4
16
- - uses : uraimo/run-on-arch-action@v2
16
+ - uses : uraimo/run-on-arch-action@v3
17
17
name : Test
18
18
id : runcmd
19
19
with :
Original file line number Diff line number Diff line change 9
9
- uses : actions/checkout@v4
10
10
- name : Use cmake
11
11
run : |
12
- mkdir build &&
13
- cd build &&
14
- CXXFLAGS=-Werror cmake -DFASTFLOAT_TEST=ON -D FASTFLOAT_BENCHMARKS=ON .. &&
15
- cmake --build . &&
16
- ctest --output-on-failure
12
+ set -xe
13
+ cmake -B build \
14
+ -DFASTFLOAT_TEST=ON \
15
+ -DFASTFLOAT_BENCHMARKS=ON \
16
+ -DCMAKE_CXX_FLAGS=' -Werror -Wundef '
17
+ cmake --build build --parallel
18
+ ( cd build ; ctest --output-on-failure )
17
19
- name : Use cmake CXX23
18
20
run : |
19
- mkdir build20 &&
20
- cd build20 &&
21
- CXXFLAGS=-Werror cmake -DFASTFLOAT_CONSTEXPR_TESTS=ON -DFASTFLOAT_FIXEDWIDTH_TESTS=ON -DFASTFLOAT_CXX_STANDARD=23 -DFASTFLOAT_TEST=ON .. &&
22
- cmake --build . &&
23
- ctest --output-on-failure
21
+ set -xe
22
+ cmake -B build20 \
23
+ -DFASTFLOAT_TEST=ON \
24
+ -DFASTFLOAT_CONSTEXPR_TESTS=ON \
25
+ -DFASTFLOAT_FIXEDWIDTH_TESTS=ON \
26
+ -DFASTFLOAT_CXX_STANDARD=23 \
27
+ -DCMAKE_CXX_FLAGS=' -Werror -Wundef '
28
+ cmake --build build20 --parallel
29
+ ( cd build20 ; ctest --output-on-failure )
Original file line number Diff line number Diff line change 17
17
#include < libgen.h>
18
18
#endif
19
19
20
- #if __APPLE__ && __aarch64__
20
+ #if (defined( __APPLE__) && __APPLE__) && (defined( __aarch64__) && __aarch64__)
21
21
#include " apple_arm_events.h"
22
22
#endif
23
23
Original file line number Diff line number Diff line change 8
8
#endif
9
9
10
10
// Testing for https://wg21.link/N3652, adopted in C++14
11
- #if __cpp_constexpr >= 201304
11
+ #if defined(__cpp_constexpr) && __cpp_constexpr >= 201304
12
12
#define FASTFLOAT_CONSTEXPR14 constexpr
13
13
#else
14
14
#define FASTFLOAT_CONSTEXPR14
29
29
30
30
// Testing for relevant C++20 constexpr library features
31
31
#if FASTFLOAT_HAS_IS_CONSTANT_EVALUATED && FASTFLOAT_HAS_BIT_CAST && \
32
+ defined (__cpp_lib_constexpr_algorithms) && \
32
33
__cpp_lib_constexpr_algorithms >= 201806L /* For std::copy and std::fill*/
33
34
#define FASTFLOAT_CONSTEXPR20 constexpr
34
35
#define FASTFLOAT_IS_CONSTEXPR 1
Original file line number Diff line number Diff line change 9
9
#include < type_traits>
10
10
#include < system_error>
11
11
#ifdef __has_include
12
- #if __has_include(<stdfloat>) && (__cplusplus > 202002L || _MSVC_LANG > 202002L)
12
+ #if __has_include(<stdfloat>) && (__cplusplus > 202002L || (defined( _MSVC_LANG) && (_MSVC_LANG > 202002L)) )
13
13
#include < stdfloat>
14
14
#endif
15
15
#endif
You can’t perform that action at this time.
0 commit comments