summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-11-07 15:24:23 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-11-07 15:24:33 (GMT)
commit03e4fe65b0c4666ed46d0f2a7e2cfe00e30f7406 (patch)
treec37fb61389299408f52218ebd08d181e572b6d90
parentef86e8991b6b9b2d4b25f98a95ba950f9ba19485 (diff)
parent9a7b4f47aa3cf4ce03aad117d2e1de893c34acb0 (diff)
downloadCMake-03e4fe65b0c4666ed46d0f2a7e2cfe00e30f7406.zip
CMake-03e4fe65b0c4666ed46d0f2a7e2cfe00e30f7406.tar.gz
CMake-03e4fe65b0c4666ed46d0f2a7e2cfe00e30f7406.tar.bz2
Merge topic 'objc-x-objc' into release-3.16
9a7b4f47aa ObjC: Mark explicitly the language for compilation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4002
-rw-r--r--Modules/CMakeOBJCInformation.cmake2
-rw-r--r--Modules/CMakeOBJCXXInformation.cmake2
2 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CMakeOBJCInformation.cmake b/Modules/CMakeOBJCInformation.cmake
index 2baad4a..cb61cb8 100644
--- a/Modules/CMakeOBJCInformation.cmake
+++ b/Modules/CMakeOBJCInformation.cmake
@@ -165,7 +165,7 @@ endif()
# compile an Objective-C file into an object file
if(NOT CMAKE_OBJC_COMPILE_OBJECT)
set(CMAKE_OBJC_COMPILE_OBJECT
- "<CMAKE_OBJC_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>")
+ "<CMAKE_OBJC_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -x objective-c -o <OBJECT> -c <SOURCE>")
endif()
if(NOT CMAKE_OBJC_LINK_EXECUTABLE)
diff --git a/Modules/CMakeOBJCXXInformation.cmake b/Modules/CMakeOBJCXXInformation.cmake
index 3f55b01..71ac26a 100644
--- a/Modules/CMakeOBJCXXInformation.cmake
+++ b/Modules/CMakeOBJCXXInformation.cmake
@@ -258,7 +258,7 @@ endif()
# compile an Objective-C++ file into an object file
if(NOT CMAKE_OBJCXX_COMPILE_OBJECT)
set(CMAKE_OBJCXX_COMPILE_OBJECT
- "<CMAKE_OBJCXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>")
+ "<CMAKE_OBJCXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -x objective-c++ -o <OBJECT> -c <SOURCE>")
endif()
if(NOT CMAKE_OBJCXX_LINK_EXECUTABLE)