Merge topic 'compiler-id-msvc-has-include'

c6aaaf066a DetermineCompiler: Restore identification of MSVC with no INCLUDE dirs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6284
This commit is contained in:
Brad King
2021-06-30 11:26:14 +00:00
committed by Kitware Robot
2 changed files with 8 additions and 0 deletions

View File

@@ -85,6 +85,10 @@ else()
# ARMClang need target options
"--target=arm-arm-none-eabi -mcpu=cortex-m3"
# MSVC needs at least one include directory for __has_include to function,
# but custom toolchains may run MSVC with no INCLUDE env var and no -I flags.
"-I__does_not_exist__"
)
endif()
if(CMAKE_C_COMPILER_TARGET)

View File

@@ -80,6 +80,10 @@ else()
# ARMClang need target options
"--target=arm-arm-none-eabi -mcpu=cortex-m3"
# MSVC needs at least one include directory for __has_include to function,
# but custom toolchains may run MSVC with no INCLUDE env var and no -I flags.
"-I__does_not_exist__"
)
endif()