On Windows find_path returns a path with a lowercase drive letter (e.g. “c:/cross-sdk/sysroots/target/usr/include”). The CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES variables however contain upper case drive letters (e.g. “C:/cross-sdk/sysroots/target/usr/include”).
If find_path happens to find a file in such an implicit include directory, this directory gets added to the compiler command line nonetheless. In case of imported targets this happens by default using the “-isystem” flag which then breaks GCC’s include path search order.
Is this a bug? Is there a workaround?