Use C++17 when using CEF and not C++14

CEF uses std::in_place_t which is not available in C++14.
This commit is contained in:
Vadim Zeitlin 2024-01-23 03:29:23 +01:00
parent 8463b13c14
commit 5480296dd0

View file

@ -506,11 +506,11 @@ if(wxUSE_GUI)
message(WARNING "WebviewChromium libcef_dll_wrapper can only be built with MSVC... disabled")
wx_option_force_value(wxUSE_WEBVIEW_CHROMIUM OFF)
endif()
if(wxUSE_WEBVIEW_CHROMIUM AND CMAKE_CXX_STANDARD LESS 14)
if(wxUSE_WEBVIEW_CHROMIUM AND CMAKE_CXX_STANDARD LESS 17)
# We shouldn't disable this option as it's disabled by default and
# if it is on, it means that CEF is meant to be used, but we can't
# continue neither as libcef_dll_wrapper will fail to build.
message(FATAL_ERROR "WebviewChromium requires at least C++14 but configured to use C++${CMAKE_CXX_STANDARD}")
message(FATAL_ERROR "WebviewChromium requires at least C++17 but configured to use C++${CMAKE_CXX_STANDARD}")
endif()
endif()