Merge pull request #624 from davydden/parmetis_gnu
fix parmetis on Ubuntu with GNU compilers by linking to lm
This commit is contained in:
commit
e1848c1d28
14
var/spack/repos/builtin/packages/parmetis/link-to-lm.patch
Normal file
14
var/spack/repos/builtin/packages/parmetis/link-to-lm.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/libparmetis/CMakeLists.txt b/libparmetis/CMakeLists.txt
|
||||
index 9cfc8a7..dfc0125 100644
|
||||
--- a/libparmetis/CMakeLists.txt
|
||||
+++ b/libparmetis/CMakeLists.txt
|
||||
@@ -5,7 +5,7 @@ file(GLOB parmetis_sources *.c)
|
||||
# Create libparmetis
|
||||
add_library(parmetis ${ParMETIS_LIBRARY_TYPE} ${parmetis_sources})
|
||||
# Link with metis and MPI libraries.
|
||||
-target_link_libraries(parmetis metis ${MPI_LIBRARIES})
|
||||
+target_link_libraries(parmetis metis ${MPI_LIBRARIES} "-lm")
|
||||
set_target_properties(parmetis PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
|
||||
|
||||
install(TARGETS parmetis
|
||||
|
@ -52,6 +52,8 @@ class Parmetis(Package):
|
||||
# https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/
|
||||
patch('pkg-parmetis-82409d68aa1d6cbc70740d0f35024aae17f7d5cb.patch')
|
||||
|
||||
patch('link-to-lm.patch')
|
||||
|
||||
depends_on('gdb', when='+gdb')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
Loading…
Reference in New Issue
Block a user