File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,13 @@ php_check_builtin(<builtin> <result_var>)
1010If builtin `<builtin>` is supported by the C compiler, store the check result in
1111the 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
1522include_guard (GLOBAL )
Original file line number Diff line number Diff line change @@ -30,6 +30,14 @@ Check that the <flag> is accepted by the <lang> compiler without issuing any
3030diagnostic 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
3232the 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
3543include_guard (GLOBAL )
Original file line number Diff line number Diff 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+
8095The following variables may be set before calling this function to modify the
8196way the check is run. See
8297https://cmake.org/cmake/help/latest/module/CheckSymbolExists.html
You can’t perform that action at this time.
0 commit comments