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