Skip to content

Commit a56ef6d

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
2 parents ea1bd2c + cb8cb90 commit a56ef6d

File tree

2 files changed

+2204
-32
lines changed

2 files changed

+2204
-32
lines changed

cmake/main/CMakeLists.txt

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -307,21 +307,12 @@ function(_php_main_create_files)
307307
set(DEFAULT_SHORT_OPEN_TAG "0")
308308
endif()
309309

310-
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
311-
message(STATUS "Creating main/config.w32.h")
312-
configure_file(
313-
main/config.w32.cmake.h.in
314-
main/CMakeFiles/config.w32.cmake.h.in
315-
@ONLY
316-
)
310+
message(STATUS "Creating main/php_version.h")
311+
configure_file(main/php_version.h.in main/php_version.h @ONLY)
317312

318-
file(
319-
GENERATE
320-
# TODO: Multi-config generators need to write separate files.
321-
#OUTPUT $<CONFIG>/main/config.w32.h
322-
OUTPUT ${PHP_BINARY_DIR}/main/config.w32.h
323-
INPUT ${PHP_BINARY_DIR}/main/CMakeFiles/config.w32.cmake.h.in
324-
)
313+
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
314+
set(PHP_CONFIG_H_WINDOWS 1)
315+
set(file config.w32.h)
325316
else()
326317
message(STATUS "Creating main/build-defs.h")
327318
configure_file(
@@ -340,26 +331,24 @@ function(_php_main_create_files)
340331
)
341332

342333
set(HAVE_BUILD_DEFS_H 1)
343-
344-
message(STATUS "Creating main/php_config.h")
345-
configure_file(
346-
main/php_config.cmake.h.in
347-
main/CMakeFiles/php_config.cmake.h.in
348-
@ONLY
349-
)
350-
351-
# To be able to evaluate the generator expressions.
352-
file(
353-
GENERATE
354-
# TODO: Multi-config generators need to write separate files.
355-
#OUTPUT $<CONFIG>/main/php_config.h
356-
OUTPUT ${PHP_BINARY_DIR}/main/php_config.h
357-
INPUT ${PHP_BINARY_DIR}/main/CMakeFiles/php_config.cmake.h.in
358-
)
334+
set(PHP_CONFIG_H_WINDOWS 0)
335+
set(file php_config.h)
359336
endif()
360337

361-
message(STATUS "Creating main/php_version.h")
362-
configure_file(main/php_version.h.in main/php_version.h @ONLY)
338+
message(STATUS "Creating main/${file}")
339+
configure_file(
340+
main/php_config_common.cmake.h.in
341+
main/CMakeFiles/${file}.cmake.in
342+
@ONLY
343+
)
344+
345+
file(
346+
GENERATE
347+
# TODO: Multi-config generators need to write separate files.
348+
#OUTPUT $<CONFIG>/main/${file}
349+
OUTPUT ${PHP_BINARY_DIR}/main/${file}
350+
INPUT ${PHP_BINARY_DIR}/main/CMakeFiles/${file}.cmake.in
351+
)
363352
endfunction()
364353

365354
# Run at the end of the configuration.

0 commit comments

Comments
 (0)