See this comment from @eldiener: > Why not have the line: > > add_library(${PARSE_NAME} STATIC EXCLUDE_FROM_ALL ${SOURCES}) > > be instead: > > add_library(${PARSE_NAME} OBJECT EXCLUDE_FROM_ALL ${SOURCES}) > > if it works. This would allow just the creation of object files rather than the creation of a static library, which is overkill in this situation.