From 439b708999efbe6c9e39b9a03f73f92ccd212c15 Mon Sep 17 00:00:00 2001 From: Miroslav Kobetski Date: Fri, 24 Jan 2014 10:44:25 +0100 Subject: [PATCH] Since OSX 10.9, libc++ is the default standard library on Mac. Libc++ is not compatible with CUDA so pcl fails to build unless the previous stdlib is specified explicitly --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01fdec934c8..2add6703159 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,6 +149,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") endif() if("${CMAKE_CXX_FLAGS}" STREQUAL "") SET(CMAKE_CXX_FLAGS "-ftemplate-depth=1024 -Qunused-arguments -Wno-invalid-offsetof ${SSE_FLAGS}") # Unfortunately older Clang versions do not have this: -Wno-unnamed-type-template-args + if(APPLE) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++") + endif(APPLE) endif() SET(CLANG_LIBRARIES "stdc++") endif()