add cache file option to autoconf executor by default (if cflags and ldflags match default)

This commit is contained in:
DubbleClick 2025-07-02 11:47:36 +07:00
parent 5577cd0fab
commit abe27598de
2 changed files with 9 additions and 9 deletions

View File

@ -117,6 +117,11 @@ class UnixShell
return trim($str); return trim($str);
} }
public function getEnv(): array
{
return $this->env;
}
private function getExecString(string $cmd): string private function getExecString(string $cmd): string
{ {
logger()->debug('Executed at: ' . debug_backtrace()[0]['file'] . ':' . debug_backtrace()[0]['line']); logger()->debug('Executed at: ' . debug_backtrace()[0]['file'] . ':' . debug_backtrace()[0]['line']);
@ -129,9 +134,4 @@ class UnixShell
} }
return $cmd; return $cmd;
} }
public function getEnv(): array
{
return $this->env;
}
} }

View File

@ -53,7 +53,7 @@ class UnixAutoconfExecutor extends Executor
/** /**
* Run make * Run make
* *
* @param string $target Build target * @param string $target Build target
* @throws RuntimeException * @throws RuntimeException
*/ */
public function make(string $target = '', false|string $with_install = 'install', bool $with_clean = true, array $after_env_vars = []): static public function make(string $target = '', false|string $with_install = 'install', bool $with_clean = true, array $after_env_vars = []): static
@ -79,9 +79,9 @@ class UnixAutoconfExecutor extends Executor
* Add optional library configuration. * Add optional library configuration.
* This method checks if a library is available and adds the corresponding arguments to the CMake configuration. * This method checks if a library is available and adds the corresponding arguments to the CMake configuration.
* *
* @param string $name library name to check * @param string $name library name to check
* @param \Closure|string $true_args arguments to use if the library is available (allow closure, returns string) * @param \Closure|string $true_args arguments to use if the library is available (allow closure, returns string)
* @param string $false_args arguments to use if the library is not available * @param string $false_args arguments to use if the library is not available
* @return $this * @return $this
*/ */
public function optionalLib(string $name, \Closure|string $true_args, string $false_args = ''): static public function optionalLib(string $name, \Closure|string $true_args, string $false_args = ''): static