1.使用预编译头文件加速编译
inc.h文件
#ifndef _INC_H_
#define _INC_H_
#include<bits/stdc++.h>
#endif
/* Makefile
PCH_H = inc.h
PCH = inc.h.gch
all: $(EXE)
$(OBJS): $(PCH)
$(PCH): $(PCH_H)
$(CC) $(CFLAGS) $> $^
clean:
$(RM) $(PCH) $(OBJS)
*/
参考:
https://blog.csdn.net/liuhhaiffeng/article/details/52571508
https://www.cnblogs.com/xliang1015/p/7283432.html
2.使用ccache做编译缓存
网友评论