icx on Windows supports -external:I

Hi,

We use Intel oneAPI 2023.2.0 on Windows with VS2019 installed and found out that icx supports the -external:I option for suppressing warnings from includes which came from these paths.
We use Ninja generator on Windows.
Unfortunately we have to set manually
set ( CMAKE_INCLUDE_SYSTEM_FLAG_C -external:I )
set ( CMAKE_INCLUDE_SYSTEM_FLAG_CXX -external:I )
since these are empty after CMake configure.

So I would ask if this can be fixed in CMake the future.

Best regards
Frank

Is 2023.2.0 when they introduced the flag? I suppose the version check can be adapted in the future if it turns out to be too high.

https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8722

1 Like