add wrong usage exception

This commit is contained in:
crazywhalecc
2023-03-29 21:39:36 +08:00
parent d31e1b00e8
commit b0ac50941f
13 changed files with 67 additions and 18 deletions

View File

@@ -4,6 +4,8 @@ declare(strict_types=1);
namespace SPC\builder\traits;
use SPC\store\FileSystem;
/**
* Unix 系统的工具函数 Trait适用于 Linux、macOS
*/
@@ -48,7 +50,7 @@ CMAKE;
if (PHP_OS_FAMILY === 'Linux') {
$toolchain .= "\nSET(CMAKE_AR \"ar\")";
}
file_put_contents(SOURCE_PATH . '/toolchain.cmake', $toolchain);
FileSystem::writeFile(SOURCE_PATH . '/toolchain.cmake', $toolchain);
return realpath(SOURCE_PATH . '/toolchain.cmake');
}