summaryrefslogtreecommitdiff
path: root/Modules/CMakeCCompiler.cmake.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-09-17 11:07:40 -0400
committerBrad King <brad.king@kitware.com>2021-09-17 12:17:35 -0400
commita136b6ec986b3e69184d7b07997d81a7cdd720dd (patch)
treee39b813faa6cde72c4bf3b2d665f11690b1b016e /Modules/CMakeCCompiler.cmake.in
parent39c5dad0cb67f75e745551ef393316725a4124db (diff)
downloadcmake-a136b6ec986b3e69184d7b07997d81a7cdd720dd.tar.gz
MINGW: Define variable only when targeting Windows platforms
The `MINGW` variable indicates that the compiler targets MinGW, a GNU ABI on Windows. Since commit aff3147917 (Modernize GNU compiler info on Windows, 2009-12-02, v2.8.2~636), we load the `Platform/Windows-GNU` module for compilers targetin MinGW, so set the variable there instead. This is equivalent to `Platform/Windows-MSVC` setting the `MSVC` variable. Also remove `if(MINGW)` checks from the module, which have not been necessary since the enclosed logic was moved to that module. The undocumented `CMAKE_COMPILER_IS_MINGW` internal variable is now unused, so remove it too. Fixes: #22647
Diffstat (limited to 'Modules/CMakeCCompiler.cmake.in')
-rw-r--r--Modules/CMakeCCompiler.cmake.in4
1 files changed, 0 insertions, 4 deletions
diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in
index 075a71319b..6818381503 100644
--- a/Modules/CMakeCCompiler.cmake.in
+++ b/Modules/CMakeCCompiler.cmake.in
@@ -30,13 +30,9 @@ set(CMAKE_COMPILER_IS_GNUCC @CMAKE_COMPILER_IS_GNUCC@)
set(CMAKE_C_COMPILER_LOADED 1)
set(CMAKE_C_COMPILER_WORKS @CMAKE_C_COMPILER_WORKS@)
set(CMAKE_C_ABI_COMPILED @CMAKE_C_ABI_COMPILED@)
-set(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
set(CMAKE_C_COMPILER_ENV_VAR "CC")
-if(CMAKE_COMPILER_IS_MINGW)
- set(MINGW 1)
-endif()
set(CMAKE_C_COMPILER_ID_RUN 1)
set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)