diff options
author | Brad King <brad.king@kitware.com> | 2021-09-17 15:07:40 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-09-17 16:17:35 (GMT) |
commit | a136b6ec986b3e69184d7b07997d81a7cdd720dd (patch) | |
tree | e39b813faa6cde72c4bf3b2d665f11690b1b016e /Modules/CMakeCCompiler.cmake.in | |
parent | 39c5dad0cb67f75e745551ef393316725a4124db (diff) | |
download | CMake-a136b6ec986b3e69184d7b07997d81a7cdd720dd.zip CMake-a136b6ec986b3e69184d7b07997d81a7cdd720dd.tar.gz CMake-a136b6ec986b3e69184d7b07997d81a7cdd720dd.tar.bz2 |
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.in | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in index 075a713..6818381 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) |