mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-25 18:50:19 -06:00
do not add the "-Wl,--as-needed" linker flag in FindSuiteSparse.cmake
because if umfpack is fully linked but some other library is underlinked, it causes the build to fail. This flag is better dealt with in the "UseOnlyNeeded.cmake" module...
This commit is contained in:
parent
d3ec9f63ff
commit
4fd75a4433
@ -232,14 +232,6 @@ if (UMFPACK_LIBRARY)
|
||||
set (UMFPACK_EXTRA_LIBS "-NOTFOUND")
|
||||
endif (CHOLMOD_LIBRARIES)
|
||||
endif (HAVE_UMFPACK_WITHOUT_CHOLMOD)
|
||||
# test if umfpack is underlinked (CentOS 5.9), i.e. doesn't specify
|
||||
# that it depends on amd. in that case, force amd to be linked
|
||||
if (UMFPACK_EXTRA_LIBS AND (CMAKE_CXX_PLATFORM_ID STREQUAL "Linux") AND CMAKE_COMPILER_IS_GNUCC)
|
||||
try_compile_umfpack (HAVE_UMFPACK_NOT_UNDERLINKED "-Wl,--as-needed" ${UMFPACK_EXTRA_LIBS})
|
||||
if (NOT HAVE_UMFPACK_NOT_UNDERLINKED)
|
||||
list (APPEND UMFPACK_LINKER_FLAGS "-Wl,--no-as-needed")
|
||||
endif (NOT HAVE_UMFPACK_NOT_UNDERLINKED)
|
||||
endif (UMFPACK_EXTRA_LIBS AND (CMAKE_CXX_PLATFORM_ID STREQUAL "Linux") AND CMAKE_COMPILER_IS_GNUCC)
|
||||
list (APPEND UMFPACK_LIBRARIES ${UMFPACK_EXTRA_LIBS})
|
||||
list (REVERSE UMFPACK_LIBRARIES)
|
||||
list (REMOVE_DUPLICATES UMFPACK_LIBRARIES)
|
||||
|
Loading…
Reference in New Issue
Block a user