summaryrefslogtreecommitdiff
path: root/Modules/CMakeDetermineCXXCompiler.cmake
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/CMakeDetermineCXXCompiler.cmake
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/CMakeDetermineCXXCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake3
1 files changed, 0 insertions, 3 deletions
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index a8f6cf1b9d..72dc8d3d57 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