Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add an example about the remote exception throwing (still not working entierely)
[simgrid.git] / buildtools / Cmake / MakeLib.cmake
index 77ac392..ef15efa 100644 (file)
@@ -22,14 +22,14 @@ add_dependencies(simgrid maintainer_files)
 #####################################
 set(SIMGRID_DEP "-lm")
 
-if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
-  set(SIMGRID_DEP "${SIMGRID_DEP} -lstdc++")
-elseif(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" 
+if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD"
     AND NOT ${CMAKE_SYSTEM_VERSION} VERSION_LESS 10.0
     AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
   # FreeBSD from 10.0 provide a internal C++ stack (unused by gcc)
   set(SIMGRID_DEP "${SIMGRID_DEP} -lc++")
-endif(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+else()
+  set(SIMGRID_DEP "${SIMGRID_DEP} -lstdc++")
+endif()
 
 if(pthread)
   if(${CONTEXT_THREADS})
@@ -86,6 +86,9 @@ if(HAVE_MC)
   #   (that includes FindLibunwind.cmake), so simply load it now.
   
   SET(SIMGRID_DEP "${SIMGRID_DEP} -lunwind")
+
+  # Same for libdw
+  SET(SIMGRID_DEP "${SIMGRID_DEP} -ldw")
   # This supposes that the host machine is either an AMD or a X86.
   # This is deeply wrong, and should be fixed by manually loading -lunwind-PLAT (FIXME)
   if(PROCESSOR_x86_64)