From 718f661f6445a1e8e0e631d16c9549a8eca94a0f Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Wed, 15 Jul 2026 16:11:38 +0200 Subject: [PATCH] Moved to C++17 --- CMakeLists.txt | 2 +- test/CMakeLists.txt | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) 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/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)