Skip to content

Commit

Permalink
Sync error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
petk committed Dec 29, 2024
1 parent a7083c9 commit 7f4d0a1
Show file tree
Hide file tree
Showing 35 changed files with 90 additions and 96 deletions.
2 changes: 1 addition & 1 deletion cmake/Zend/cmake/Fibers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ block()
message(CHECK_FAIL "no")
message(
FATAL_ERROR
"Fibers are not available on this platform, ucontext.h not found"
"Fibers are not available on this platform, <ucontext.h> not found."
)
endif()
message(CHECK_PASS "yes, ucontext")
Expand Down
4 changes: 2 additions & 2 deletions cmake/cmake/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ php_search_libraries(
TARGET php_config INTERFACE
)
if(NOT HAVE_INET_NTOP)
message(FATAL_ERROR "Cannot find inet_ntop which is required.")
message(FATAL_ERROR "Cannot find 'inet_ntop()' which is required.")
endif()

# The inet_pton() is mostly in C library (Solaris 11.4, illumos...)
Expand Down Expand Up @@ -787,7 +787,7 @@ endif()
# Check GCOV.
if(PHP_GCOV)
if(NOT CMAKE_C_COMPILER_ID STREQUAL "GNU")
message(FATAL_ERROR "GCC is required for using PHP_GCOV='ON'")
message(FATAL_ERROR "GCC is required for using PHP_GCOV='ON'.")
endif()

if(CMAKE_C_COMPILER_LAUNCHER MATCHES "ccache")
Expand Down
8 changes: 4 additions & 4 deletions cmake/cmake/Flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ endif()
if(PHP_MEMORY_SANITIZER AND PHP_ADDRESS_SANITIZER)
message(
FATAL_ERROR
"MemorySanitizer and AddressSanitizer are mutually exclusive"
"MemorySanitizer and AddressSanitizer are mutually exclusive."
)
endif()

Expand Down Expand Up @@ -228,7 +228,7 @@ if(PHP_MEMORY_SANITIZER)
message(CHECK_PASS "Success")
else()
message(CHECK_FAIL "Failed")
message(FATAL_ERROR "MemorySanitizer is not available")
message(FATAL_ERROR "MemorySanitizer is not available.")
endif()
endif()

Expand Down Expand Up @@ -276,7 +276,7 @@ if(PHP_ADDRESS_SANITIZER)
message(CHECK_PASS "Success")
else()
message(CHECK_FAIL "Failed")
message(FATAL_ERROR "AddressSanitizer is not available")
message(FATAL_ERROR "AddressSanitizer is not available.")
endif()
endif()

Expand Down Expand Up @@ -411,7 +411,7 @@ if(PHP_UNDEFINED_SANITIZER)
message(CHECK_PASS "Success")
else()
message(CHECK_FAIL "Failed")
message(FATAL_ERROR "UndefinedBehaviorSanitizer is not available")
message(FATAL_ERROR "UndefinedBehaviorSanitizer is not available.")
endif()
endif()

Expand Down
6 changes: 3 additions & 3 deletions cmake/cmake/Requirements.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ if(CMAKE_C_COMPILER_ID STREQUAL "SunPro")
FATAL_ERROR
"Using unsupported compiler: Oracle Developer Studio.\n"
"Please, install a compatible C compiler such as GNU C or Clang. You can "
"set CMAKE_C_COMPILER (and CMAKE_CXX_COMPILER) to the compiler path on the "
"system."
"set 'CMAKE_C_COMPILER' (and 'CMAKE_CXX_COMPILER') variables to the "
"compiler path on the system."
)
endif()

Expand All @@ -40,7 +40,7 @@ cmake_pop_check_state()

if(PHP_IS_EBCDIC)
message(CHECK_FAIL "EBCDIC")
message(FATAL_ERROR "PHP does not support EBCDIC targets")
message(FATAL_ERROR "PHP does not support EBCDIC targets.")
else()
message(CHECK_PASS "ASCII")
endif()
Expand Down
12 changes: 5 additions & 7 deletions cmake/cmake/modules/FindCclient.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -296,25 +296,23 @@ if(Cclient_INCLUDE_DIR AND Cclient_LIBRARY)
string(
APPEND
_reason
"Sanity check failed: utf8_mime2text() has new signature, but "
"U8T_CANONICAL is missing. This should not happen. Check CMake logs for "
"additional information. "
"Sanity check failed: 'utf8_mime2text()' has new signature, but "
"'U8T_CANONICAL' is missing. This should not happen. "
)
elseif(NOT HAVE_NEW_MIME2TEXT AND _HAVE_U8T_DECOMPOSE)
string(
APPEND
_reason
"Sanity check failed: utf8_mime2text() has old signature, but "
"U8T_CANONICAL is present. This should not happen. Check CMake logs for "
"additional information."
"Sanity check failed: 'utf8_mime2text()' has old signature, but "
"'U8T_CANONICAL' is present. This should not happen. "
)
else()
set(_cclient_sanity_check_2 TRUE)
endif()
endif()

if(NOT _cclient_sanity_check_2)
string(APPEND _reason "Sanity check failed: mail_newbody() not found. ")
string(APPEND _reason "Sanity check failed: 'mail_newbody()' not found. ")
endif()

################################################################################
Expand Down
10 changes: 5 additions & 5 deletions cmake/cmake/modules/FindDTrace.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -138,27 +138,27 @@ function(dtrace_target)
)

if(parsed_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Bad arguments: ${parsed_UNPARSED_ARGUMENTS}")
message(FATAL_ERROR "Unrecognized arguments: ${parsed_UNPARSED_ARGUMENTS}")
endif()

if(parsed_KEYWORDS_MISSING_VALUES)
message(FATAL_ERROR "Missing values for: ${parsed_KEYWORDS_MISSING_VALUES}")
endif()

if(NOT ARGV0)
message(FATAL_ERROR "dtrace_target expects a target name")
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} expects a target name.")
endif()

if(NOT parsed_INPUT)
message(FATAL_ERROR "dtrace_target expects an input filename")
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} expects an input filename.")
endif()

if(NOT parsed_HEADER)
message(FATAL_ERROR "dtrace_target expects a header filename")
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} expects a header filename.")
endif()

if(NOT parsed_SOURCES)
message(FATAL_ERROR "dtrace_target expects a list of source files")
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} expects source files.")
endif()

if(NOT IS_ABSOLUTE "${parsed_INPUT}")
Expand Down
11 changes: 7 additions & 4 deletions cmake/cmake/modules/FindMC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -160,23 +160,26 @@ function(mc_target)
)

if(parsed_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Bad arguments: ${parsed_UNPARSED_ARGUMENTS}")
message(FATAL_ERROR "Unrecognized arguments: ${parsed_UNPARSED_ARGUMENTS}")
endif()

if(parsed_KEYWORDS_MISSING_VALUES)
message(FATAL_ERROR "Missing values for: ${parsed_KEYWORDS_MISSING_VALUES}")
endif()

if(NOT parsed_NAME)
message(FATAL_ERROR "mc_target expects a target name")
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} expects a target name.")
endif()

if(NOT parsed_INPUT)
message(FATAL_ERROR "mc_target expects an input filename")
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} expects an input filename.")
endif()

if(NOT MC_FOUND)
message(WARNING "[MC][${parsed_NAME}] Message compiler is missing. Skipping")
message(
WARNING
"[MC][${parsed_NAME}] Message compiler is missing. Skipping."
)
return()
endif()

Expand Down
2 changes: 1 addition & 1 deletion cmake/cmake/modules/PHP/AddCustomCommand.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function(php_add_custom_command)
)

if(parsed_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Bad arguments: ${parsed_UNPARSED_ARGUMENTS}")
message(FATAL_ERROR "Unrecognized arguments: ${parsed_UNPARSED_ARGUMENTS}")
endif()

if(NOT ARGV0)
Expand Down
6 changes: 3 additions & 3 deletions cmake/cmake/modules/PHP/CheckAttribute.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ function(_php_check_attribute what attribute result)
)

if(parsed_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Bad arguments: ${parsed_UNPARSED_ARGUMENTS}")
message(FATAL_ERROR "Unrecognized arguments: ${parsed_UNPARSED_ARGUMENTS}")
endif()

if(NOT ARGC EQUAL 3)
message(FATAL_ERROR "Missing arguments")
message(FATAL_ERROR "Missing arguments.")
endif()

if(NOT what MATCHES "^(function|variable)$")
Expand All @@ -118,7 +118,7 @@ function(_php_check_attribute what attribute result)
cmake_language(CALL _php_check_attribute_get_${what}_code ${attribute} code)

if(NOT code)
message(FATAL_ERROR "Unsupported attribute '${attribute}'")
message(FATAL_ERROR "Unsupported attribute '${attribute}'.")
endif()

check_source_compiles(C "${code}" ${result})
Expand Down
4 changes: 2 additions & 2 deletions cmake/cmake/modules/PHP/CheckCompilerFlag.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ function(php_check_compiler_flag lang flag result)
)

if(parsed_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Bad arguments: ${parsed_UNPARSED_ARGUMENTS}")
message(FATAL_ERROR "Unrecognized arguments: ${parsed_UNPARSED_ARGUMENTS}")
endif()

if(NOT ARGC EQUAL 3)
message(FATAL_ERROR "Missing arguments")
message(FATAL_ERROR "Missing arguments.")
endif()

if(NOT CMAKE_REQUIRED_QUIET)
Expand Down
6 changes: 3 additions & 3 deletions cmake/cmake/modules/PHP/ConfigureFile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ function(_php_configure_file_parse_variables)
)

if(parsed_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Bad arguments: ${parsed_UNPARSED_ARGUMENTS}")
message(FATAL_ERROR "Unrecognized arguments: ${parsed_UNPARSED_ARGUMENTS}")
endif()

if(NOT ARGV0)
message(
FATAL_ERROR
"${CMAKE_CURRENT_FUNCTION} expects 1st argument"
"${CMAKE_CURRENT_FUNCTION} expects 1st argument."
)
endif()

Expand Down Expand Up @@ -153,7 +153,7 @@ function(php_configure_file)
)

if(parsed_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Bad arguments: ${parsed_UNPARSED_ARGUMENTS}")
message(FATAL_ERROR "Unrecognized arguments: ${parsed_UNPARSED_ARGUMENTS}")
endif()

if(NOT parsed_INPUT AND NOT parsed_CONTENT)
Expand Down
2 changes: 1 addition & 1 deletion cmake/cmake/modules/PHP/Extensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function(_php_extensions_sort)
)

if(parsed_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Bad arguments: ${parsed_UNPARSED_ARGUMENTS}")
message(FATAL_ERROR "Unrecognized arguments: ${parsed_UNPARSED_ARGUMENTS}")
endif()

set(result ${ARGV0})
Expand Down
2 changes: 1 addition & 1 deletion cmake/cmake/modules/PHP/Install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function(_php_install_set_absolute_special var)
else()
message(
FATAL_ERROR
"CMAKE_INSTALL_${var} is not a special-case GNU standard variable")
"CMAKE_INSTALL_${var} is not a special-case GNU standard variable.")
endif()

if(IS_ABSOLUTE "${CMAKE_INSTALL_${var}}")
Expand Down
18 changes: 12 additions & 6 deletions cmake/cmake/modules/PHP/PkgConfigGenerator.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ function(_pkgconfig_parse_variables variables)
if(NOT modulus EQUAL 0)
message(
FATAL_ERROR
"The keyword VARIABLES must be a list of pairs - variable-name and "
"value (it must contain an even number of items)."
"The keyword VARIABLES must be a list of pairs - variable-name and value "
"(it must contain an even number of items)."
)
endif()

Expand Down Expand Up @@ -138,19 +138,25 @@ function(pkgconfig_generate_pc)
)

if(parsed_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Bad arguments: ${parsed_UNPARSED_ARGUMENTS}")
message(FATAL_ERROR "Unrecognized arguments: ${parsed_UNPARSED_ARGUMENTS}")
endif()

if(parsed_TARGET AND NOT TARGET ${parsed_TARGET})
message(FATAL_ERROR "${parsed_TARGET} is not a target")
message(FATAL_ERROR "${parsed_TARGET} is not a target.")
endif()

if(NOT ARGV0)
message(FATAL_ERROR "pkgconfig_generate_pc expects a template file name")
message(
FATAL_ERROR
"${CMAKE_CURRENT_FUNCTION} expects a template file name."
)
endif()

if(NOT ARGV1)
message(FATAL_ERROR "pkgconfig_generate_pc expects an output file name")
message(
FATAL_ERROR
"${CMAKE_CURRENT_FUNCTION} expects an output file name."
)
endif()

set(template "${ARGV0}")
Expand Down
6 changes: 3 additions & 3 deletions cmake/cmake/modules/PHP/SearchLibraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ function(php_search_libraries)
)

if(parsed_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Bad arguments: ${parsed_UNPARSED_ARGUMENTS}")
message(FATAL_ERROR "Unrecognized arguments: ${parsed_UNPARSED_ARGUMENTS}")
endif()

if(NOT parsed_HEADERS)
message(FATAL_ERROR "php_search_libraries: missing HEADERS")
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION}: missing HEADERS")
endif()

set(symbol ${ARGV0})
Expand Down Expand Up @@ -220,7 +220,7 @@ function(php_search_libraries)
list(GET parsed_TARGET 0 target)

if(NOT TARGET ${target})
message(FATAL_ERROR "Bad TARGET arguments: ${target} is not a target")
message(FATAL_ERROR "Bad TARGET arguments: ${target} is not a target.")
endif()

list(LENGTH parsed_TARGET length)
Expand Down
12 changes: 6 additions & 6 deletions cmake/cmake/modules/PHP/Set.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,14 @@ endfunction()
# Validate parsed arguments.
function(_php_set_validate_arguments arguments)
if(parsed_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Bad arguments: ${parsed_UNPARSED_ARGUMENTS}")
message(FATAL_ERROR "Unrecognized arguments: ${parsed_UNPARSED_ARGUMENTS}")
endif()

if(
NOT DEFINED parsed_VALUE
AND (NOT DEFINED parsed_CHOICES OR NOT parsed_TYPE STREQUAL "STRING")
)
message(FATAL_ERROR "Missing VALUE argument")
message(FATAL_ERROR "Missing VALUE argument.")
endif()

if(NOT parsed_TYPE)
Expand All @@ -340,22 +340,22 @@ function(_php_set_validate_arguments arguments)
endif()

if(DEFINED parsed_CHOICES AND NOT parsed_TYPE STREQUAL "STRING")
message(FATAL_ERROR "CHOICES argument can be only used with TYPE STRING")
message(FATAL_ERROR "CHOICES argument can be only used with TYPE STRING.")
endif()

list(FIND arguments ELSE_VALUE elseValueIndex)
if(NOT DEFINED parsed_IF AND NOT elseValueIndex EQUAL -1)
message(FATAL_ERROR "Redundant ELSE_VALUE argument without IF condition")
message(FATAL_ERROR "Redundant ELSE_VALUE argument without IF condition.")
elseif(
DEFINED parsed_IF
AND NOT DEFINED parsed_ELSE_VALUE
AND NOT elseValueIndex EQUAL -1
)
message(FATAL_ERROR "Missing ELSE_VALUE argument")
message(FATAL_ERROR "Missing ELSE_VALUE argument.")
endif()

if(NOT DEFINED parsed_DOC)
message(FATAL_ERROR "Missing DOC argument")
message(FATAL_ERROR "Missing DOC argument.")
endif()
endfunction()

Expand Down
3 changes: 1 addition & 2 deletions cmake/ext/bz2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ if(TARGET BZip2::BZip2)
message(
FATAL_ERROR
"BZip2 package is not working as expected. The bz2 extension requires "
"BZip2 library (libbzip2) version ${PHP_BZIP2_MIN_VERSION} or later. "
"Please see the CMake logs."
"BZip2 library (libbzip2) version ${PHP_BZIP2_MIN_VERSION} or later."
)
endif()
endif()
Expand Down
6 changes: 1 addition & 5 deletions cmake/ext/curl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,7 @@ if(TARGET CURL::libcurl)
)

if(NOT HAVE_CURL_EASY_PERFORM)
message(
FATAL_ERROR
"The curl_easy_perform() couldn't be found. Please check logs for more "
"information."
)
message(FATAL_ERROR "The 'curl_easy_perform()' couldn't be found.")
endif()
endif()

Expand Down
Loading

0 comments on commit 7f4d0a1

Please sign in to comment.