c++ - add #define when a specific flag is used -


i want add #define foo code in header file autotools when used specific flag.

the project have creates static library using header use inline functions example. if use -d option, used @ creation time i'll have add @ each compilation using library want avoid.

how can perform this?

i think best bet generate required header file pre-existing file. following shell command trick:

(echo "#define foo" ; cat myheader_pregen.hpp) > myheader.hpp 

you can incorporate above script autotools this


Comments

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -