Search code examples
cmakefilegcc-warning

how to add -Wno-deprecated to make command CFLAG variable to eliminate deprecated warnings


Tried:

make all CFLAGS += -D-Wno-deprecated

yields:

make: *** empty variable name. Stop.


Solution

  • Do not use spaces around += and do not use -D: make all CFLAGS+=-Wno-deprecated.