Skip to content
Snippets Groups Projects
Commit c6aaaf06 authored by Brad King's avatar Brad King
Browse files

DetermineCompiler: Restore identification of MSVC with no INCLUDE dirs

Since commit bd844387 (ROCMClang: Add the ROCm toolkit derived clang
compiler to CMake, 2020-08-28, v3.21.0-rc1~66^2~6), our generated
compiler id source file contains a preprocessor condition of the form

    #elif ... && __has_include(...)

When MSVC is invoked with no include directories in the `INCLUDE`
environment variable or in `-I` flags, its implementation of
`__has_include` errors out immediately.  This breaks identification of
the compiler.

Work around the problem by adding a fallback attempt to compile the
identification source using a dummy include directory.
parent fb02657b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment