1,在外部文件夹编译中,增加Mekefile文件
#
#
DO_COMPILE = echo -e "\n ---------------"; \
rm -rf $(PWD)/build/; \
mkdir -p $(PWD)/build/; \
cd $(PWD)/build/; cmake $(PWD); make
debug:
@$(DO_COMPILE)
2,直接CD到该文件夹,输入指令
make debug
3,可以直接编译啦,同时还可以增加编译指令,例如
#
#
DO_COMPILE = echo -e "\n -------release--------"; \
rm -rf $(PWD)/build/; \
mkdir -p $(PWD)/build/; \
cd $(PWD)/build/; cmake $(PWD); make
DO_COMPILE1 = echo -e "\n ------debug---------"; \
cd $(PWD)/build/; cmake $(PWD); make
release:
@$(DO_COMPILE)
debug:
@$(DO_COMPILE1)
博客介绍了外部文件夹编译的方法,先在外部文件夹编译中增加Mekefile文件,然后直接CD到该文件夹输入指令即可完成编译,还可增加编译指令。
4196

被折叠的 条评论
为什么被折叠?



