X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/19692c89dd9e208046e3b7880da2e2e91c3b1758..23beefe235c8e560296fb4f3a6b8681d02be4f50:/buildtools/Cmake/MakeLib.cmake diff --git a/buildtools/Cmake/MakeLib.cmake b/buildtools/Cmake/MakeLib.cmake index a3c0fe168f..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)