Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
unPERLifies a bit the routing: use the object, not its name
[simgrid.git] / CMakeLists.txt
index d16dc1b..aa1e753 100644 (file)
@@ -121,7 +121,7 @@ string(REGEX MATCH "[0-9].[0-9]*" LINKER_VERSION "${LINKER_VERSION}")
 
 ### Set the library providing dlopen
 if("${CMAKE_SYSTEM}" MATCHES "Linux")
-  find_library(dl DL_LIBRARY)
+  find_library(DL_LIBRARY dl)
 endif("${CMAKE_SYSTEM}" MATCHES "Linux")
 
 ### Find programs and paths
@@ -363,7 +363,13 @@ endif()
 
 include(FindLibunwind)
 if(HAVE_LIBUNWIND)
-  SET(SIMGRID_DEP "${SIMGRID_DEP} -lunwind")
+  if(NOT APPLE)
+    SET(SIMGRID_DEP "${SIMGRID_DEP} -lunwind")
+  else()
+    # Apple forbids to link directly against its libunwind implementation
+    # So let's comply and link against the System framework
+    SET(SIMGRID_DEP "${SIMGRID_DEP} -lSystem")
+  endif()
   if("${CMAKE_SYSTEM}" MATCHES "Linux")
     set(SIMGRID_DEP "${SIMGRID_DEP} -lunwind-ptrace")
     # This supposes that the host machine is either an AMD or a X86.