|
1 | 1 | From: Peter Kokot <peterkokot@gmail.com> |
2 | 2 | Subject: Add CMake changes for PHP-8.3 branch |
3 | 3 |
|
4 | | -* CMake added to run-tests.php for info about failing tests and checks |
| 4 | +- EditorConfig adjustments for code style support in editors and IDEs |
| 5 | +- CMake build system files added to .gitignore |
| 6 | +- CMake added to run-tests.php for info about failing tests and checks |
| 7 | +- CMake-related modifications added to ext/skeleton template directory |
| 8 | + and ext/ext_skel.php script |
5 | 9 | --- |
6 | | - run-tests.php | 24 ++++++++++++++++++------ |
7 | | - 1 file changed, 18 insertions(+), 6 deletions(-) |
| 10 | + .editorconfig | 2 +- |
| 11 | + .gitignore | 50 ++++++++++++++++++++++++++++++++++++++ |
| 12 | + ext/ext_skel.php | 2 ++ |
| 13 | + ext/skeleton/.gitignore.in | 23 ++++++++++++++++++ |
| 14 | + run-tests.php | 24 +++++++++++++----- |
| 15 | + 5 files changed, 94 insertions(+), 7 deletions(-) |
8 | 16 |
|
| 17 | +diff --git a/.editorconfig b/.editorconfig |
| 18 | +index 7911bf8490..1d9b530947 100644 |
| 19 | +--- a/.editorconfig |
| 20 | ++++ b/.editorconfig |
| 21 | +@@ -17,7 +17,7 @@ indent_style = tab |
| 22 | + indent_size = 4 |
| 23 | + indent_style = space |
| 24 | + |
| 25 | +-[*.{ac,m4,sh,yml}] |
| 26 | ++[{CMakeLists.{txt,txt.in},*.{ac,cmake,cmake.in,json,m4,sh,yml}}] |
| 27 | + indent_size = 2 |
| 28 | + indent_style = space |
| 29 | + |
| 30 | +diff --git a/.gitignore b/.gitignore |
| 31 | +index 449963153f..913ed3d96d 100644 |
| 32 | +--- a/.gitignore |
| 33 | ++++ b/.gitignore |
| 34 | +@@ -153,6 +153,7 @@ php |
| 35 | + # ------------------------------------------------------------------------------ |
| 36 | + /ext/json/json_parser.tab.h |
| 37 | + /ext/json/json_parser.tab.c |
| 38 | ++/ext/json/json_parser.output |
| 39 | + /sapi/phpdbg/phpdbg_parser.c |
| 40 | + /sapi/phpdbg/phpdbg_parser.h |
| 41 | + /sapi/phpdbg/phpdbg_parser.output |
| 42 | +@@ -291,9 +292,58 @@ tmp-php.ini |
| 43 | + /junit.out.xml |
| 44 | + /.ccache/ |
| 45 | + |
| 46 | ++# ------------------------------------------------------------------------------ |
| 47 | ++# CMake-based build system files |
| 48 | ++# ------------------------------------------------------------------------------ |
| 49 | ++cmake_install.cmake |
| 50 | ++CMakeCache.txt |
| 51 | ++CMakeFiles/ |
| 52 | ++ |
| 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 | ++ |
| 64 | ++# Local user presets |
| 65 | ++/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 |
| 92 | ++ |
| 93 | + # ------------------------------------------------------------------------------ |
| 94 | + # Special cases to invert previous ignore patterns |
| 95 | + # ------------------------------------------------------------------------------ |
| 96 | ++!**/cmake/config.h.in |
| 97 | ++!**/cmake/modules/ |
| 98 | + !/ext/bcmath/libbcmath/src/config.h |
| 99 | + !/ext/fileinfo/libmagic/config.h |
| 100 | + !/ext/fileinfo/libmagic.patch |
| 101 | +diff --git a/ext/ext_skel.php b/ext/ext_skel.php |
| 102 | +index ae7a3a987c..a9e0dd1b51 100755 |
| 103 | +--- a/ext/ext_skel.php |
| 104 | ++++ b/ext/ext_skel.php |
| 105 | +@@ -302,6 +302,8 @@ function copy_config_scripts() { |
| 106 | + $files[] = 'config.w32'; |
| 107 | + } |
| 108 | + |
| 109 | ++ $files[] = 'CMakeLists.txt'; |
| 110 | ++ $files[] = 'cmake/config.h.in'; |
| 111 | + $files[] = '.gitignore'; |
| 112 | + |
| 113 | + foreach($files as $config_script) { |
| 114 | +diff --git a/ext/skeleton/.gitignore.in b/ext/skeleton/.gitignore.in |
| 115 | +index ae434fef97..87545d9162 100644 |
| 116 | +--- a/ext/skeleton/.gitignore.in |
| 117 | ++++ b/ext/skeleton/.gitignore.in |
| 118 | +@@ -39,3 +39,26 @@ tests/**/*.sh |
| 119 | + tests/**/*.db |
| 120 | + tests/**/*.mem |
| 121 | + tmp-php.ini |
| 122 | ++ |
| 123 | ++# ------------------------------------------------------------------------------ |
| 124 | ++# CMake-based build system files |
| 125 | ++# ------------------------------------------------------------------------------ |
| 126 | ++!**/cmake/config.h.in |
| 127 | ++!**/cmake/modules/ |
| 128 | ++/_deps/ |
| 129 | ++/.ninja* |
| 130 | ++/*.dependers |
| 131 | ++/*.dot |
| 132 | ++/build.ninja |
| 133 | ++/CMakeUserPresets.json |
| 134 | ++/compile-commands.json |
| 135 | ++/CTestTestfile.cmake |
| 136 | ++/install_manifest.txt |
| 137 | ++/profile.json |
| 138 | ++/Testing/ |
| 139 | ++/TryRunResults.cmake |
| 140 | ++cmake_install.cmake |
| 141 | ++CMakeCache.txt |
| 142 | ++CMakeFiles/ |
| 143 | ++CMakeLists.txt.user |
| 144 | ++CMakeScripts/ |
9 | 145 | diff --git a/run-tests.php b/run-tests.php |
10 | 146 | index d51ab99a20..9211cbb3e2 100755 |
11 | 147 | --- a/run-tests.php |
|
0 commit comments