Skip to content

Commit a6f64ee

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
ext/pdo_firebird: Use CheckCXXSymbolExists
2 parents 7a53694 + 582aaf5 commit a6f64ee

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

cmake/ext/pdo_firebird/CMakeLists.txt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ project(
2727
LANGUAGES C
2828
)
2929

30-
include(CheckLibraryExists)
30+
include(CheckCXXSymbolExists)
3131
include(CMakeDependentOption)
32+
include(CMakePushCheckState)
3233
include(FeatureSummary)
3334

3435
option(PHP_EXT_PDO_FIREBIRD "Enable the pdo_firebird extension")
@@ -92,13 +93,16 @@ target_link_libraries(php_ext_pdo_firebird PRIVATE Firebird::Firebird)
9293

9394
# Sanity check.
9495
if(TARGET Firebird::Firebird)
95-
check_library_exists(
96-
Firebird::Firebird
97-
fb_get_master_interface
98-
""
99-
_php_ext_pdo_firebird_sanity_check
100-
)
101-
if(NOT _php_ext_pdo_firebird_sanity_check)
96+
cmake_push_check_state(RESET)
97+
set(CMAKE_REQUIRED_LIBRARIES Firebird::Firebird)
98+
check_cxx_symbol_exists(
99+
Firebird::fb_get_master_interface
100+
firebird/Interface.h
101+
_PHP_EXT_PDO_FIREBIRD_SANITY_CHECK
102+
)
103+
cmake_pop_check_state()
104+
105+
if(NOT _PHP_EXT_PDO_FIREBIRD_SANITY_CHECK)
102106
message(
103107
FATAL_ERROR
104108
"Firebird sanity check failed: 'fb_get_master_interface()' not found."

0 commit comments

Comments
 (0)