1、安装jdk
2、安装ninja
git clonehttps://github.com/ninja-build/ninja.git
cd ninja
./configure.py --bootstrap
cp ninja ~/bin/
3、安装blade
git clonehttps://github.com/chen3feng/blade-build.git
./install.sh
echo "export PATH=$PATH:~/bin/" >> ~/.bash_profile
4、测试blade是否安装成功
mkdir test && cd test
touch BLADE_ROOT #建空文件
touch BUILD hello.cpp
cc_binary( name = 'hello_test', srcs = [ 'hello.cpp' ] )
#include <iostream>//using namespace std;int main() { std::cout << "Hello World" << std::endl;}
blade build .
5、运行编译成功的文件
cd build64_release
./hello_test
网友评论