Add GCC options to top of C source file

后端 未结 2 583
野趣味
野趣味 2020-12-30 08:02

Is is possible to put something at the top of the C source file, like

// GCC_OPTIONS=-g,-Wall

that will add those options automatically to

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-30 08:46

    No. Some compiler options have #define equivalents, but not those. This belongs in your make file (or equivalent). With GNU Make:

    CFLAGS += -g -Wall
    

提交回复
热议问题