Switching between two macro values
Hi All,
I would like to know if there is some easy way how to switch between two states: macro is defined and macro is not defined? This project uses static Makefile (no cmake is allowed) and the value of macro is defined using environment variable like:
CFLAGS="-DWITH_JSON_C" LDFLAGS="-ljson-c" make
I have many #ifdef WITH_JSON_C in my code and I would love to easily switch between the these two states directly in the CLion to see impact on the code in editor.
I know that I can use some workaround and define macro in some .h file, but it is easy to forget this temporary change in the file.
Thanks in advance,
Jiri
请先登录再写评论。