From a5b4ab9937bc662ba1e7ed3bd49a95d17291fe8b Mon Sep 17 00:00:00 2001 From: theraven Date: Mon, 17 Dec 2012 16:11:56 +0000 Subject: [PATCH] Specify the current runtime version to target if the compiler supports this flag. This means that the .m files in the runtime will take advantage of features of this runtime when compiled with a recent clang. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9708306..e2ae5d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,6 +120,9 @@ endif () if (${CMAKE_C_COMPILER_ID} MATCHES Clang*) set(CMAKE_OBJC_FLAGS "${CMAKE_OBJC_FLAGS} -Wno-deprecated-objc-isa-usage -Wno-objc-root-class") + if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER 3.1) + set(CMAKE_OBJC_FLAGS "${CMAKE_OBJC_FLAGS} -fobjc-runtime=gnustep-1.7") + endif () if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i686") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i586") endif ()