summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-02-13 13:52:52 (GMT)
committerKitware Robot <kwrobot@kitware.com>2024-02-13 13:53:15 (GMT)
commit7f067a3c17f9f0d199013deab6c59f72837a531d (patch)
tree26ff9a6f568b88d5e495fa66686b67c42646dcbb /Modules
parent23f9b042fdb58b0bea09aefa42350be81f355ea2 (diff)
parent2a4e8f03ef602969e9691b4f2c35fc7602ccc856 (diff)
downloadCMake-7f067a3c17f9f0d199013deab6c59f72837a531d.zip
CMake-7f067a3c17f9f0d199013deab6c59f72837a531d.tar.gz
CMake-7f067a3c17f9f0d199013deab6c59f72837a531d.tar.bz2
Merge topic 'mingw-objc-objcxx' into release-3.29
2a4e8f03ef MinGW: Add support for OBJC and OBJCXX Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Cristian Adam <cristian.adam@gmail.com> Merge-request: !9244
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/Windows-Clang-OBJC.cmake18
-rw-r--r--Modules/Platform/Windows-Clang-OBJCXX.cmake18
-rw-r--r--Modules/Platform/Windows-GNU-OBJC-ABI.cmake1
-rw-r--r--Modules/Platform/Windows-GNU-OBJC.cmake2
-rw-r--r--Modules/Platform/Windows-GNU-OBJCXX-ABI.cmake1
-rw-r--r--Modules/Platform/Windows-GNU-OBJCXX.cmake2
6 files changed, 42 insertions, 0 deletions
diff --git a/Modules/Platform/Windows-Clang-OBJC.cmake b/Modules/Platform/Windows-Clang-OBJC.cmake
new file mode 100644
index 0000000..7babb98
--- /dev/null
+++ b/Modules/Platform/Windows-Clang-OBJC.cmake
@@ -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()
diff --git a/Modules/Platform/Windows-Clang-OBJCXX.cmake b/Modules/Platform/Windows-Clang-OBJCXX.cmake
new file mode 100644
index 0000000..3bc1673
--- /dev/null
+++ b/Modules/Platform/Windows-Clang-OBJCXX.cmake
@@ -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()
diff --git a/Modules/Platform/Windows-GNU-OBJC-ABI.cmake b/Modules/Platform/Windows-GNU-OBJC-ABI.cmake
new file mode 100644
index 0000000..c8b2ea6
--- /dev/null
+++ b/Modules/Platform/Windows-GNU-OBJC-ABI.cmake
@@ -0,0 +1 @@
+__windows_compiler_gnu_abi(OBJC)
diff --git a/Modules/Platform/Windows-GNU-OBJC.cmake b/Modules/Platform/Windows-GNU-OBJC.cmake
new file mode 100644
index 0000000..42cf3f8
--- /dev/null
+++ b/Modules/Platform/Windows-GNU-OBJC.cmake
@@ -0,0 +1,2 @@
+include(Platform/Windows-GNU)
+__windows_compiler_gnu(OBJC)
diff --git a/Modules/Platform/Windows-GNU-OBJCXX-ABI.cmake b/Modules/Platform/Windows-GNU-OBJCXX-ABI.cmake
new file mode 100644
index 0000000..9a11514
--- /dev/null
+++ b/Modules/Platform/Windows-GNU-OBJCXX-ABI.cmake
@@ -0,0 +1 @@
+__windows_compiler_gnu_abi(OBJCXX)
diff --git a/Modules/Platform/Windows-GNU-OBJCXX.cmake b/Modules/Platform/Windows-GNU-OBJCXX.cmake
new file mode 100644
index 0000000..072cf28
--- /dev/null
+++ b/Modules/Platform/Windows-GNU-OBJCXX.cmake
@@ -0,0 +1,2 @@
+include(Platform/Windows-GNU)
+__windows_compiler_gnu(OBJCXX)