Skip to content

Commit 6bdb612

Browse files
committed
Merge branch 'PHP-8.3'
2 parents 2752198 + 81c2fe9 commit 6bdb612

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

cmake/cmake/modules/PHP/CheckBuiltin.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ php_check_builtin(<builtin> <result_var>)
1010
If builtin `<builtin>` is supported by the C compiler, store the check result in
1111
the cache variable `<result_var>`.
1212
13+
For example:
14+
15+
```cmake
16+
include(PHP/CheckBuiltin)
17+
18+
php_check_builtin(__builtin_clz PHP_HAVE_BUILTIN_CLZ)
19+
```
1320
#]=============================================================================]
1421

1522
include_guard(GLOBAL)

cmake/cmake/modules/PHP/CheckCompilerFlag.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ Check that the <flag> is accepted by the <lang> compiler without issuing any
3030
diagnostic message. The result is stored in an internal cache entry named
3131
`<result_var>`. The language `<lang>` can be one of the supported languages by
3232
the CMake's `CheckCompilerFlag` module.
33+
34+
For example:
35+
36+
```cmake
37+
include(PHP/CheckCompilerFlag)
38+
39+
php_check_compiler_flag(C -Wno-clobbered PHP_HAVE_WNO_CLOBBERED)
40+
```
3341
#]=============================================================================]
3442

3543
include_guard(GLOBAL)

cmake/cmake/modules/PHP/SearchLibraries.cmake

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,21 @@ of `<headers>`) and store the result in an internal cache variable
7777
checked elsewhere in the application using the `check_header_include()`. In
7878
most cases this won't be needed.
7979
80+
For example:
81+
82+
```cmake
83+
include(PHP/SearchLibraries)
84+
85+
php_search_libraries(
86+
dlopen
87+
HAVE_LIBDL
88+
HEADERS dlfcn.h
89+
LIBRARIES
90+
${CMAKE_DL_LIBS}
91+
TARGET php_configuration INTERFACE
92+
)
93+
```
94+
8095
The following variables may be set before calling this function to modify the
8196
way the check is run. See
8297
https://cmake.org/cmake/help/latest/module/CheckSymbolExists.html

0 commit comments

Comments
 (0)