# Compute the dependencies of SimGrid
#####################################
set(SIMGRID_DEP "-lm")
+if (HAVE_BOOST_CONTEXT)
+ set(SIMGRID_DEP "${SIMGRID_DEP} ${Boost_CONTEXT_LIBRARY}")
+endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD"
AND NOT ${CMAKE_SYSTEM_VERSION} VERSION_LESS 10.0
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)