How do I add conditional compilation to my make开发者_开发问答file: say if I have a #ifdef SAVE_DATA in a cpp (.cc) file.
Usually something like CXXFLAGS+=-DSAVE_DATA
For gcc et al, you can use the -Dfoo flag to define foo:
g++ -DSAVE_DATA=1 -c foo.cpp
加载中,请稍侯......
精彩评论