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

DetermineCompiler: Restore identification of MSVC with no INCLUDE or LIB

Update the change from commit c6aaaf06 (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.
parent e610e99a
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
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