diff options
author | Brad King <brad.king@kitware.com> | 2021-06-29 16:53:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-06-29 16:55:35 (GMT) |
commit | c6aaaf066a39485bf34869ccae5b5d4fac04f0b9 (patch) | |
tree | f282bf71a39e71131c3cba6324f4b4cea0f8c256 /Modules/DummyCXXFile.cxx | |
parent | fb02657b6a4f66cfb1b1673c170136f07945eda2 (diff) | |
download | CMake-c6aaaf066a39485bf34869ccae5b5d4fac04f0b9.zip CMake-c6aaaf066a39485bf34869ccae5b5d4fac04f0b9.tar.gz CMake-c6aaaf066a39485bf34869ccae5b5d4fac04f0b9.tar.bz2 |
DetermineCompiler: Restore identification of MSVC with no INCLUDE dirs
Since commit bd844387df (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.
Diffstat (limited to 'Modules/DummyCXXFile.cxx')
0 files changed, 0 insertions, 0 deletions