diff --git a/bin/init.cmake b/bin/init.cmake index 6b514879..45cee735 100755 --- a/bin/init.cmake +++ b/bin/init.cmake @@ -14,7 +14,7 @@ Usage: cmake -P bin/init.cmake #]=============================================================================] -cmake_minimum_required(VERSION 3.25) +cmake_minimum_required(VERSION 3.25...3.31) if(NOT CMAKE_SCRIPT_MODE_FILE) message(FATAL_ERROR "This is a command-line script.") diff --git a/bin/php.cmake b/bin/php.cmake index 6de37ef8..c6c25ce3 100755 --- a/bin/php.cmake +++ b/bin/php.cmake @@ -33,7 +33,7 @@ Usage examples: ./bin/php.cmake #]=============================================================================] -cmake_minimum_required(VERSION 3.25) +cmake_minimum_required(VERSION 3.25...3.31) if(NOT CMAKE_SCRIPT_MODE_FILE) message(FATAL_ERROR "This is a command-line script.") diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 792d2322..050edd11 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -5,7 +5,6 @@ include(cmake/CMakeDefaults.cmake) message(STATUS "Initializing PHP build system") message(STATUS "=============================") - message(STATUS "CMake version: ${CMAKE_VERSION}") message(STATUS "CMake generator: ${CMAKE_GENERATOR}") diff --git a/cmake/cmake/scripts/GenerateCredits.cmake b/cmake/cmake/scripts/GenerateCredits.cmake index 2a158b19..b0b048e7 100755 --- a/cmake/cmake/scripts/GenerateCredits.cmake +++ b/cmake/cmake/scripts/GenerateCredits.cmake @@ -31,8 +31,10 @@ set(template [[ ]]) file(GLOB credits ${PHP_SOURCE_DIR}/*/*/CREDITS) +# Case-sensitive filtering, GLOB on macOS/Windows is case-insensitive. +list(FILTER credits INCLUDE REGEX ".*CREDITS$") -foreach(credit ${credits}) +foreach(credit IN LISTS credits) cmake_path(GET credit PARENT_PATH dir) cmake_path(GET dir PARENT_PATH dir) cmake_path(GET dir FILENAME dir) @@ -46,7 +48,7 @@ endforeach() list(REMOVE_DUPLICATES dirs) -foreach(dir ${dirs}) +foreach(dir IN LISTS dirs) list(SORT ${dir}_credits CASE INSENSITIVE) list(JOIN ${dir}_credits ";\n" content) set(content "${template}${content};\n") diff --git a/cmake/ext/standard/CMakeLists.txt b/cmake/ext/standard/CMakeLists.txt index 7c01600a..6b52aefc 100644 --- a/cmake/ext/standard/CMakeLists.txt +++ b/cmake/ext/standard/CMakeLists.txt @@ -496,6 +496,8 @@ check_symbol_exists( block() file(GLOB credits ${PHP_SOURCE_DIR}/*/*/CREDITS) + # Case-sensitive filtering, GLOB on macOS/Windows is case-insensitive. + list(FILTER credits INCLUDE REGEX ".*CREDITS$") # The CODEGEN keyword adds the custom command to a global 'codegen' target. set(codegen "")