Skip to content
Snippets Groups Projects
Commit 7f067a3c authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'mingw-objc-objcxx' into release-3.29


2a4e8f03 MinGW: Add support for OBJC and OBJCXX

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Acked-by: default avatarCristian Adam <cristian.adam@gmail.com>
Merge-request: !9244
parents 23f9b042 2a4e8f03
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,11 @@ Compilers
* The LLVM/Clang GNU-like frontend on Windows (``clang++``) may now be used
to compile ``CUDA`` language sources.
* Compilers targeting the GNU ABI on Windows (MinGW) may now be used to
compile Objective C (``OBJC``) and Objective C++ (``OBJCXX``). These
include GNU compilers (``gcc`` and ``g++``) and the LLVM/Clang GNU-like
frontends (``clang`` and ``clang++``).
* TI Clang-based compilers are now supported with
:variable:`compiler id <CMAKE_<LANG>_COMPILER_ID>` ``TIClang``.
......
include(Platform/Windows-Clang)
__windows_compiler_clang(OBJC)
if("x${CMAKE_OBJC_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC")
if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
AND CMAKE_DEPFILE_FLAGS_OBJC)
set(CMAKE_OBJC_DEPENDS_USE_COMPILER TRUE)
endif()
elseif("x${CMAKE_OBJC_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU")
if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
AND CMAKE_DEPFILE_FLAGS_OBJC)
# dependencies are computed by the compiler itself
set(CMAKE_OBJC_DEPFILE_FORMAT gcc)
set(CMAKE_OBJC_DEPENDS_USE_COMPILER TRUE)
endif()
endif()
include(Platform/Windows-Clang)
__windows_compiler_clang(OBJCXX)
if("x${CMAKE_OBJCXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC")
if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
AND CMAKE_DEPFILE_FLAGS_OBJCXX)
set(CMAKE_OBJCXX_DEPENDS_USE_COMPILER TRUE)
endif()
elseif("x${CMAKE_OBJCXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU")
if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
AND CMAKE_DEPFILE_FLAGS_OBJCXX)
# dependencies are computed by the compiler itself
set(CMAKE_OBJCXX_DEPFILE_FORMAT gcc)
set(CMAKE_OBJCXX_DEPENDS_USE_COMPILER TRUE)
endif()
endif()
__windows_compiler_gnu_abi(OBJC)
include(Platform/Windows-GNU)
__windows_compiler_gnu(OBJC)
__windows_compiler_gnu_abi(OBJCXX)
include(Platform/Windows-GNU)
__windows_compiler_gnu(OBJCXX)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment