Merge topic 'compiler-id-msvc-no-lib' into release-3.21

e93245ec64 DetermineCompiler: Restore identification of MSVC with no INCLUDE or LIB

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6295
This commit is contained in:
Brad King
2021-07-02 12:05:00 +00:00
committed by Kitware Robot
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -88,7 +88,8 @@ else()
# 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__"
# Also avoid linking so this works with no LIB env var.
"-c -I__does_not_exist__"
)
endif()
if(CMAKE_C_COMPILER_TARGET)
+2 -1
View File
@@ -83,7 +83,8 @@ else()
# 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__"
# Also avoid linking so this works with no LIB env var.
"-c -I__does_not_exist__"
)
endif()