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/CMakeDetermineCXXCompiler.cmake | |
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/CMakeDetermineCXXCompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineCXXCompiler.cmake | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index a8f6cf1..72dc8d3 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -125,9 +125,6 @@ if(NOT CMAKE_CXX_COMPILER_ID_RUN) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CMAKE_COMPILER_IS_GNUCXX 1) endif() - if(CMAKE_CXX_PLATFORM_ID MATCHES "MinGW") - set(CMAKE_COMPILER_IS_MINGW 1) - endif() else() if(NOT DEFINED CMAKE_CXX_COMPILER_FRONTEND_VARIANT) # Some toolchain files set our internal CMAKE_CXX_COMPILER_ID_RUN |