Skip to content

Commit 3bd80a5

Browse files
committed
Merge branch 'PHP-8.4'
2 parents 19c1aa5 + 065d9dd commit 3bd80a5

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

cmake/ext/intl/CMakeLists.txt

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,19 @@ else()
6060
add_library(php_ext_intl)
6161
endif()
6262

63+
# TODO: Recheck this.
64+
get_target_property(type php_ext_intl TYPE)
65+
if(
66+
type MATCHES "^(MODULE|SHARED)_LIBRARY$"
67+
AND CMAKE_SYSTEM_NAME STREQUAL "Windows"
68+
)
69+
message(
70+
WARNING
71+
"TODO: Recheck if Windows still requires ext/intl to be always built as "
72+
"shared (zend_strtod.c/ICU type conflict)."
73+
)
74+
endif()
75+
6376
target_sources(
6477
php_ext_intl
6578
PRIVATE
@@ -155,17 +168,17 @@ target_sources(
155168
uchar/uchar.stub.php
156169
)
157170

158-
php_check_compiler_flag(C -Wno-write-strings HAVE_WNO_WRITE_STRINGS_C)
159-
if(HAVE_WNO_WRITE_STRINGS_C)
171+
php_check_compiler_flag(C -Wno-write-strings _PHP_HAVE_WNO_WRITE_STRINGS_C)
172+
if(_PHP_HAVE_WNO_WRITE_STRINGS_C)
160173
target_compile_options(
161174
php_ext_intl
162175
PRIVATE
163176
$<$<COMPILE_LANGUAGE:C>:-Wno-write-strings>
164177
)
165178
endif()
166179

167-
php_check_compiler_flag(CXX -Wno-write-strings HAVE_WNO_WRITE_STRINGS_CXX)
168-
if(HAVE_WNO_WRITE_STRINGS_CXX)
180+
php_check_compiler_flag(CXX -Wno-write-strings _PHP_HAVE_WNO_WRITE_STRINGS_CXX)
181+
if(_PHP_HAVE_WNO_WRITE_STRINGS_CXX)
169182
target_compile_options(
170183
php_ext_intl
171184
PRIVATE
@@ -177,9 +190,12 @@ target_compile_definitions(
177190
php_ext_intl
178191
PRIVATE
179192
U_NO_DEFAULT_INCLUDE_UTF_HEADERS=1
193+
194+
# See: https://en.cppreference.com/w/cpp/types/integer
180195
__STDC_LIMIT_MACROS
181196
__STDC_CONSTANT_MACROS
182197
__STDC_FORMAT_MACROS
198+
183199
ZEND_ENABLE_STATIC_TSRMLS_CACHE
184200
$<$<COMPILE_LANGUAGE:CXX>:UNISTR_FROM_CHAR_EXPLICIT=explicit;UNISTR_FROM_STRING_EXPLICIT=explicit>
185201
)

0 commit comments

Comments
 (0)