diff --git a/CMakeLists.txt b/CMakeLists.txt index ecc74cad1..bbb200274 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,6 +58,7 @@ endif() include(CheckLibraryExists) include(CheckIncludeFiles) include(CheckIncludeFile) +include(CheckLanguage) include(CheckSymbolExists) include(CheckCSourceCompiles) include(CheckCSourceRuns) diff --git a/cmake/macros.cmake b/cmake/macros.cmake index 5830fceed..6f6c32971 100644 --- a/cmake/macros.cmake +++ b/cmake/macros.cmake @@ -110,6 +110,13 @@ else() endif() endif() +if(APPLE) + check_language(OBJC) + if(NOT CMAKE_OBJC_COMPILER) + message(WARNING "Cannot find working OBJC compiler.") + endif() +endif() + if(CMAKE_VERSION VERSION_LESS 3.13.0) macro(target_link_directories _TARGET _SCOPE) link_directories(${ARGN})