Skip to content

Commit ea590d5

Browse files
JohanMabilleDiamonDinoia
authored andcommitted
Moved to C++17
1 parent d0c4a8f commit ea590d5

10 files changed

Lines changed: 10 additions & 44 deletions

File tree

.github/workflows/cxx-versions.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
cxx-version: [14, 17, 20]
13+
cxx-version: [17, 20]
1414
steps:
1515
- uses: actions/checkout@v6
1616
- name: Setup
@@ -28,7 +28,7 @@ jobs:
2828
runs-on: windows-2022
2929
strategy:
3030
matrix:
31-
cxx-version: [14, 17, 20]
31+
cxx-version: [17, 20]
3232
steps:
3333
- name: Setup compiler
3434
uses: ilammy/msvc-dev-cmd@v1

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ target_include_directories(xsimd INTERFACE
4040
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
4141
$<INSTALL_INTERFACE:include>)
4242

43-
target_compile_features(xsimd INTERFACE cxx_std_14)
43+
target_compile_features(xsimd INTERFACE cxx_std_17)
4444

4545
# Only add xtl build option to the build tree, that is, if xsimd being locally
4646
# developed or is vendored.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The mathematical functions are a lightweight implementation of the algorithms or
4343

4444
## Requirements
4545

46-
`xsimd` requires a C++14 compliant compiler. The following C++ compilers are supported:
46+
`xsimd` requires a C++17 compliant compiler. The following C++ compilers are supported:
4747

4848
Compiler | Version
4949
------------------------|-------------------------------

benchmark/CMakeLists.txt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU"
3232
if(NOT CMAKE_CXX_FLAGS MATCHES "-march" AND NOT CMAKE_CXX_FLAGS MATCHES "-arch" AND NOT CMAKE_OSX_ARCHITECTURES)
3333
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
3434
endif()
35-
36-
if(NOT MSVC)
37-
if (ENABLE_XTL_COMPLEX)
38-
CHECK_CXX_COMPILER_FLAG("-std=c++17" HAS_CPP17_FLAG)
39-
if (NOT HAS_CPP17_FLAG)
40-
message(FATAL_ERROR "Unsupported compiler -- xsimd requires C++17 support when xtl complex support is enabled")
41-
endif()
42-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
43-
else()
44-
CHECK_CXX_COMPILER_FLAG("-std=c++14" HAS_CPP14_FLAG)
45-
if (NOT HAS_CPP14_FLAG)
46-
message(FATAL_ERROR "Unsupported compiler -- xsimd requires C++14 support!")
47-
else()
48-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
49-
endif()
50-
endif()
51-
endif()
5235
endif()
5336

5437
if(MSVC)

docs/source/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
.. image:: xsimd.svg
88
:alt: xsimd
99

10-
C++14 wrappers for SIMD intrinsics.
10+
C++17 wrappers for SIMD intrinsics.
1111

1212
Introduction
1313
------------
@@ -69,7 +69,7 @@ The following SIMD instruction set extensions are supported:
6969
+--------------+---------------------------------------------------------+
7070

7171

72-
`xsimd` requires a C++14 compliant compiler. The following C++ compilers are supported:
72+
`xsimd` requires a C++17 compliant compiler. The following C++ compilers are supported:
7373

7474
+-------------------------+-------------------------------+
7575
| Compiler | Version |

examples/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ endif()
3535

3636
add_executable(mandelbrot mandelbrot.cpp)
3737
target_link_libraries(mandelbrot PRIVATE xsimd)
38-
set_property(TARGET mandelbrot PROPERTY CXX_STANDARD 14)
38+
set_property(TARGET mandelbrot PROPERTY CXX_STANDARD 17)
3939
if(ENABLE_XTL_COMPLEX)
4040
target_link_libraries(mandelbrot PRIVATE xtl)
4141
endif()

test/CMakeLists.txt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU"
5959
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunused-parameter -Wextra -Wreorder")
6060
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
6161
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshorten-64-to-32")
62-
endif()
63-
# Users may override the c++ standard:
64-
if(NOT DEFINED CMAKE_CXX_STANDARD OR "${CMAKE_CXX_STANDARD}" STREQUAL "")
65-
if (ENABLE_XTL_COMPLEX)
66-
CHECK_CXX_COMPILER_FLAG("-std=c++17" HAS_CPP17_FLAG)
67-
if (NOT HAS_CPP17_FLAG)
68-
message(FATAL_ERROR "Unsupported compiler -- xsimd requires C++17 support when xtl complex support is enabled")
69-
endif()
70-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
71-
else()
72-
CHECK_CXX_COMPILER_FLAG("-std=c++14" HAS_CPP14_FLAG)
73-
if (NOT HAS_CPP14_FLAG)
74-
message(FATAL_ERROR "Unsupported compiler -- xsimd requires C++14 support!")
75-
else()
76-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
77-
endif()
78-
endif()
7962
endif()
8063

8164
if (NOT CROSS_COMPILE_ARM)

test/architectures/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ foreach(INTEL_PROCESSOR ${INTEL_PROCESSORS})
1818
target_link_libraries(test_${INTEL_PROCESSOR} PRIVATE xsimd)
1919
add_dependencies(xtest test_${INTEL_PROCESSOR})
2020
if(ENABLE_XTL_COMPLEX)
21-
target_compile_features(test_${INTEL_PROCESSOR} PRIVATE cxx_std_14)
21+
target_compile_features(test_${INTEL_PROCESSOR} PRIVATE cxx_std_17)
2222
target_compile_definitions(test_${INTEL_PROCESSOR} PRIVATE XSIMD_ENABLE_XTL_COMPLEX=1)
2323
target_link_libraries(test_${INTEL_PROCESSOR} PRIVATE xtl)
2424
endif()

test/check_inline_specifier.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ sed -r -n '/^####/,$ p' < $0 > $query_file
2020

2121
log_file=`mktemp -t`
2222

23-
clang-query --extra-arg "-std=c++14" --extra-arg="-I$top_srcdir/include" -f $query_file $top_srcdir/include/xsimd/xsimd.hpp -- | tee $log_file
23+
clang-query --extra-arg "-std=c++17" --extra-arg="-I$top_srcdir/include" -f $query_file $top_srcdir/include/xsimd/xsimd.hpp -- | tee $log_file
2424

2525
{ grep -E '^0 matches.' $log_file && failed=0 ; } || failed=1
2626

test/test_wasm/test_wasm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ cd build
3232
emcmake cmake \
3333
-DBUILD_TESTS=ON \
3434
-DCMAKE_BUILD_TYPE=Release \
35-
-DCMAKE_CXX_STANDARD=14 \
35+
-DCMAKE_CXX_STANDARD=17 \
3636
-DDOWNLOAD_DOCTEST=ON \
3737
$SRC_DIR
3838

0 commit comments

Comments
 (0)