For unity targets, the PREFIX and SUFFIX target properties were being
copied so that library output file names would make the non-unity
target. However, this wasn't the case for IMPORT_PREFIX and
IMPORT_SUFFIX which control the import library file name on Windows. As
a result, the unity target and the original target differed in the
output file name for import libraries.
This fix simply adds IMPORT_PREFIX and IMPORT_SUFFIX to the list of
properties being copied from the original target.
The external command was being invoked with arguments: ["clang", ...,
"-isystem /foo/bar/baz", ...], which meant that the compiler treated
the whitespace between the flag and the path as being part of the path
itself. (i.e. it was looking for " /foo/bar/baz").
Fixed by passing the argument to execute_process() as
'-isystem/foo/bar/baz'; I also needed to ensure we normalized the value
of CMAKE_INCLUDE_SYSTEM_FLAG_<LANG>, which itself contains trailing
whitespace in some cases.
If the compiler understands system include paths it exposes the
necessary flag within the CMAKE_INCLUDE_SYSTEM_FLAG_${LANG}
variable.
System include paths for targets could be queried via the target
property INTERFACE_SYSTEM_INCLUDE_DIRECTORIES. Here the system
include paths are listed in addition of being available in
the INTERFACE_INCLUDE_DIRECTORIES property.
Note: Currently there is no way to query the SYSTEM flag for
directory include properties.