[CMake] Adding CFLAGS at build time

Leif Walsh leif.walsh at gmail.com
Sat Jun 2 10:16:21 EDT 2012


With plain makefiles or autotools, I can do 'make CFLAGS=-Wno-unused-but-set-variable' or something to try out flags when building without setting it in the makefiles yet. Is there a way to do this in cmake, or is the only way to reconfigure with 'cmake -DCMAKE_C_FLAGS=-Wno-unused-but-set-variable' each time I want to change it?

Sent from my iPhone


More information about the CMake mailing list