WebKit Bugzilla
Attachment 372679 Details for
Bug 199108
: [cmake] Switch to built-in handling of C++ standard instead of hardcoding -std=c++17
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199108-20190622174009.patch (text/plain), 4.39 KB, created by
Konstantin Tokarev
on 2019-06-22 07:40:11 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Konstantin Tokarev
Created:
2019-06-22 07:40:11 PDT
Size:
4.39 KB
patch
obsolete
>Subversion Revision: 246676 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 8077ccda3a7e26be381ca0214450fded9e15963f..0dcf30728069ee2ea826a512ba11c3aa82b31cf1 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,22 @@ >+2019-06-21 Konstantin Tokarev <annulen@yandex.ru> >+ >+ [cmake] Switch to built-in handling of C++ standard instead of hardcoding -std=c++17 >+ https://bugs.webkit.org/show_bug.cgi?id=199108 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Rationale: >+ >+ 1. It provides an abstraction over exact flags of particular compilers - >+ we just specify required version of C++ standard >+ 2. External libraries (like Qt used in WPEQt) may require particular C++ >+ standard or even particular C++ features to be availabe (e.g. Qt >+ requires INTERFACE_COMPILE_FEATURES cxx_decltype, which causes cmake >+ to add -std=gnu++11 unless proper CXX_STANDARD is defined) >+ >+ * PlatformWPE.cmake: Use project-level default for CXX_STANDARD >+ property. >+ > 2019-06-20 Patrick Griffis <pgriffis@igalia.com> and Carlos Garcia Campos <cgarcia@igalia.com> > > [GTK][WPE] Implement a basic DNS cache >diff --git a/Source/WebKit/PlatformWPE.cmake b/Source/WebKit/PlatformWPE.cmake >index 1a635fbf01d66e94d147698f95d5f37f94733b1e..570a41cb5d8359629d5c8817e6a7e875332a837c 100644 >--- a/Source/WebKit/PlatformWPE.cmake >+++ b/Source/WebKit/PlatformWPE.cmake >@@ -397,7 +397,6 @@ if (ENABLE_WPE_QT_API) > set_target_properties(qtwpe PROPERTIES > OUTPUT_NAME qtwpe > AUTOMOC ON >- CXX_STANDARD 17 > ) > target_compile_definitions(qtwpe PUBLIC QT_NO_KEYWORDS=1) > target_link_libraries(qtwpe ${qtwpe_LIBRARIES}) >diff --git a/Source/cmake/OptionsCommon.cmake b/Source/cmake/OptionsCommon.cmake >index 6c48a43ceb8519b3c23dbfe8284da1ceae126c3c..b334030e8d23925f484a9d2c502ad735b7e876c5 100644 >--- a/Source/cmake/OptionsCommon.cmake >+++ b/Source/cmake/OptionsCommon.cmake >@@ -1,3 +1,9 @@ >+if (NOT CMAKE_VERSION VERSION_LESS 3.8.0) >+ set(CMAKE_CXX_STANDARD 17) >+ set(CMAKE_CXX_STANDARD_REQUIRED ON) >+ set(CMAKE_CXX_EXTENSIONS OFF) >+endif () >+ > add_definitions(-DBUILDING_WITH_CMAKE=1) > add_definitions(-DHAVE_CONFIG_H=1) > >diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake >index 1f802d42a6114e4fb3572bba6864b5f2fda1429c..f21f280fd91fe2d60ddbeed0d7f7c6b98c2872d9 100644 >--- a/Source/cmake/WebKitCompilerFlags.cmake >+++ b/Source/cmake/WebKitCompilerFlags.cmake >@@ -104,11 +104,13 @@ if (COMPILER_IS_GCC_OR_CLANG) > WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-fno-exceptions) > WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-fno-rtti) > >- check_cxx_compiler_flag("-std=c++17" CXX_COMPILER_SUPPORTS_CXX17) >- if (CXX_COMPILER_SUPPORTS_CXX17) >- WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-std=c++17) >- else () >- message(FATAL_ERROR "Compiler with C++17 support is required") >+ if (CMAKE_VERSION VERSION_LESS 3.8.0) >+ check_cxx_compiler_flag("-std=c++17" CXX_COMPILER_SUPPORTS_CXX17) >+ if (CXX_COMPILER_SUPPORTS_CXX17) >+ WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-std=c++17) >+ else () >+ message(FATAL_ERROR "Compiler with C++17 support is required") >+ endif () > endif () > > if (WIN32) >diff --git a/ChangeLog b/ChangeLog >index d0f079fe26ba8a68c5fef91ae312cf55035363b9..859d24dd54d5ec971230e000b460cf7b3c3ebe55 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,22 @@ >+2019-06-21 Konstantin Tokarev <annulen@yandex.ru> >+ >+ [cmake] Switch to built-in handling of C++ standard instead of hardcoding -std=c++17 >+ https://bugs.webkit.org/show_bug.cgi?id=199108 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Rationale: >+ >+ 1. It provides an abstraction over exact flags of particular compilers - >+ we just specify required version of C++ standard >+ 2. External libraries (like Qt used in WPEQt) may require particular C++ >+ standard or even particular C++ features to be availabe (e.g. Qt >+ requires INTERFACE_COMPILE_FEATURES cxx_decltype, which causes cmake >+ to add -std=gnu++11 unless proper CXX_STANDARD is defined) >+ >+ * Source/cmake/OptionsCommon.cmake: >+ * Source/cmake/WebKitCompilerFlags.cmake: >+ > 2019-06-20 Carlos Garcia Campos <cgarcia@igalia.com> > > [GTK] Remove support for GTK2 plugins
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199108
:
372630
|
372679
|
372938
|
372956