]> git.mxchange.org Git - simgear.git/commitdiff
Explicitly force libc++ on clang
authorJames Turner <zakalawe@mac.com>
Wed, 11 Feb 2015 15:46:01 +0000 (15:46 +0000)
committerJames Turner <zakalawe@mac.com>
Wed, 11 Feb 2015 15:46:01 +0000 (15:46 +0000)
CMakeLists.txt
simgear/misc/CocoaHelpers.mm

index c9eb72943c5575bfd9c3eec00aa52b597374d0aa..01bdc4f7e63c38336e4812a22560b229e8d6b7e6 100644 (file)
@@ -313,6 +313,9 @@ endif(CMAKE_COMPILER_IS_GNUCXX)
 if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
    set(WARNING_FLAGS_CXX "-Wall -Wno-overloaded-virtual")
    set(WARNING_FLAGS_C   "-Wall")
+   set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
+   set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
 endif()
 
 if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
index 028ccfb709baf7faf32fa0037e56260dc17e4b8e..4b151307743d4d0de89f7edc438913214ca3317a 100644 (file)
@@ -28,11 +28,12 @@ SGPath appleSpecialFolder(int dirType, int domainMask, const SGPath& def)
 {
     CocoaAutoreleasePool ap;
     NSFileManager* fm = [NSFileManager defaultManager];
-    NSURL* pathUrl = [fm URLForDirectory:dirType
-                                     inDomain:domainMask
-                             appropriateForURL:Nil
-                                       create:YES
-                                         error:nil];
+    NSSearchPathDirectory d = static_cast<NSSearchPathDirectory>(dirType);
+    NSURL* pathUrl = [fm URLForDirectory:d
+                                inDomain:domainMask
+                       appropriateForURL:Nil
+                                  create:YES
+                                   error:nil];
     if (!pathUrl) {
         return def;;
     }