From 9327b3c0ab61926d1f311e12e79b6dd2773fa161 Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Fri, 21 Jul 2023 14:02:02 +0200 Subject: [PATCH] COMP: Ensure that C++ standard version is at least C++17 Aims to avoid compile errors from macosx-10.9-universal2-3.11/Xcode_13.2.1 MacOSX12.1.sdk/AppleClang 13.0.0.13000029 saying: > error: no template named 'is_integral_v' in namespace 'std'; did you mean 'is_integral'? --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f4c60755..11b1521f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16.3) project(Elastix) -if(NOT CMAKE_CXX_STANDARD) +if(NOT CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD LESS 17) # SuperElastix/elastix uses C++17 specific features in some of its header files. set(CMAKE_CXX_STANDARD 17) endif()