From adedb499f5a0a59024d5aa22e29c37f63bbdf40e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 30 Dec 2023 02:24:43 +0100 Subject: [PATCH] Relax C++ standard requirement when using wxWebviewChromium Although building CEF itself requires C++17, C++14 is sufficient for building libcef_dll_wrapper, so allow using it. Also move the error message a bit more informative. --- build/cmake/init.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake index a8e221ddd4..6396628bf5 100644 --- a/build/cmake/init.cmake +++ b/build/cmake/init.cmake @@ -487,8 +487,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 17) - message(WARNING "WebviewChromium requires at least c++17") + if(wxUSE_WEBVIEW_CHROMIUM AND CMAKE_CXX_STANDARD LESS 14) + # 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}") endif() endif()