Skip to content

Commit

Permalink
Partial bitcoin#18591: Add configure option for c++17
Browse files Browse the repository at this point in the history
  • Loading branch information
kwvg committed Mar 10, 2021
1 parent 5ead9df commit 0a670fd
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,20 @@ case $host in
lt_cv_deplibs_check_method="pass_all"
;;
esac
dnl Require C++14 compiler (no GNU extensions)
AX_CXX_COMPILE_STDCXX([14], [noext], [mandatory])

AC_ARG_ENABLE([c++17],
[AS_HELP_STRING([--enable-c++17],
[enable compilation in c++17 mode (disabled by default)])],
[use_cxx17=$enableval],
[use_cxx17=no])

dnl Require C++11 or C++17 compiler (no GNU extensions)
if test "x$use_cxx17" = xyes; then
AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory])
else
AX_CXX_COMPILE_STDCXX([14], [noext], [mandatory])
fi

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

Expand Down

0 comments on commit 0a670fd

Please sign in to comment.