Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/Zend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
file(
CONFIGURE
OUTPUT zend_config.h
CONTENT "#include <../main/php_config.h>\n"
CONTENT "#include <php_config.h>\n"
)
endif()

Expand Down
4 changes: 2 additions & 2 deletions cmake/cmake/modules/FindGcov.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ macro(gcov_generate_report)
message(STATUS \"Generating gcovr HTML\")
# Clean generated gcovr_html directory. Checks are done as safeguards.
if(
EXISTS ${PROJECT_BINARY_DIR}/main/php_config.h
EXISTS ${PROJECT_BINARY_DIR}/main/internal_functions.c
AND EXISTS ${PROJECT_BINARY_DIR}/gcovr_html
)
file(REMOVE_RECURSE ${PROJECT_BINARY_DIR}/gcovr_html)
Expand All @@ -173,7 +173,7 @@ macro(gcov_generate_report)
message(STATUS \"Generating gcovr XML\")
# Clean generated gcovr.xml file. Checks are done as safeguards.
if(
EXISTS ${PROJECT_BINARY_DIR}/main/php_config.h
EXISTS ${PROJECT_BINARY_DIR}/main/internal_functions.c
AND EXISTS ${PROJECT_BINARY_DIR}/gcovr.xml
)
file(REMOVE ${PROJECT_BINARY_DIR}/gcovr.xml)
Expand Down
12 changes: 7 additions & 5 deletions cmake/cmake/modules/FindSendmail.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ either `sendmail` is used if found, or a general default value is set to
## Result variables

* `Sendmail_FOUND` - Whether sendmail has been found.
* `PROG_SENDMAIL` - Path to the sendmail executable program, either found by
the module or set to a sensible default value.
* `Sendmail_PROGRAM` - Path to the sendmail executable program, either found by
the module or set to a sensible default value for usage in PHP. On Windows,
this is set to an empty string as PHP uses a built in mailer there.

## Cache variables

Expand Down Expand Up @@ -39,6 +40,7 @@ set(_reason "")
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(_sendmailIsBuiltInMsg "PHP built-in mailer (Windows)")
set(_sendmailRequiredVars _sendmailIsBuiltInMsg)
set(Sendmail_PROGRAM "")
else()
find_program(
Sendmail_EXECUTABLE
Expand All @@ -50,14 +52,14 @@ else()
set(_sendmailRequiredVars Sendmail_EXECUTABLE)

if(Sendmail_EXECUTABLE)
set(PROG_SENDMAIL ${Sendmail_EXECUTABLE})
set(Sendmail_PROGRAM "${Sendmail_EXECUTABLE}")
else()
set(PROG_SENDMAIL "/usr/sbin/sendmail")
set(Sendmail_PROGRAM "/usr/sbin/sendmail")
endif()

set(
_reason
"sendmail not found. Default set to ${PROG_SENDMAIL}.
"sendmail not found. Default set to ${Sendmail_PROGRAM}.
It can be overridden with 'sendmail_path' php.ini directive."
)
endif()
Expand Down
38 changes: 7 additions & 31 deletions cmake/ext/odbc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,6 @@ if(PHP_EXT_ODBC_VERSION AND NOT PHP_EXT_ODBC_VERSION MATCHES "^0x[0-9A-Fa-f]+$")
)
endif()

unset(PHP_ODBC_CFLAGS CACHE)
unset(PHP_ODBC_LFLAGS CACHE)
unset(PHP_ODBC_LIBS CACHE)
unset(PHP_ODBC_TYPE CACHE)

if(NOT PHP_EXT_ODBC)
return()
endif()
Expand Down Expand Up @@ -332,7 +327,7 @@ if(PHP_EXT_ODBC_TYPE STREQUAL "ibm-db2" AND TARGET ODBC::ODBC)
endif()

################################################################################
# Set variables for main/build-defs.h and config.h file.
# Configure config.h file.
################################################################################

# Set PHP_ODBC_TYPE for configuration header value.
Expand Down Expand Up @@ -394,7 +389,7 @@ if(NOT PHP_EXT_ODBC_TYPE MATCHES "^(dbmaker|solid)$")
set(HAVE_SQLDATASOURCES TRUE)
endif()

if(TARGET ODBC::ODBC)
if(TARGET ODBC::ODBC AND NOT ODBC_DRIVER STREQUAL "Windows")
block(PROPAGATE PHP_ODBC_BUILD_DEFINITIONS_CODE)
get_target_property(definitions ODBC::ODBC INTERFACE_COMPILE_DEFINITIONS)
get_target_property(options ODBC::ODBC INTERFACE_COMPILE_OPTIONS)
Expand Down Expand Up @@ -430,37 +425,18 @@ if(TARGET ODBC::ODBC)
list(JOIN ldflags " " ldflags)
list(JOIN libs " " libs)

set(PHP_ODBC_CFLAGS "${cflags}" CACHE INTERNAL "ODBC CFLAGS")
set(PHP_ODBC_LFLAGS "${ldflags}" CACHE INTERNAL "ODBC linker flags")
set(PHP_ODBC_LIBS "${libs}" CACHE INTERNAL "ODBC libraries")
set(PHP_ODBC_TYPE "${PHP_ODBC_TYPE}" CACHE INTERNAL "ODBC type")

if(
NOT ODBC_DRIVER STREQUAL "Windows"
AND NOT EXISTS ${PHP_SOURCE_DIR}/main/build-defs.h.in
)
set(
PHP_ODBC_BUILD_DEFINITIONS_CODE
[[
string(CONFIGURE [[
/* The compile options that PHP odbc extension was built with. */
#define PHP_ODBC_CFLAGS "@PHP_ODBC_CFLAGS@"
#define PHP_ODBC_CFLAGS "@cflags@"

/* The linker flags that PHP odbc extension was built with. */
#define PHP_ODBC_LFLAGS "@PHP_ODBC_LFLAGS@"
#define PHP_ODBC_LFLAGS "@ldflags@"

/* The libraries linker flags that PHP odbc extension was built with. */
#define PHP_ODBC_LIBS "@PHP_ODBC_LIBS@"
#define PHP_ODBC_LIBS "@libs@"

/* The ODBC library used in the PHP odbc extension. */
#define PHP_ODBC_TYPE "@PHP_ODBC_TYPE@"]]
)

string(
CONFIGURE
"${PHP_ODBC_BUILD_DEFINITIONS_CODE}"
PHP_ODBC_BUILD_DEFINITIONS_CODE
)
endif()
#define PHP_ODBC_TYPE "@PHP_ODBC_TYPE@"]] PHP_ODBC_BUILD_DEFINITIONS_CODE)
endblock()
endif()

Expand Down
Loading
Loading