File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,19 @@ else()
6060 add_library (php_ext_intl)
6161endif ()
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+
6376target_sources (
6477 php_ext_intl
6578 PRIVATE
@@ -153,17 +166,17 @@ target_sources(
153166 uchar/uchar.stub.php
154167)
155168
156- php_check_compiler_flag(C -Wno-write-strings HAVE_WNO_WRITE_STRINGS_C )
157- if (HAVE_WNO_WRITE_STRINGS_C )
169+ php_check_compiler_flag(C -Wno-write-strings _PHP_HAVE_WNO_WRITE_STRINGS_C )
170+ if (_PHP_HAVE_WNO_WRITE_STRINGS_C )
158171 target_compile_options (
159172 php_ext_intl
160173 PRIVATE
161174 $<$<COMPILE_LANGUAGE:C>:-Wno-write-strings >
162175 )
163176endif ()
164177
165- php_check_compiler_flag(CXX -Wno-write-strings HAVE_WNO_WRITE_STRINGS_CXX )
166- if (HAVE_WNO_WRITE_STRINGS_CXX )
178+ php_check_compiler_flag(CXX -Wno-write-strings _PHP_HAVE_WNO_WRITE_STRINGS_CXX )
179+ if (_PHP_HAVE_WNO_WRITE_STRINGS_CXX )
167180 target_compile_options (
168181 php_ext_intl
169182 PRIVATE
@@ -175,9 +188,12 @@ target_compile_definitions(
175188 php_ext_intl
176189 PRIVATE
177190 U_NO_DEFAULT_INCLUDE_UTF_HEADERS=1
191+
192+ # See: https://en.cppreference.com/w/cpp/types/integer
178193 __STDC_LIMIT_MACROS
179194 __STDC_CONSTANT_MACROS
180195 __STDC_FORMAT_MACROS
196+
181197 ZEND_ENABLE_STATIC_TSRMLS_CACHE
182198 $<$<COMPILE_LANGUAGE:CXX>:UNISTR_FROM_CHAR_EXPLICIT=explicit;UNISTR_FROM_STRING_EXPLICIT=explicit>
183199)
You can’t perform that action at this time.
0 commit comments