Skip to content

Commit 948a882

Browse files
committed
ext/date: Fix nits
On Windows strtoll is redefined in ext/date. And warning flags are now added unconditionally on Windows.
1 parent 832821a commit 948a882

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

cmake/ext/date/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ set_source_files_properties(
4545

4646
target_compile_options(
4747
php_ext_date
48-
PRIVATE
49-
$<$<COMPILE_LANG_AND_ID:C,MSVC>:/wd4244>
48+
PRIVATE $<$<AND:$<PLATFORM_ID:Windows>,$<COMPILE_LANGUAGE:C>>:/wd4244>
5049
)
5150

5251
# Configure timelib.

cmake/ext/date/lib/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ target_compile_definitions(
100100
PRIVATE
101101
HAVE_TIMELIB_CONFIG_H
102102
# timelib uses C99 strtoll() function conditionally.
103-
HAVE_STRTOLL
103+
$<$<NOT:$<PLATFORM_ID:Windows>>:HAVE_STRTOLL>
104104
# timelib includes C99 <stdint.h> header conditionally.
105105
HAVE_STDINT_H
106106
)

0 commit comments

Comments
 (0)