mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-10 18:35:35 +08:00
Remove unused cmake things
This commit is contained in:
@@ -47,8 +47,6 @@ class BSDBuilder extends UnixBuilderBase
|
|||||||
// cflags
|
// cflags
|
||||||
$this->arch_c_flags = SystemUtil::getArchCFlags($this->getOption('arch'));
|
$this->arch_c_flags = SystemUtil::getArchCFlags($this->getOption('arch'));
|
||||||
$this->arch_cxx_flags = SystemUtil::getArchCFlags($this->getOption('arch'));
|
$this->arch_cxx_flags = SystemUtil::getArchCFlags($this->getOption('arch'));
|
||||||
// cmake toolchain
|
|
||||||
$this->cmake_toolchain_file = SystemUtil::makeCmakeToolchainFile('BSD', $this->getOption('arch'), $this->arch_c_flags);
|
|
||||||
|
|
||||||
// create pkgconfig and include dir (some libs cannot create them automatically)
|
// create pkgconfig and include dir (some libs cannot create them automatically)
|
||||||
f_mkdir(BUILD_LIB_PATH . '/pkgconfig', recursive: true);
|
f_mkdir(BUILD_LIB_PATH . '/pkgconfig', recursive: true);
|
||||||
|
|||||||
@@ -48,14 +48,6 @@ class LinuxBuilder extends UnixBuilderBase
|
|||||||
// cflags
|
// cflags
|
||||||
$this->arch_c_flags = getenv('SPC_DEFAULT_C_FLAGS');
|
$this->arch_c_flags = getenv('SPC_DEFAULT_C_FLAGS');
|
||||||
$this->arch_cxx_flags = getenv('SPC_DEFAULT_CXX_FLAGS');
|
$this->arch_cxx_flags = getenv('SPC_DEFAULT_CXX_FLAGS');
|
||||||
// cmake toolchain
|
|
||||||
$this->cmake_toolchain_file = SystemUtil::makeCmakeToolchainFile(
|
|
||||||
'Linux',
|
|
||||||
$arch,
|
|
||||||
$this->arch_c_flags,
|
|
||||||
getenv('CC'),
|
|
||||||
getenv('CXX'),
|
|
||||||
);
|
|
||||||
|
|
||||||
// cross-compiling is not supported yet
|
// cross-compiling is not supported yet
|
||||||
/*if (php_uname('m') !== $this->arch) {
|
/*if (php_uname('m') !== $this->arch) {
|
||||||
|
|||||||
@@ -36,8 +36,6 @@ class MacOSBuilder extends UnixBuilderBase
|
|||||||
// cflags
|
// cflags
|
||||||
$this->arch_c_flags = getenv('SPC_DEFAULT_C_FLAGS');
|
$this->arch_c_flags = getenv('SPC_DEFAULT_C_FLAGS');
|
||||||
$this->arch_cxx_flags = getenv('SPC_DEFAULT_CXX_FLAGS');
|
$this->arch_cxx_flags = getenv('SPC_DEFAULT_CXX_FLAGS');
|
||||||
// cmake toolchain
|
|
||||||
$this->cmake_toolchain_file = SystemUtil::makeCmakeToolchainFile('Darwin', getenv('SPC_ARCH'), $this->arch_c_flags);
|
|
||||||
|
|
||||||
// create pkgconfig and include dir (some libs cannot create them automatically)
|
// create pkgconfig and include dir (some libs cannot create them automatically)
|
||||||
f_mkdir(BUILD_LIB_PATH . '/pkgconfig', recursive: true);
|
f_mkdir(BUILD_LIB_PATH . '/pkgconfig', recursive: true);
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ namespace SPC\builder\unix;
|
|||||||
use SPC\builder\BuilderBase;
|
use SPC\builder\BuilderBase;
|
||||||
use SPC\builder\freebsd\library\BSDLibraryBase;
|
use SPC\builder\freebsd\library\BSDLibraryBase;
|
||||||
use SPC\builder\linux\library\LinuxLibraryBase;
|
use SPC\builder\linux\library\LinuxLibraryBase;
|
||||||
use SPC\builder\linux\LinuxBuilder;
|
|
||||||
use SPC\builder\macos\library\MacOSLibraryBase;
|
use SPC\builder\macos\library\MacOSLibraryBase;
|
||||||
use SPC\exception\FileSystemException;
|
use SPC\exception\FileSystemException;
|
||||||
use SPC\exception\RuntimeException;
|
use SPC\exception\RuntimeException;
|
||||||
@@ -25,9 +24,6 @@ abstract class UnixBuilderBase extends BuilderBase
|
|||||||
/** @var string C++ flags */
|
/** @var string C++ flags */
|
||||||
public string $arch_cxx_flags;
|
public string $arch_cxx_flags;
|
||||||
|
|
||||||
/** @var string cmake toolchain file */
|
|
||||||
public string $cmake_toolchain_file;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws WrongUsageException
|
* @throws WrongUsageException
|
||||||
* @throws FileSystemException
|
* @throws FileSystemException
|
||||||
@@ -56,21 +52,6 @@ abstract class UnixBuilderBase extends BuilderBase
|
|||||||
return array_map(fn ($x) => realpath(BUILD_LIB_PATH . "/{$x}"), $libFiles);
|
return array_map(fn ($x) => realpath(BUILD_LIB_PATH . "/{$x}"), $libFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return generic cmake options when configuring cmake projects
|
|
||||||
*/
|
|
||||||
public function makeCmakeArgs(): string
|
|
||||||
{
|
|
||||||
$extra = $this instanceof LinuxBuilder ? '-DCMAKE_C_COMPILER=' . getenv('CC') . ' ' : '';
|
|
||||||
return $extra .
|
|
||||||
'-DCMAKE_BUILD_TYPE=Release ' .
|
|
||||||
'-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' ' .
|
|
||||||
'-DCMAKE_INSTALL_BINDIR=bin ' .
|
|
||||||
'-DCMAKE_INSTALL_LIBDIR=lib ' .
|
|
||||||
'-DCMAKE_INSTALL_INCLUDEDIR=include ' .
|
|
||||||
"-DCMAKE_TOOLCHAIN_FILE={$this->cmake_toolchain_file}";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate configure flags
|
* Generate configure flags
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user