From dd80835de7f489bb949cc93b1f2b6586baecc3e9 Mon Sep 17 00:00:00 2001 From: Francisco Facioni Date: Sat, 1 Feb 2014 09:24:10 +0100 Subject: [PATCH] Fixes Mac OSX 10.9 with libc++ Only switches to libstdc++ when you actually have CUDA and you enabled it. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5be91904636..d32b8a05b63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,7 +149,7 @@ 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) + if(APPLE AND WITH_CUDA AND CUDA_FOUND) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++") endif(APPLE) endif()