Use the CMake macro #cmakedefine01 in configurable files.
cmakedefine01 allows to perform C preprocessor replacements
that define a variable to 0 or 1 when configure_file is called,
instead of (not) defining the variable (see
https://cmake.org/cmake/help/v2.8.8/cmake.html#command:configure_file
for the 2.8.8 doc).
This ease the defining of config.h variables (no foreach loops
that preset them to 0), but two requirements must be met:
1. variable name must match in cmake and config.h.in
2. no comment on the macro line