Skip to content

Commit

Permalink
Merge branch 'master' of github:mdave/cmake-modules [PR #18]
Browse files Browse the repository at this point in the history
* 'master' of github:mdave/cmake-modules:
  Fix paths for Ubuntu 16.04+ and Debian 9
  • Loading branch information
jedbrown committed Mar 5, 2018
2 parents cd491cd + 18c0329 commit c12baa0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions FindPETSc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ find_path (PETSC_DIR include/petsc.h
HINTS ENV PETSC_DIR
PATHS
# Debian paths
/usr/lib/petsc
/usr/lib/petscdir/3.5.1 /usr/lib/petscdir/3.5
/usr/lib/petscdir/3.4.2 /usr/lib/petscdir/3.4
/usr/lib/petscdir/3.3 /usr/lib/petscdir/3.2 /usr/lib/petscdir/3.1
Expand Down Expand Up @@ -233,6 +234,13 @@ show :
else ()
set (PETSC_LIBRARY_VEC "NOTFOUND" CACHE INTERNAL "Cleared" FORCE) # There is no libpetscvec
petsc_find_library (SINGLE petsc)
# Debian 9/Ubuntu 16.04 uses _real and _complex extensions when using libraries in /usr/lib/petsc.
if (NOT PETSC_LIBRARY_SINGLE)
petsc_find_library (SINGLE petsc_real)
endif()
if (NOT PETSC_LIBRARY_SINGLE)
petsc_find_library (SINGLE petsc_complex)
endif()
foreach (pkg SYS VEC MAT DM KSP SNES TS ALL)
set (PETSC_LIBRARIES_${pkg} "${PETSC_LIBRARY_SINGLE}")
endforeach ()
Expand Down

0 comments on commit c12baa0

Please sign in to comment.