diff options
author | Brad King <brad.king@kitware.com> | 2021-07-02 12:05:00 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-07-02 12:05:53 (GMT) |
commit | da48ee53ae83e060ac624aed7cc96f506d0f1fc0 (patch) | |
tree | 68d126502012e923ee2f4d42aa9c1b5fc0546cae | |
parent | 6f93d2f713a8fe3f3426cc50f58b87372539feaf (diff) | |
parent | e93245ec64bec6e5f63388e4b4714c7a9d3cbf51 (diff) | |
download | CMake-da48ee53ae83e060ac624aed7cc96f506d0f1fc0.zip CMake-da48ee53ae83e060ac624aed7cc96f506d0f1fc0.tar.gz CMake-da48ee53ae83e060ac624aed7cc96f506d0f1fc0.tar.bz2 |
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
-rw-r--r-- | Modules/CMakeDetermineCCompiler.cmake | 3 | ||||
-rw-r--r-- | Modules/CMakeDetermineCXXCompiler.cmake | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index ca497f1..0f80f9c 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -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) diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index e297f90..556518f 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -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() |