From 5ed9c3b8964af94ae8531b3c3518f4267c794aaf Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Tue, 1 Nov 2016 00:20:03 +0100 Subject: [PATCH] fix mac build (another try) --- CMakeLists.txt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bcfc59684..a14e39001b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -334,6 +334,11 @@ else() set(HAVE_THREAD_LOCAL_STORAGE 0) endif() +if(enable_model-checking AND NOT "${CMAKE_SYSTEM}" MATCHES "Linux") + message(WARNING "Support for model-checking has not been enabled on ${CMAKE_SYSTEM}: disabling it") + set(enable_model-checking FALSE) +endif() + if(HAVE_MMAP AND HAVE_THREAD_LOCAL_STORAGE) SET(HAVE_MMALLOC 1) else() @@ -358,7 +363,10 @@ endif() include(FindLibunwind) if(HAVE_LIBUNWIND) - SET(SIMGRID_DEP "${SIMGRID_DEP} -lunwind -lunwind-ptrace") + SET(SIMGRID_DEP "${SIMGRID_DEP} -lunwind") + if("${CMAKE_SYSTEM}" MATCHES "Linux") + set(SIMGRID_DEP "${SIMGRID_DEP} -lunwind-ptrace") + endif() # 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) @@ -372,11 +380,6 @@ else() endif() endif() -if(enable_model-checking AND NOT "${CMAKE_SYSTEM}" MATCHES "Linux") - message(WARNING "Support for model-checking has not been enabled on ${CMAKE_SYSTEM}: disabling it") - set(enable_model-checking FALSE) -endif() - if(enable_model-checking) SET(HAVE_MC 1) -- 2.20.1