mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-04 14:50:23 +00:00
MinGW: Add support for OBJC and OBJCXX
This commit is contained in:
committed by
Brad King
parent
4977739fc9
commit
2a4e8f03ef
@@ -39,6 +39,11 @@ Compilers
|
|||||||
* The LLVM/Clang GNU-like frontend on Windows (``clang++``) may now be used
|
* The LLVM/Clang GNU-like frontend on Windows (``clang++``) may now be used
|
||||||
to compile ``CUDA`` language sources.
|
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
|
* TI Clang-based compilers are now supported with
|
||||||
:variable:`compiler id <CMAKE_<LANG>_COMPILER_ID>` ``TIClang``.
|
:variable:`compiler id <CMAKE_<LANG>_COMPILER_ID>` ``TIClang``.
|
||||||
|
|
||||||
|
|||||||
18
Modules/Platform/Windows-Clang-OBJC.cmake
Normal file
18
Modules/Platform/Windows-Clang-OBJC.cmake
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
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()
|
||||||
18
Modules/Platform/Windows-Clang-OBJCXX.cmake
Normal file
18
Modules/Platform/Windows-Clang-OBJCXX.cmake
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
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()
|
||||||
1
Modules/Platform/Windows-GNU-OBJC-ABI.cmake
Normal file
1
Modules/Platform/Windows-GNU-OBJC-ABI.cmake
Normal file
@@ -0,0 +1 @@
|
|||||||
|
__windows_compiler_gnu_abi(OBJC)
|
||||||
2
Modules/Platform/Windows-GNU-OBJC.cmake
Normal file
2
Modules/Platform/Windows-GNU-OBJC.cmake
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
include(Platform/Windows-GNU)
|
||||||
|
__windows_compiler_gnu(OBJC)
|
||||||
1
Modules/Platform/Windows-GNU-OBJCXX-ABI.cmake
Normal file
1
Modules/Platform/Windows-GNU-OBJCXX-ABI.cmake
Normal file
@@ -0,0 +1 @@
|
|||||||
|
__windows_compiler_gnu_abi(OBJCXX)
|
||||||
2
Modules/Platform/Windows-GNU-OBJCXX.cmake
Normal file
2
Modules/Platform/Windows-GNU-OBJCXX.cmake
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
include(Platform/Windows-GNU)
|
||||||
|
__windows_compiler_gnu(OBJCXX)
|
||||||
Reference in New Issue
Block a user