Commit 097d9165249ae39045d97d5c4db19058a45e58a0
1 parent
1e20fe60
Add OPENMP_LIB_LDFLAGS for OpenMP support on Mac OS X.
For OpenMP to work properly on Mac OS X, the -lgomp library has to be linked. For this purpose, a new variable OPENMP_LIB_LDFLAGS has been created that is set by configure to -lgomp in the presence of OpenMP support. The ctobssim Makefile.am has been modified to take this parameter into account during linking.
Showing
2 changed files
with
14 additions
and
0 deletions
configure.ac
| ... | ... | @@ -734,6 +734,19 @@ else |
| 734 | 734 | AC_MSG_RESULT(no) |
| 735 | 735 | fi |
| 736 | 736 | |
| 737 | +# Set system specific settings | |
| 738 | +OPENMP_LIB_LDFLAGS= | |
| 739 | +if test "x$enable_openmp" = "xyes"; then | |
| 740 | + case $ac_sys_system/$ac_sys_release in | |
| 741 | + Darwin/*) | |
| 742 | + # | |
| 743 | + # | |
| 744 | + OPENMP_LIB_LDFLAGS=-lgomp | |
| 745 | + ;; | |
| 746 | + esac | |
| 747 | +fi | |
| 748 | +AC_SUBST(OPENMP_LIB_LDFLAGS) | |
| 749 | + | |
| 737 | 750 | # Signal if ctools cannot be compiled as gammalibe requires OpenMP but ctools |
| 738 | 751 | # cannot be compiled with OpenMP |
| 739 | 752 | if test "x$enable_openmp" = "xno" && test "x$gammalib_with_openmp" = "xyes"; then | ... | ... |
src/ctobssim/Makefile.am