diff --git a/src/SPC/builder/unix/executor/UnixCMakeExecutor.php b/src/SPC/builder/unix/executor/UnixCMakeExecutor.php index 068dd965..1cc57954 100644 --- a/src/SPC/builder/unix/executor/UnixCMakeExecutor.php +++ b/src/SPC/builder/unix/executor/UnixCMakeExecutor.php @@ -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. */