来源:https://stackoverflow.com/questions/9052792/how-can-i-pass-a-macro-definition-from-make-command-line-arguments-d-to-c-s
命令:make CFLAGS=-Dvar=42
在 Makefile
内部使用 CFLAGS
CFLAGS+=$(CFLAGS)
添加定义
来源:https://cmake.org/cmake/help/latest/command/add_definitions.html
ADD_DEFINITIONS(-DENAGLE_EASYLOG)