The most time, defining (and exporting) CFLAGS and CXXFLAGS options
before using cmake is enough.
For UNIX Makefiles generation/use, cmake options can be specified in cmake/compiler/ directory files.
For instance for GCC, options can be defined in file:
When using in Eclipse CDT, options can be updated/adapted in file which is produced in same time of Eclipse project Metadata files:
For instance, it is then possible to add options to gcc with CMAKE_CXX_FLAGS:STRING and CMAKE_C_FLAGS:STRING.