mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-15 22:35:33 -05:00
DetermineCompiler: Restore identification of MSVC with no INCLUDE or LIB
Update the change from commit c6aaaf066a (DetermineCompiler: Restore
identification of MSVC with no INCLUDE dirs, 2021-06-29,
v3.21.0-rc2~6^2) to also work with no `LIB` dirs. Add the `-c` flag to
compile an object file without linking.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user