Skip to content
Snippets Groups Projects
Verified Commit 93dcf503 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Bump to C++20 standard (with GNU extensions)

In practice, for the time being, we limit ourselves to C++20 features available
in GCC 10 and clang 12 (the latter because of the Julia infrastructure).
parent ef02b794
No related branches found
No related tags found
No related merge requests found
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
dnl Copyright © 2009-2021 Dynare Team dnl Copyright © 2009-2022 Dynare Team
dnl dnl
dnl This file is part of Dynare. dnl This file is part of Dynare.
dnl dnl
...@@ -25,7 +25,6 @@ AM_INIT_AUTOMAKE([1.11 -Wall -Wno-portability foreign no-dist-gzip dist-xz tar-p ...@@ -25,7 +25,6 @@ AM_INIT_AUTOMAKE([1.11 -Wall -Wno-portability foreign no-dist-gzip dist-xz tar-p
AC_PROG_CC AC_PROG_CC
AC_PROG_CXX AC_PROG_CXX
AX_CXX_COMPILE_STDCXX_17
AC_CANONICAL_HOST AC_CANONICAL_HOST
case ${host_os} in case ${host_os} in
...@@ -44,7 +43,7 @@ esac ...@@ -44,7 +43,7 @@ esac
# Use C++ for testing headers # Use C++ for testing headers
AC_LANG([C++]) AC_LANG([C++])
AM_CXXFLAGS="-Wall -Wno-parentheses -Wold-style-cast" AM_CXXFLAGS="-std=gnu++20 -Wall -Wno-parentheses -Wold-style-cast"
AC_SUBST([AM_CXXFLAGS]) AC_SUBST([AM_CXXFLAGS])
# If default 'ar' is not available, try to find one with a host prefix (see ticket #145) # If default 'ar' is not available, try to find one with a host prefix (see ticket #145)
......
This diff is collapsed.
# =============================================================================
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_17.html
# =============================================================================
#
# SYNOPSIS
#
# AX_CXX_COMPILE_STDCXX_17([ext|noext], [mandatory|optional])
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the C++17
# standard; if necessary, add switches to CXX and CXXCPP to enable
# support.
#
# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
# macro with the version set to C++17. The two optional arguments are
# forwarded literally as the second and third argument respectively.
# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
# more information. If you want to use this macro, you also need to
# download the ax_cxx_compile_stdcxx.m4 file.
#
# LICENSE
#
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
# Copyright (c) 2016 Krzesimir Nowak <qdlacz@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 2
AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
AC_DEFUN([AX_CXX_COMPILE_STDCXX_17], [AX_CXX_COMPILE_STDCXX([17], [$1], [$2])])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment