summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeOBJCXXInformation.cmake
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2019-11-06 14:26:38 (GMT)
committerCristian Adam <cristian.adam@gmail.com>2019-11-06 15:21:45 (GMT)
commit9a7b4f47aa3cf4ce03aad117d2e1de893c34acb0 (patch)
treec610caadadaf5d3b95d594ae30a4e1433b2975e7 /Modules/CMakeOBJCXXInformation.cmake
parente0ec13059a04491c601e158c137cddc0802a410c (diff)
downloadCMake-9a7b4f47aa3cf4ce03aad117d2e1de893c34acb0.zip
CMake-9a7b4f47aa3cf4ce03aad117d2e1de893c34acb0.tar.gz
CMake-9a7b4f47aa3cf4ce03aad117d2e1de893c34acb0.tar.bz2
ObjC: Mark explicitly the language for compilation
This way you can have .cpp files compiled as ObjC++. Fixes: #19926
Diffstat (limited to 'Modules/CMakeOBJCXXInformation.cmake')
-rw-r--r--Modules/CMakeOBJCXXInformation.cmake2
1 files changed, 1 insertions, 1 deletions
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)