- Source code: cmake/modules/PHP/ThreadSafety.cmake
Check for thread safety, a.k.a. ZTS (Zend thread safety) build.
-
ZTS
Whether PHP thread safety is enabled.
-
PHP_THREAD_SAFETY
When thread safety is enabled (either by the configuration variable
PHP_THREAD_SAFETY
or automatically by theapache2handler
PHP SAPI module), also a custom target propertyPHP_THREAD_SAFETY
is added to thePHP::config
target, which can be then used in generator expressions during the generation phase to determine thread safety enabled from the configuration phase. For example, thePHP_EXTENSION_DIR
configuration variable needs to be set depending on the thread safety.
# CMakeLists.txt
include(PHP/ThreadSafety)