Fixup formatting
It turns out that src/config.h
is not marked as GENERATED
by CMake because it is generated at the configure time by CMake and not at the build time by the build system backend (e.g. GNU Make). Therefore, we have to exclude the file from the list of formatted source files explicitly. This makes the EXCLUDE_GENERATED
argument to the list_sources
function redundant (currently, we don't have GENERATED
source files at all). Since it is likely that cmake/list_sources.cmake
will be copied to other projects, I added an AUTHOR_WARNING
emitted when the EXCLUDE_GENERATED
is passed to the function but an old version of CMake is used (the limitation comes from the fact that we need to read the source file property from the directory scope, see here)