mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-04 15:25:41 +08:00
force minimum version 3.12 for cmake policies in freetype, only when cmake >= 4
This commit is contained in:
@@ -192,3 +192,21 @@ function f_putenv(string $env): bool
|
||||
logger()->debug('Setting env: ' . $env);
|
||||
return putenv($env);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the installed CMake version
|
||||
*
|
||||
* @return string|null The CMake version or null if it couldn't be determined
|
||||
*/
|
||||
function get_cmake_version(): ?string
|
||||
{
|
||||
try {
|
||||
[,$output] = shell()->execWithResult('cmake --version', false);
|
||||
if (preg_match('/cmake version ([\d.]+)/i', $output[0], $matches)) {
|
||||
return $matches[1];
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
logger()->warning('Failed to get CMake version: ' . $e->getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -13,9 +13,9 @@ declare(strict_types=1);
|
||||
|
||||
// test php version (8.1 ~ 8.4 available, multiple for matrix)
|
||||
$test_php_version = [
|
||||
// '8.1',
|
||||
// '8.2',
|
||||
// '8.3',
|
||||
'8.1',
|
||||
'8.2',
|
||||
'8.3',
|
||||
'8.4',
|
||||
];
|
||||
|
||||
@@ -23,7 +23,7 @@ $test_php_version = [
|
||||
$test_os = [
|
||||
// 'macos-13',
|
||||
// 'macos-14',
|
||||
'macos-15',
|
||||
// 'macos-15',
|
||||
'ubuntu-latest',
|
||||
// 'ubuntu-22.04',
|
||||
// 'ubuntu-24.04',
|
||||
|
||||
Reference in New Issue
Block a user