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)