summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCXXCompiler.cmake.in
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2019-10-11 12:01:48 (GMT)
committerCristian Adam <cristian.adam@gmail.com>2019-10-11 12:01:48 (GMT)
commit806e01d638195905b1973c031ef71a4125f50376 (patch)
tree462882c653d70bc6959c786532f44035c3405abe /Modules/CMakeCXXCompiler.cmake.in
parent9150c818b7d2afb868575fcb2e0c9ba62b9d7f85 (diff)
downloadCMake-806e01d638195905b1973c031ef71a4125f50376.zip
CMake-806e01d638195905b1973c031ef71a4125f50376.tar.gz
CMake-806e01d638195905b1973c031ef71a4125f50376.tar.bz2
Objective-C: Do not treat Objective-C files as C++ files
When both C and C++ langauges are enabled, the Objective-C files should be treated as C files and not as C++ files.
Diffstat (limited to 'Modules/CMakeCXXCompiler.cmake.in')
-rw-r--r--Modules/CMakeCXXCompiler.cmake.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in
index ef65021..efb8abf 100644
--- a/Modules/CMakeCXXCompiler.cmake.in
+++ b/Modules/CMakeCXXCompiler.cmake.in
@@ -45,7 +45,7 @@ set(CMAKE_CXX_COMPILER_ID_RUN 1)
set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP)
set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
-foreach (lang OBJC OBJCXX)
+foreach (lang C OBJC OBJCXX)
if (CMAKE_${lang}_COMPILER_ID_RUN)
foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS)
list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension})