Ninja安装和基本使用
ninja
a small build system with a focus on speed
项目地址:https://gitcode.com/gh_mirrors/ni/ninja
·
Ninja是一个比Make更快速的小型构建系统。其github地址为:https://ninja-build.org/
Ninja源码安装
构造Ninja可使用CMake或python,需要先安装re2c:
- 安装re2c。下载地址:http://re2c.org/index.html
tar -xvzf re2c-1.0.3.tar.gz
cd re2c-1.0.3/
autoreconf -i -W all(没有configure可以先执行Autotools)
./configure
make
make install
-
re2c安装成功之后开始Ninja安装。
-
Ninja编译
git clone git://github.com/ninja-build/ninja.git && cd ninja
./configure.py --bootstrap
cp ninja /usr/bin/
- 安装成功之后使用
ninja --version可查看安装的版本
[zgl@aoide build]$ ninja --version
1.9.0
基本使用
// 0-basc.sh
#!/bin/bash
INSTALL_PREFIX=/home/zgl/test
GCC_DIR=/home/zgl/gcc8.2.0
CMAKE_OPTIONS="-G Ninja ...." //加上一些自己配置
// 1-setup.sh
#!/bin/bash
. 0-basc.sh
mkdir build && cd build
cmake $CMAKE_OPTIONS
ninja -j 64
ninja install
a small build system with a focus on speed
最近提交(Master分支:3 个月前 )
c74beb43
I think this also switches from Intel to ARM, let's see how it goes.
6 天前
4b72b15a
Fix unit test crash, if test fails 27 天前
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐



所有评论(0)