Skip to content

Commit 3f911b5

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
2 parents 927726a + 7d2c526 commit 3f911b5

File tree

5 files changed

+183
-212
lines changed

5 files changed

+183
-212
lines changed

cmake/cmake/CMakeDefaults.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ https://cmake.org/cmake/help/latest/manual/cmake-variables.7.html
77

88
include_guard(GLOBAL)
99

10+
# Disable in-source builds.
11+
if(CMAKE_BINARY_DIR PATH_EQUAL CMAKE_CURRENT_SOURCE_DIR)
12+
message(
13+
FATAL_ERROR
14+
"In-source builds are disabled. Please, set the build directory.\n"
15+
"For example:\n"
16+
" cmake -B php-build\n"
17+
" cmake --build php-build -j"
18+
)
19+
endif()
20+
1021
# Add paths where include() and find_package() look for modules.
1122
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules)
1223

patches/8.3/cmake.patch

Lines changed: 43 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ Subject: Add CMake changes for PHP-8.3 branch
88
and ext/ext_skel.php script
99
---
1010
.editorconfig | 2 +-
11-
.gitignore | 50 ++++++++++++++++++++++++++++++++++++++
11+
.gitignore | 14 +++++++++++
1212
ext/ext_skel.php | 7 ++++++
13-
ext/skeleton/.gitignore.in | 23 ++++++++++++++++++
14-
run-tests.php | 24 +++++++++++++-----
15-
5 files changed, 99 insertions(+), 7 deletions(-)
13+
ext/skeleton/.gitignore.in | 49 ++++++++++++++++++++++++++++++++++++++
14+
run-tests.php | 24 ++++++++++++++-----
15+
5 files changed, 89 insertions(+), 7 deletions(-)
1616

1717
diff --git a/.editorconfig b/.editorconfig
1818
index 7911bf8490b..1d9b530947e 100644
@@ -28,7 +28,7 @@ index 7911bf8490b..1d9b530947e 100644
2828
indent_style = space
2929

3030
diff --git a/.gitignore b/.gitignore
31-
index cd9ba81306f..a7f1e921dff 100644
31+
index cd9ba81306f..6ee80170008 100644
3232
--- a/.gitignore
3333
+++ b/.gitignore
3434
@@ -157,6 +157,7 @@ php
@@ -39,56 +39,20 @@ index cd9ba81306f..a7f1e921dff 100644
3939
/sapi/phpdbg/phpdbg_parser.c
4040
/sapi/phpdbg/phpdbg_parser.h
4141
/sapi/phpdbg/phpdbg_parser.output
42-
@@ -300,9 +301,58 @@ tmp-php.ini
42+
@@ -300,9 +301,22 @@ tmp-php.ini
4343
# ------------------------------------------------------------------------------
4444
/ext/standard/tests/helpers/bad_cmd.exe
4545

4646
+# ------------------------------------------------------------------------------
4747
+# CMake-based build system files
4848
+# ------------------------------------------------------------------------------
49-
+cmake_install.cmake
49+
+
50+
+# General generated CMake files
5051
+CMakeCache.txt
5152
+CMakeFiles/
5253
+
53-
+# Generated by FetchContent
54-
+/_deps/
55-
+
56-
+# Graphviz generated files
57-
+/*.dependers
58-
+/*.dot
59-
+
60-
+# Generated by the Ninja build system
61-
+/.ninja*
62-
+/build.ninja
63-
+
6454
+# Local user presets
6555
+/CMakeUserPresets.json
66-
+
67-
+# Generated when CMAKE_EXPORT_COMPILE_COMMANDS is enabled
68-
+/compile-commands.json
69-
+
70-
+# Generated by ctest
71-
+/CTestTestfile.cmake
72-
+/Testing/
73-
+
74-
+# CMake script profiling data output (--profiling-output <path>)
75-
+/profile.json
76-
+
77-
+# Generated by QT Creator
78-
+CMakeLists.txt.user
79-
+
80-
+# Generated by XCode
81-
+CMakeScripts/
82-
+
83-
+# Generated by cmake --install
84-
+/install_manifest.txt
85-
+
86-
+# Generated by cmake when cross-compiling if missing cache variables are found
87-
+/TryRunResults.cmake
88-
+
89-
+# pkg-config .pc files
90-
+/sapi/embed/php-embed.pc
91-
+/scripts/php.pc
9256
+
9357
# ------------------------------------------------------------------------------
9458
# Special cases to invert previous ignore patterns
@@ -122,36 +86,62 @@ index ae7a3a987c0..a67901a2c98 100755
12286
error('Unable to copy config script: ' . $config_script);
12387
}
12488
diff --git a/ext/skeleton/.gitignore.in b/ext/skeleton/.gitignore.in
125-
index ae434fef976..87545d9162e 100644
89+
index ae434fef976..22b086f1cb5 100644
12690
--- a/ext/skeleton/.gitignore.in
12791
+++ b/ext/skeleton/.gitignore.in
128-
@@ -39,3 +39,26 @@ tests/**/*.sh
92+
@@ -39,3 +39,52 @@ tests/**/*.sh
12993
tests/**/*.db
13094
tests/**/*.mem
13195
tmp-php.ini
13296
+
13397
+# ------------------------------------------------------------------------------
13498
+# CMake-based build system files
13599
+# ------------------------------------------------------------------------------
100+
+
101+
+# Invert previous rules
136102
+!**/cmake/config.h.in
137103
+!**/cmake/modules/
104+
+
105+
+# General generated CMake files
106+
+cmake_install.cmake
107+
+CMakeCache.txt
108+
+CMakeFiles/
109+
+
110+
+# Generated by FetchContent
138111
+/_deps/
112+
+
113+
+# Generated by the Ninja build system
139114
+/.ninja*
115+
+/build.ninja
116+
+
117+
+# Graphviz generated files
140118
+/*.dependers
141119
+/*.dot
142-
+/build.ninja
120+
+
121+
+# Local user presets
143122
+/CMakeUserPresets.json
123+
+
124+
+# Generated when CMAKE_EXPORT_COMPILE_COMMANDS is enabled
144125
+/compile-commands.json
126+
+
127+
+# Generated by ctest
145128
+/CTestTestfile.cmake
146-
+/install_manifest.txt
147-
+/profile.json
148129
+/Testing/
149-
+/TryRunResults.cmake
150-
+cmake_install.cmake
151-
+CMakeCache.txt
152-
+CMakeFiles/
130+
+
131+
+# CMake script profiling data output (--profiling-output <path>)
132+
+/profile.json
133+
+
134+
+# Generated by QT Creator
153135
+CMakeLists.txt.user
136+
+
137+
+# Generated by XCode
154138
+CMakeScripts/
139+
+
140+
+# Generated by cmake --install
141+
+/install_manifest.txt
142+
+
143+
+# Generated by cmake when cross-compiling if missing cache variables are found
144+
+/TryRunResults.cmake
155145
diff --git a/run-tests.php b/run-tests.php
156146
index a06f0958d1b..1a566d392e5 100755
157147
--- a/run-tests.php

patches/8.4/cmake.patch

Lines changed: 43 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ Subject: Add CMake changes for PHP-8.4 branch
88
and ext/ext_skel.php script
99
---
1010
.editorconfig | 2 +-
11-
.gitignore | 50 ++++++++++++++++++++++++++++++++++++++
11+
.gitignore | 14 +++++++++++
1212
ext/ext_skel.php | 7 ++++++
13-
ext/skeleton/.gitignore.in | 23 ++++++++++++++++++
14-
run-tests.php | 24 +++++++++++++-----
15-
5 files changed, 99 insertions(+), 7 deletions(-)
13+
ext/skeleton/.gitignore.in | 49 ++++++++++++++++++++++++++++++++++++++
14+
run-tests.php | 24 ++++++++++++++-----
15+
5 files changed, 89 insertions(+), 7 deletions(-)
1616

1717
diff --git a/.editorconfig b/.editorconfig
1818
index 7911bf8490b..1d9b530947e 100644
@@ -28,7 +28,7 @@ index 7911bf8490b..1d9b530947e 100644
2828
indent_style = space
2929

3030
diff --git a/.gitignore b/.gitignore
31-
index 46193d0ba02..72f9be10bca 100644
31+
index 46193d0ba02..3e3e8b48976 100644
3232
--- a/.gitignore
3333
+++ b/.gitignore
3434
@@ -156,6 +156,7 @@ php
@@ -39,56 +39,20 @@ index 46193d0ba02..72f9be10bca 100644
3939
/sapi/phpdbg/phpdbg_parser.c
4040
/sapi/phpdbg/phpdbg_parser.h
4141
/sapi/phpdbg/phpdbg_parser.output
42-
@@ -299,9 +300,58 @@ tmp-php.ini
42+
@@ -299,9 +300,22 @@ tmp-php.ini
4343
# ------------------------------------------------------------------------------
4444
/ext/standard/tests/helpers/bad_cmd.exe
4545

4646
+# ------------------------------------------------------------------------------
4747
+# CMake-based build system files
4848
+# ------------------------------------------------------------------------------
49-
+cmake_install.cmake
49+
+
50+
+# General generated CMake files
5051
+CMakeCache.txt
5152
+CMakeFiles/
5253
+
53-
+# Generated by FetchContent
54-
+/_deps/
55-
+
56-
+# Graphviz generated files
57-
+/*.dependers
58-
+/*.dot
59-
+
60-
+# Generated by the Ninja build system
61-
+/.ninja*
62-
+/build.ninja
63-
+
6454
+# Local user presets
6555
+/CMakeUserPresets.json
66-
+
67-
+# Generated when CMAKE_EXPORT_COMPILE_COMMANDS is enabled
68-
+/compile-commands.json
69-
+
70-
+# Generated by ctest
71-
+/CTestTestfile.cmake
72-
+/Testing/
73-
+
74-
+# CMake script profiling data output (--profiling-output <path>)
75-
+/profile.json
76-
+
77-
+# Generated by QT Creator
78-
+CMakeLists.txt.user
79-
+
80-
+# Generated by XCode
81-
+CMakeScripts/
82-
+
83-
+# Generated by cmake --install
84-
+/install_manifest.txt
85-
+
86-
+# Generated by cmake when cross-compiling if missing cache variables are found
87-
+/TryRunResults.cmake
88-
+
89-
+# pkg-config .pc files
90-
+/sapi/embed/php-embed.pc
91-
+/scripts/php.pc
9256
+
9357
# ------------------------------------------------------------------------------
9458
# Special cases to invert previous ignore patterns
@@ -122,36 +86,62 @@ index ae7a3a987c0..a67901a2c98 100755
12286
error('Unable to copy config script: ' . $config_script);
12387
}
12488
diff --git a/ext/skeleton/.gitignore.in b/ext/skeleton/.gitignore.in
125-
index e691bd3964b..191fcd70eb5 100644
89+
index e691bd3964b..e728d405a8f 100644
12690
--- a/ext/skeleton/.gitignore.in
12791
+++ b/ext/skeleton/.gitignore.in
128-
@@ -45,3 +45,26 @@ tests/**/*.db
92+
@@ -45,3 +45,52 @@ tests/**/*.db
12993
tests/**/*.mem
13094
tmp-php.ini
13195
*~
13296
+
13397
+# ------------------------------------------------------------------------------
13498
+# CMake-based build system files
13599
+# ------------------------------------------------------------------------------
100+
+
101+
+# Invert previous rules
136102
+!**/cmake/config.h.in
137103
+!**/cmake/modules/
104+
+
105+
+# General generated CMake files
106+
+cmake_install.cmake
107+
+CMakeCache.txt
108+
+CMakeFiles/
109+
+
110+
+# Generated by FetchContent
138111
+/_deps/
112+
+
113+
+# Generated by the Ninja build system
139114
+/.ninja*
115+
+/build.ninja
116+
+
117+
+# Graphviz generated files
140118
+/*.dependers
141119
+/*.dot
142-
+/build.ninja
120+
+
121+
+# Local user presets
143122
+/CMakeUserPresets.json
123+
+
124+
+# Generated when CMAKE_EXPORT_COMPILE_COMMANDS is enabled
144125
+/compile-commands.json
126+
+
127+
+# Generated by ctest
145128
+/CTestTestfile.cmake
146-
+/install_manifest.txt
147-
+/profile.json
148129
+/Testing/
149-
+/TryRunResults.cmake
150-
+cmake_install.cmake
151-
+CMakeCache.txt
152-
+CMakeFiles/
130+
+
131+
+# CMake script profiling data output (--profiling-output <path>)
132+
+/profile.json
133+
+
134+
+# Generated by QT Creator
153135
+CMakeLists.txt.user
136+
+
137+
+# Generated by XCode
154138
+CMakeScripts/
139+
+
140+
+# Generated by cmake --install
141+
+/install_manifest.txt
142+
+
143+
+# Generated by cmake when cross-compiling if missing cache variables are found
144+
+/TryRunResults.cmake
155145
diff --git a/run-tests.php b/run-tests.php
156146
index e437487f4d1..6cb36a92153 100755
157147
--- a/run-tests.php

0 commit comments

Comments
 (0)