[mixed] refactor with putenv, fix imagemagick and c++ build

This commit is contained in:
crazywhalecc
2023-10-23 00:37:28 +08:00
parent 5934e5e881
commit c84eb723ec
52 changed files with 205 additions and 168 deletions

View File

@@ -21,9 +21,6 @@ trait UnixBuilderTrait
/** @var string cmake toolchain file */
public string $cmake_toolchain_file;
/** @var string configure environments */
public string $configure_env;
/**
* @throws WrongUsageException
* @throws FileSystemException
@@ -145,7 +142,7 @@ trait UnixBuilderTrait
*/
public function makeCmakeArgs(): string
{
$extra = $this instanceof LinuxBuilder ? '-DCMAKE_C_COMPILER=' . $this->getOption('cc') . ' ' : '';
$extra = $this instanceof LinuxBuilder ? '-DCMAKE_C_COMPILER=' . getenv('CC') . ' ' : '';
return $extra .
'-DCMAKE_BUILD_TYPE=Release ' .
'-DCMAKE_INSTALL_PREFIX=/ ' .