X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f4535e718abfb666917bc68cf5fdee2c6f4894f7..23f4a1521c0658ea2450c97e70616b6d04de97d7:/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 72f539abfa..dba5f6ccd5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -305,6 +305,7 @@ CHECK_INCLUDE_FILE("ucontext.h" HAVE_UCONTEXT_H) CHECK_INCLUDE_FILE("linux/futex.h" HAVE_FUTEX_H) CHECK_FUNCTION_EXISTS(backtrace HAVE_BACKTRACE) +CHECK_FUNCTION_EXISTS(dlfunc HAVE_DLFUNC) CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY) CHECK_FUNCTION_EXISTS(nanosleep HAVE_NANOSLEEP) CHECK_FUNCTION_EXISTS(getdtablesize HAVE_GETDTABLESIZE) @@ -363,7 +364,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. @@ -655,7 +662,7 @@ endif() # So we have to make sure that everything got a decent value before generating the files. foreach(var HAVE_BACKTRACE HAVE_EXECINFO_H HAVE_FUTEX_H HAVE_GETDTABLESIZE HAVE_GETTIMEOFDAY HAVE_MMAP HAVE_NANOSLEEP HAVE_POPEN HAVE_POSIX_GETTIME HAVE_PROCESS_VM_READV HAVE_SIGNAL_H HAVE_SYS_PARAM_H HAVE_SYS_SYSCTL_H HAVE_SYSCONF - HAVE_UCONTEXT_H HAVE_UNISTD_H HAVE_VALGRIND_H HAVE_VASPRINTF) + HAVE_UCONTEXT_H HAVE_UNISTD_H HAVE_VALGRIND_H HAVE_VASPRINTF HAVE_MREMAP HAVE_DLFUNC) if(${var}) set(${var} 1) else()