A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Fix MC builds after my fix for Mac OSX around libunwind :-("
[simgrid.git]
/
tools
/
cmake
/
Modules
/
FindLibunwind.cmake
diff --git
a/tools/cmake/Modules/FindLibunwind.cmake
b/tools/cmake/Modules/FindLibunwind.cmake
index
bce74ff
..
711f0ca
100644
(file)
--- a/
tools/cmake/Modules/FindLibunwind.cmake
+++ b/
tools/cmake/Modules/FindLibunwind.cmake
@@
-15,9
+15,13
@@
if(PROCESSOR_x86_64)
endif()
if(NOT PATH_LIBUNWIND_LIB)
endif()
if(NOT PATH_LIBUNWIND_LIB)
- find_library(PATH_LIBUNWIND_LIB
- NAMES unwind
- HINTS
+ # Mac OSX has a libunwind that is not the one we need
+ CHECK_LIBRARY_EXISTS(unwind unw_init_local "Whether libunwind is usable" RIGHT_LIBUNWIND)
+
+ if (RIGHT_LIBUNWIND)
+ find_library(PATH_LIBUNWIND_LIB
+ NAMES unwind
+ HINTS
$ENV{SIMGRID_LIBUNWIND_LIBRARY_PATH}
$ENV{LD_LIBRARY_PATH}
$ENV{LIBUNWIND_LIBRARY_PATH}
$ENV{SIMGRID_LIBUNWIND_LIBRARY_PATH}
$ENV{LD_LIBRARY_PATH}
$ENV{LIBUNWIND_LIBRARY_PATH}
@@
-29,13
+33,6
@@
if(NOT PATH_LIBUNWIND_LIB)
/sw
/usr
/usr/lib/)
/sw
/usr
/usr/lib/)
-
- # Mac OSX has a libunwind that is not the one we need, so double check
- if (PATH_LIBUNWIND_LIB)
- CHECK_LIBRARY_EXISTS(unwind unw_init_local PATH_LIBUNWIND_LIB RIGHT_LIBUNWIND)
- if (NOT RIGHT_LIBUNWIND)
- unset(PATH_LIBUNWIND_LIB)
- endif()
endif()
endif()
endif()
endif()