COMPILE_OPTIONS combines its elements in a way incompatible with GCC -include
GCC has a switch "-include " that must be repeated for each file. Using COMPILE_OPTIONS for more than one file leads to invalid arguments.
set_property (TARGET foo COMPILE_OPTIONS -include file1.h -include file2.h)
generates invalid arguments -include file1.h file2.h
instead of -include file1.h -include file2.h
.