File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff line change @@ -240,6 +240,29 @@ target_compile_options(
240240
241241target_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+
243266set (HAVE_LEXBOR TRUE )
244267
245268configure_file (cmake/config.h.in config.h )
Original file line number Diff line number Diff line change 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 )
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments