Skip to content

Commit 059d134

Browse files
committed
Remove unused cmake things
1 parent f7871c0 commit 059d134

File tree

4 files changed

+0
-31
lines changed

4 files changed

+0
-31
lines changed

src/SPC/builder/freebsd/BSDBuilder.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ public function __construct(array $options = [])
4747
// cflags
4848
$this->arch_c_flags = SystemUtil::getArchCFlags($this->getOption('arch'));
4949
$this->arch_cxx_flags = SystemUtil::getArchCFlags($this->getOption('arch'));
50-
// cmake toolchain
51-
$this->cmake_toolchain_file = SystemUtil::makeCmakeToolchainFile('BSD', $this->getOption('arch'), $this->arch_c_flags);
5250

5351
// create pkgconfig and include dir (some libs cannot create them automatically)
5452
f_mkdir(BUILD_LIB_PATH . '/pkgconfig', recursive: true);

src/SPC/builder/linux/LinuxBuilder.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,6 @@ public function __construct(array $options = [])
4848
// cflags
4949
$this->arch_c_flags = getenv('SPC_DEFAULT_C_FLAGS');
5050
$this->arch_cxx_flags = getenv('SPC_DEFAULT_CXX_FLAGS');
51-
// cmake toolchain
52-
$this->cmake_toolchain_file = SystemUtil::makeCmakeToolchainFile(
53-
'Linux',
54-
$arch,
55-
$this->arch_c_flags,
56-
getenv('CC'),
57-
getenv('CXX'),
58-
);
5951

6052
// cross-compiling is not supported yet
6153
/*if (php_uname('m') !== $this->arch) {

src/SPC/builder/macos/MacOSBuilder.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ public function __construct(array $options = [])
3636
// cflags
3737
$this->arch_c_flags = getenv('SPC_DEFAULT_C_FLAGS');
3838
$this->arch_cxx_flags = getenv('SPC_DEFAULT_CXX_FLAGS');
39-
// cmake toolchain
40-
$this->cmake_toolchain_file = SystemUtil::makeCmakeToolchainFile('Darwin', getenv('SPC_ARCH'), $this->arch_c_flags);
4139

4240
// create pkgconfig and include dir (some libs cannot create them automatically)
4341
f_mkdir(BUILD_LIB_PATH . '/pkgconfig', recursive: true);

src/SPC/builder/unix/UnixBuilderBase.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use SPC\builder\BuilderBase;
88
use SPC\builder\freebsd\library\BSDLibraryBase;
99
use SPC\builder\linux\library\LinuxLibraryBase;
10-
use SPC\builder\linux\LinuxBuilder;
1110
use SPC\builder\macos\library\MacOSLibraryBase;
1211
use SPC\exception\FileSystemException;
1312
use SPC\exception\RuntimeException;
@@ -25,9 +24,6 @@ abstract class UnixBuilderBase extends BuilderBase
2524
/** @var string C++ flags */
2625
public string $arch_cxx_flags;
2726

28-
/** @var string cmake toolchain file */
29-
public string $cmake_toolchain_file;
30-
3127
/**
3228
* @throws WrongUsageException
3329
* @throws FileSystemException
@@ -56,21 +52,6 @@ public function getAllStaticLibFiles(): array
5652
return array_map(fn ($x) => realpath(BUILD_LIB_PATH . "/{$x}"), $libFiles);
5753
}
5854

59-
/**
60-
* Return generic cmake options when configuring cmake projects
61-
*/
62-
public function makeCmakeArgs(): string
63-
{
64-
$extra = $this instanceof LinuxBuilder ? '-DCMAKE_C_COMPILER=' . getenv('CC') . ' ' : '';
65-
return $extra .
66-
'-DCMAKE_BUILD_TYPE=Release ' .
67-
'-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' ' .
68-
'-DCMAKE_INSTALL_BINDIR=bin ' .
69-
'-DCMAKE_INSTALL_LIBDIR=lib ' .
70-
'-DCMAKE_INSTALL_INCLUDEDIR=include ' .
71-
"-DCMAKE_TOOLCHAIN_FILE={$this->cmake_toolchain_file}";
72-
}
73-
7455
/**
7556
* Generate configure flags
7657
*/

0 commit comments

Comments
 (0)