diff --git a/.github/workflows/cxx-versions.yml b/.github/workflows/cxx-versions.yml index 7bfcac2f8..f11e0fa5f 100644 --- a/.github/workflows/cxx-versions.yml +++ b/.github/workflows/cxx-versions.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - cxx-version: [14, 17, 20] + cxx-version: [17, 20] steps: - uses: actions/checkout@v6 - name: Setup @@ -28,7 +28,7 @@ jobs: runs-on: windows-2022 strategy: matrix: - cxx-version: [14, 17, 20] + cxx-version: [17, 20] steps: - name: Setup compiler uses: ilammy/msvc-dev-cmd@v1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b120539b..82f7d0a22 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ target_include_directories(xsimd INTERFACE $ $) -target_compile_features(xsimd INTERFACE cxx_std_14) +target_compile_features(xsimd INTERFACE cxx_std_17) # Only add xtl build option to the build tree, that is, if xsimd being locally # developed or is vendored. diff --git a/README.md b/README.md index 9c6cdea19..894cf098d 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ The mathematical functions are a lightweight implementation of the algorithms or ## Requirements -`xsimd` requires a C++14 compliant compiler. The following C++ compilers are supported: +`xsimd` requires a C++17 compliant compiler. The following C++ compilers are supported: Compiler | Version ------------------------|------------------------------- diff --git a/benchmark/CMakeLists.txt b/benchmark/CMakeLists.txt index dc9011f3f..79ad30de8 100644 --- a/benchmark/CMakeLists.txt +++ b/benchmark/CMakeLists.txt @@ -32,23 +32,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" if(NOT CMAKE_CXX_FLAGS MATCHES "-march" AND NOT CMAKE_CXX_FLAGS MATCHES "-arch" AND NOT CMAKE_OSX_ARCHITECTURES) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") endif() - - if(NOT MSVC) - if (ENABLE_XTL_COMPLEX) - CHECK_CXX_COMPILER_FLAG("-std=c++17" HAS_CPP17_FLAG) - if (NOT HAS_CPP17_FLAG) - message(FATAL_ERROR "Unsupported compiler -- xsimd requires C++17 support when xtl complex support is enabled") - endif() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") - else() - CHECK_CXX_COMPILER_FLAG("-std=c++14" HAS_CPP14_FLAG) - if (NOT HAS_CPP14_FLAG) - message(FATAL_ERROR "Unsupported compiler -- xsimd requires C++14 support!") - else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") - endif() - endif() - endif() endif() if(MSVC) diff --git a/docs/source/index.rst b/docs/source/index.rst index 75335c043..68c992891 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -7,7 +7,7 @@ .. image:: xsimd.svg :alt: xsimd -C++14 wrappers for SIMD intrinsics. +C++17 wrappers for SIMD intrinsics. Introduction ------------ @@ -69,7 +69,7 @@ The following SIMD instruction set extensions are supported: +--------------+---------------------------------------------------------+ -`xsimd` requires a C++14 compliant compiler. The following C++ compilers are supported: +`xsimd` requires a C++17 compliant compiler. The following C++ compilers are supported: +-------------------------+-------------------------------+ | Compiler | Version | diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 464892f87..d050aa73f 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -35,7 +35,7 @@ endif() add_executable(mandelbrot mandelbrot.cpp) target_link_libraries(mandelbrot PRIVATE xsimd) -set_property(TARGET mandelbrot PROPERTY CXX_STANDARD 14) +set_property(TARGET mandelbrot PROPERTY CXX_STANDARD 17) if(ENABLE_XTL_COMPLEX) target_link_libraries(mandelbrot PRIVATE xtl) endif() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c159977f7..a34dafde9 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -59,23 +59,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunused-parameter -Wextra -Wreorder") if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshorten-64-to-32") - endif() - # Users may override the c++ standard: - if(NOT DEFINED CMAKE_CXX_STANDARD OR "${CMAKE_CXX_STANDARD}" STREQUAL "") - if (ENABLE_XTL_COMPLEX) - CHECK_CXX_COMPILER_FLAG("-std=c++17" HAS_CPP17_FLAG) - if (NOT HAS_CPP17_FLAG) - message(FATAL_ERROR "Unsupported compiler -- xsimd requires C++17 support when xtl complex support is enabled") - endif() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") - else() - CHECK_CXX_COMPILER_FLAG("-std=c++14" HAS_CPP14_FLAG) - if (NOT HAS_CPP14_FLAG) - message(FATAL_ERROR "Unsupported compiler -- xsimd requires C++14 support!") - else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") - endif() - endif() endif() if (NOT CROSS_COMPILE_ARM) diff --git a/test/architectures/CMakeLists.txt b/test/architectures/CMakeLists.txt index a374973b3..acbd690d9 100644 --- a/test/architectures/CMakeLists.txt +++ b/test/architectures/CMakeLists.txt @@ -18,7 +18,7 @@ foreach(INTEL_PROCESSOR ${INTEL_PROCESSORS}) target_link_libraries(test_${INTEL_PROCESSOR} PRIVATE xsimd) add_dependencies(xtest test_${INTEL_PROCESSOR}) if(ENABLE_XTL_COMPLEX) - target_compile_features(test_${INTEL_PROCESSOR} PRIVATE cxx_std_14) + target_compile_features(test_${INTEL_PROCESSOR} PRIVATE cxx_std_17) target_compile_definitions(test_${INTEL_PROCESSOR} PRIVATE XSIMD_ENABLE_XTL_COMPLEX=1) target_link_libraries(test_${INTEL_PROCESSOR} PRIVATE xtl) endif() diff --git a/test/check_inline_specifier.sh b/test/check_inline_specifier.sh index 2337b3707..cb235c06b 100755 --- a/test/check_inline_specifier.sh +++ b/test/check_inline_specifier.sh @@ -20,7 +20,7 @@ sed -r -n '/^####/,$ p' < $0 > $query_file log_file=`mktemp -t` -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 +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 { grep -E '^0 matches.' $log_file && failed=0 ; } || failed=1 diff --git a/test/test_wasm/test_wasm.sh b/test/test_wasm/test_wasm.sh index 91b1f09ae..ccc4aa920 100755 --- a/test/test_wasm/test_wasm.sh +++ b/test/test_wasm/test_wasm.sh @@ -32,7 +32,7 @@ cd build emcmake cmake \ -DBUILD_TESTS=ON \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_STANDARD=14 \ + -DCMAKE_CXX_STANDARD=17 \ -DDOWNLOAD_DOCTEST=ON \ $SRC_DIR