X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c7b4fbf9bd362ef98af378f5f87d437a7ffa28e8..23beefe235c8e560296fb4f3a6b8681d02be4f50:/buildtools/Cmake/MakeLib.cmake diff --git a/buildtools/Cmake/MakeLib.cmake b/buildtools/Cmake/MakeLib.cmake index 1e2113774d..ef15efa4a7 100644 --- a/buildtools/Cmake/MakeLib.cmake +++ b/buildtools/Cmake/MakeLib.cmake @@ -20,7 +20,16 @@ add_dependencies(simgrid maintainer_files) # Compute the dependencies of SimGrid ##################################### -set(SIMGRID_DEP "-lm -lstdc++") +set(SIMGRID_DEP "-lm") + +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++") +else() + set(SIMGRID_DEP "${SIMGRID_DEP} -lstdc++") +endif() if(pthread) if(${CONTEXT_THREADS}) @@ -77,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) @@ -87,7 +99,7 @@ if(HAVE_MC) endif() if(MMALLOC_WANT_OVERRIDE_LEGACY AND HAVE_GNU_LD) - SET(SIMGRID_DEP "${SIMGRID_DEP} -ldl") + SET(SIMGRID_DEP "${SIMGRID_DEP} ${DL_LIBRARY}") endif() if(HAVE_NS3) @@ -104,6 +116,10 @@ if(HAVE_POSIX_GETTIME) SET(SIMGRID_DEP "${SIMGRID_DEP} -lrt") endif() +if(HAVE_BACKTRACE_IN_LIBEXECINFO) + SET(SIMGRID_DEP "${SIMGRID_DEP} -lexecinfo") +endif(HAVE_BACKTRACE_IN_LIBEXECINFO) + # Compute the dependencies of SMPI ################################## if(enable_smpi AND APPLE)