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:
parent
7aec5a7e62
commit
b4380b5f9e
2 changed files with 24 additions and 2 deletions
12
configure
vendored
12
configure
vendored
|
|
@ -15340,8 +15340,18 @@ if test "$CXX" = "g++" -a "$GXX" != "yes"; then
|
|||
as_fn_error $? "C++ compiler is needed to build wxWidgets" "$LINENO" 5
|
||||
fi
|
||||
|
||||
case "${wxWITH_CXX-11}" in
|
||||
if test "$wxUSE_WEBVIEW_CHROMIUM" = "yes"; then
|
||||
wxDEFAULT_CXXSTD=14
|
||||
else
|
||||
wxDEFAULT_CXXSTD=11
|
||||
fi
|
||||
|
||||
case "${wxWITH_CXX-wxDEFAULT_CXXSTD}" in
|
||||
11)
|
||||
if test "$wxUSE_WEBVIEW_CHROMIUM" = "yes"; then
|
||||
as_fn_error $? "Using wxWebView Chromium backend requires C++14 or later." "$LINENO" 5
|
||||
fi
|
||||
|
||||
ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
|
||||
ac_ext=cpp
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
|
|
|
|||
14
configure.ac
14
configure.ac
|
|
@ -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)
|
||||
;;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue