Skip to content

Commit 479274e

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
2 parents 10366fb + 3a28127 commit 479274e

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

bin/check-cmake.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ function getProjectModules(): array
202202
],
203203
'FindPackageMessage' => ['find_package_message'],
204204
'GenerateExportHeader' => ['generate_export_header'],
205-
'ProcessorCount' => ['processorcount'],
205+
'ProcessorCount' => ['ProcessorCount'],
206206
'PHP/AddCustomCommand' => ['php_add_custom_command'],
207207
'PHP/Bison' => ['php_bison', '/find_package\([\n ]*BISON/'],
208208
'PHP/CheckAttribute' => [

cmake/cmake/Testing.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ endif()
99
enable_testing()
1010

1111
block()
12-
include(ProcessorCount)
13-
processorcount(processors)
12+
cmake_host_system_information(RESULT processors QUERY NUMBER_OF_LOGICAL_CORES)
1413

15-
if(NOT processors EQUAL 0)
14+
set(parallel "")
15+
if(processors)
1616
set(parallel -j${processors})
1717
endif()
1818

cmake/cmake/modules/PHP/Rebuild.cmake

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ endfunction()
3030
block()
3131
_php_rebuild_get_all_targets(targets ${CMAKE_CURRENT_SOURCE_DIR})
3232

33-
include(ProcessorCount)
34-
processorcount(processors)
33+
cmake_host_system_information(RESULT processors QUERY NUMBER_OF_LOGICAL_CORES)
34+
35+
set(parallel "")
36+
if(processors)
37+
set(parallel --parallel ${processors})
38+
endif()
3539

3640
add_custom_command(
3741
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/php_rebuild.timestamp
@@ -43,7 +47,7 @@ block()
4347
-E touch ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/php_rebuild.timestamp
4448
COMMAND
4549
${CMAKE_COMMAND}
46-
--build . --target php_rebuild -j ${processors}
50+
--build . --target php_rebuild ${parallel}
4751
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
4852
DEPENDS ${targets}
4953
)

0 commit comments

Comments
 (0)