Use C++14 by default in configure when using CEF

Don't default to C++11 as CEF headers are not compatible with it, so
configure would succeed but the build would then fail.
This commit is contained in:
Vadim Zeitlin 2023-09-05 18:29:36 +02:00
parent 7aec5a7e62
commit b4380b5f9e
2 changed files with 24 additions and 2 deletions

View file

@ -1085,10 +1085,22 @@ if test "$CXX" = "g++" -a "$GXX" != "yes"; then
AC_MSG_ERROR([C++ compiler is needed to build wxWidgets])
fi
dnl CEF requires at least C++14, so default to it and not C++11 when using it.
if test "$wxUSE_WEBVIEW_CHROMIUM" = "yes"; then
wxDEFAULT_CXXSTD=14
else
dnl By default we just need C++11.
wxDEFAULT_CXXSTD=11
fi
dnl AX_CXX_COMPILE_STDCXX requires its VERSION argument to be specified at
dnl autoconf, not run, time.
case "${wxWITH_CXX-11}" in
case "${wxWITH_CXX-wxDEFAULT_CXXSTD}" in
11)
if test "$wxUSE_WEBVIEW_CHROMIUM" = "yes"; then
AC_MSG_ERROR([Using wxWebView Chromium backend requires C++14 or later.])
fi
AX_CXX_COMPILE_STDCXX(11)
;;