Skip to content

Commit

Permalink
Change metis library detection
Browse files Browse the repository at this point in the history
The Ubuntu packages do not ship with a pkg-config file. Change the
library detection to simply `find_library`.
  • Loading branch information
nicolasbock committed Mar 18, 2017
1 parent dc01111 commit 31c2572
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,13 @@ list(APPEND LINK_LIBRARIES ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})

set(PROGRESS_GRAPHLIB FALSE CACHE BOOL "Compile with externel graph libraries")
if(PROGRESS_GRAPHLIB)
pkg_check_modules(METIS metis REQUIRED)
message(STATUS "Found metis: ${METIS_LDFLAGS}")
find_library(FOUND_METIS metis)
if(NOT FOUND_METIS)
message(FATAL_ERROR "Could not find metis library")
endif()
message(STATUS "Will build with external graph libraries")
add_definitions(-DDO_GRAPHLIB)
list(APPEND LINK_LIBRARIES ${METIS_LDFLAGS})
list(APPEND LINK_LIBRARIES -lmetis)
endif()

set(PROGRESS_OPENMP TRUE CACHE BOOL "Whether to compile with OpenMP support")
Expand Down

0 comments on commit 31c2572

Please sign in to comment.