From eb825cbffdc7283fde4b9b71eb395940da682493 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Tue, 7 Nov 2017 15:02:14 -0500 Subject: [PATCH] Don't use -pthread on OS X. --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 00597615ff..ef9f9298ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,8 +88,10 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # Link everything with -lm. set(COMPILER_SUPPORT_LIBRARIES ${COMPILER_SUPPORT_LIBRARIES} "m") set(MLPACK_LIBRARIES ${MLPACK_LIBRARIES} "m") - # Use -pthread. - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") + # Use -pthread, but not on OS X. + if (NOT APPLE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") + endif () endif() # Setup build for test coverage