From: degomme Date: Tue, 18 Mar 2014 17:14:45 +0000 (+0100) Subject: Yet another BSD patch from M. Volat, anticipating changes in c++ stack X-Git-Tag: v3_11~213^2~3 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/db063ce98cf35b099e237842a153524caf640118?hp=4a09cb4fea0018ad6f94bd6a750f06e2c476dab2 Yet another BSD patch from M. Volat, anticipating changes in c++ stack (shame on me for not citing him for the other ones) --- diff --git a/buildtools/Cmake/MakeLib.cmake b/buildtools/Cmake/MakeLib.cmake index a3c0fe168f..77ac392734 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_CXX_COMPILER_ID} STREQUAL "GNU") + set(SIMGRID_DEP "${SIMGRID_DEP} -lstdc++") +elseif(${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") if(pthread) if(${CONTEXT_THREADS})