mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-06 16:56:57 +08:00
Reverted CMakeLists changes, modifed workflow for g++13 & C++23.
This commit is contained in:
parent
d10980bc9f
commit
f330ec1e9d
4
.github/workflows/ubuntu22-gcc13.yml
vendored
4
.github/workflows/ubuntu22-gcc13.yml
vendored
@ -14,10 +14,10 @@ jobs:
|
|||||||
CXX=g++-13 CXXFLAGS=-Werror cmake -DFASTFLOAT_TEST=ON .. &&
|
CXX=g++-13 CXXFLAGS=-Werror cmake -DFASTFLOAT_TEST=ON .. &&
|
||||||
cmake --build . &&
|
cmake --build . &&
|
||||||
ctest --output-on-failure
|
ctest --output-on-failure
|
||||||
- name: Use cmake CXX20
|
- name: Use cmake CXX23
|
||||||
run: |
|
run: |
|
||||||
mkdir build20 &&
|
mkdir build20 &&
|
||||||
cd build20 &&
|
cd build20 &&
|
||||||
CXX=g++-13 CXXFLAGS=-Werror cmake -DFASTFLOAT_CONSTEXPR_TESTS=ON -DFASTFLOAT_CXX_STANDARD=20 -DFASTFLOAT_TEST=ON .. &&
|
CXX=g++-13 CXXFLAGS=-Werror cmake -DFASTFLOAT_CONSTEXPR_TESTS=ON -DFASTFLOAT_CXX_STANDARD=23 -DFASTFLOAT_TEST=ON .. &&
|
||||||
cmake --build . &&
|
cmake --build . &&
|
||||||
ctest --output-on-failure
|
ctest --output-on-failure
|
||||||
@ -34,7 +34,7 @@ target_include_directories(
|
|||||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||||
)
|
)
|
||||||
target_compile_features(fast_float INTERFACE cxx_std_23)
|
target_compile_features(fast_float INTERFACE cxx_std_11)
|
||||||
if(FASTFLOAT_SANITIZE)
|
if(FASTFLOAT_SANITIZE)
|
||||||
target_compile_options(fast_float INTERFACE -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=all)
|
target_compile_options(fast_float INTERFACE -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=all)
|
||||||
target_link_libraries(fast_float INTERFACE -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=all)
|
target_link_libraries(fast_float INTERFACE -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=all)
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Testing for https://wg21.link/N3652, adopted in C++14
|
// Testing for https://wg21.link/N3652, adopted in C++14
|
||||||
#if __cpp_constexpr >= 201304
|
#if __cpp_constexpr >= 201304`
|
||||||
#define FASTFLOAT_CONSTEXPR14 constexpr
|
#define FASTFLOAT_CONSTEXPR14 constexpr
|
||||||
#else
|
#else
|
||||||
#define FASTFLOAT_CONSTEXPR14
|
#define FASTFLOAT_CONSTEXPR14
|
||||||
|
|||||||
@ -62,10 +62,10 @@ fast_float_add_cpp_test(example_comma_test)
|
|||||||
fast_float_add_cpp_test(basictest)
|
fast_float_add_cpp_test(basictest)
|
||||||
option(FASTFLOAT_CONSTEXPR_TESTS "Require constexpr tests (build will fail if the compiler won't support it)" OFF)
|
option(FASTFLOAT_CONSTEXPR_TESTS "Require constexpr tests (build will fail if the compiler won't support it)" OFF)
|
||||||
if (FASTFLOAT_CONSTEXPR_TESTS)
|
if (FASTFLOAT_CONSTEXPR_TESTS)
|
||||||
target_compile_features(basictest PRIVATE cxx_std_23)
|
target_compile_features(basictest PRIVATE cxx_std_20)
|
||||||
target_compile_definitions(basictest PRIVATE FASTFLOAT_CONSTEXPR_TESTS)
|
target_compile_definitions(basictest PRIVATE FASTFLOAT_CONSTEXPR_TESTS)
|
||||||
else()
|
else()
|
||||||
target_compile_features(basictest PRIVATE cxx_std_23)
|
target_compile_features(basictest PRIVATE cxx_std_17)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
fast_float_add_cpp_test(long_test)
|
fast_float_add_cpp_test(long_test)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user