Skip to content

Commit 999982b

Browse files
author
MarcoFalke
committed
build: Add --enable-c++20 option
1 parent fae6790 commit 999982b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

ci/test/00_setup_env_native_asan.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-
1111
export DOCKER_NAME_TAG=ubuntu:22.04
1212
export NO_DEPENDS=1
1313
export GOAL="install"
14-
export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' --with-sanitizers=address,integer,undefined CC=clang CXX=clang++"
14+
export BITCOIN_CONFIG="--enable-c++20 --enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' --with-sanitizers=address,integer,undefined CC=clang CXX=clang++"

configure.ac

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,18 @@ AC_ARG_WITH([seccomp],
7878
[seccomp_found=$withval],
7979
[seccomp_found=auto])
8080

81+
AC_ARG_ENABLE([c++20],
82+
[AS_HELP_STRING([--enable-c++20],
83+
[enable compilation in c++20 mode (disabled by default)])],
84+
[use_cxx20=$enableval],
85+
[use_cxx20=no])
86+
8187
dnl Require C++17 compiler (no GNU extensions)
88+
if test "$use_cxx20" = "no"; then
8289
AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory])
90+
else
91+
AX_CXX_COMPILE_STDCXX([20], [noext], [mandatory])
92+
fi
8393

8494
dnl Check if -latomic is required for <std::atomic>
8595
CHECK_ATOMIC

0 commit comments

Comments
 (0)