Skip to content

Commit dd98659

Browse files
committed
Sync with upstream: ext/lexbor
- Additionally, synced docs TOCs.
1 parent 403aa85 commit dd98659

4 files changed

Lines changed: 25 additions & 2 deletions

File tree

cmake/cmake/platforms/Windows.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
5959
set(PHP_EXT_FILEINFO_HAVE_STRNDUP FALSE)
6060
set(PHP_EXT_FILEINFO_HAVE_UTIMES FALSE)
6161
set(PHP_EXT_GD_HAS_FLOORF TRUE)
62+
set(PHP_EXT_LEXBOR_HAS_WNO_UNKNOWN_WARNING_OPTION FALSE)
63+
set(PHP_EXT_LEXBOR_HAS_WNO_UNTERMINATED_STRING_INITIALIZATION FALSE)
6264
set(PHP_EXT_OPCACHE_HAVE_FLOOR TRUE)
6365
set(PHP_EXT_OPCACHE_HAVE_MPROTECT FALSE)
6466
set(PHP_EXT_OPCACHE_HAVE_SHM_CREATE_LARGEPAGE FALSE)

cmake/ext/lexbor/CMakeLists.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,29 @@ target_compile_options(
240240

241241
target_include_directories(php_ext_lexbor PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
242242

243+
include(PHP/CheckCompilerFlag)
244+
245+
php_check_compiler_flag(
246+
C
247+
-Wno-unknown-warning-option
248+
PHP_EXT_LEXBOR_HAS_WNO_UNKNOWN_WARNING_OPTION
249+
)
250+
if(PHP_EXT_LEXBOR_HAS_WNO_UNKNOWN_WARNING_OPTION)
251+
target_compile_options(php_ext_lexbor PRIVATE -Wno-unknown-warning-option)
252+
endif()
253+
254+
php_check_compiler_flag(
255+
C
256+
-Wno-unterminated-string-initialization
257+
PHP_EXT_LEXBOR_HAS_WNO_UNTERMINATED_STRING_INITIALIZATION
258+
)
259+
if(PHP_EXT_LEXBOR_HAS_WNO_UNTERMINATED_STRING_INITIALIZATION)
260+
target_compile_options(
261+
php_ext_lexbor
262+
PRIVATE -Wno-unterminated-string-initialization
263+
)
264+
endif()
265+
243266
set(HAVE_LEXBOR TRUE)
244267

245268
configure_file(cmake/config.h.in config.h)

docs/cmake/configuration.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
## Index
44

5-
* [Index](#index)
65
* [1. CMake presets](#1-cmake-presets)
76
* [2. CMake configuration](#2-cmake-configuration)
87
* [3. PHP configuration](#3-php-configuration)

docs/dependencies.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ projects.
66

77
## Index
88

9-
* [Index](#index)
109
* [1. Introduction to dependencies](#1-introduction-to-dependencies)
1110
* [2. Why manage dependencies?](#2-why-manage-dependencies)
1211
* [3. Options for managing dependencies](#3-options-for-managing-dependencies)

0 commit comments

Comments
 (0)