Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't use -pthreads on Mac OS X
authorGabriel Corona <gabriel.corona@loria.fr>
Tue, 16 Jun 2015 11:39:39 +0000 (13:39 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Tue, 16 Jun 2015 11:39:48 +0000 (13:39 +0200)
Clang is not happy about it.

buildtools/Cmake/MakeLib.cmake

index fc2aa83..d28e29d 100644 (file)
@@ -56,10 +56,9 @@ else()
   set(SIMGRID_DEP "${SIMGRID_DEP} -lstdc++")
 endif()
 
-if(pthread)
-  if(${CONTEXT_THREADS})
-    SET(SIMGRID_DEP "${SIMGRID_DEP} -pthread")
-  endif()
+if(pthread AND ${CONTEXT_THREADS} AND NOT APPLE)
+  # Clang on recent Mac OS X is not happy about -pthread.
+  SET(SIMGRID_DEP "${SIMGRID_DEP} -pthread")
 endif()
 
 if(HAVE_LUA)