mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 21:34:53 +08:00
Add reset function
This commit is contained in:
parent
42943b315c
commit
f7871c0036
@ -20,11 +20,16 @@ class UnixCMakeExecutor extends Executor
|
||||
|
||||
protected int $steps = 3;
|
||||
|
||||
protected bool $reset = true;
|
||||
|
||||
public function build(string $build_pos = '..'): void
|
||||
{
|
||||
// set cmake dir
|
||||
$this->initCMakeBuildDir();
|
||||
FileSystem::resetDir($this->cmake_build_dir);
|
||||
|
||||
if ($this->reset) {
|
||||
FileSystem::resetDir($this->cmake_build_dir);
|
||||
}
|
||||
|
||||
// prepare environment variables
|
||||
$env = [
|
||||
@ -101,6 +106,12 @@ class UnixCMakeExecutor extends Executor
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setReset(bool $reset): static
|
||||
{
|
||||
$this->reset = $reset;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get configure argument line.
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user