jedbrown / cmake-modules

CMake modules for some scientific libraries
BSD 2-Clause "Simplified" License
87 stars 54 forks source link

Find PETSc fails #34

Open jmonschke-onscale opened 5 years ago

jmonschke-onscale commented 5 years ago

I'm trying to use the CMake module to find the PETSc installation that I built on Ubuntu 19.04. I am setting both environment and CMake variables for PETSC_DIR and PETSC_ARCH but I still get the following error message:

-- PETSC_DIR: /petsc
-- PETSC_ARCH: mpi-real-double
CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  PETSc could not be found.  Be sure to set PETSC_DIR and PETSC_ARCH.
  (missing: PETSC_INCLUDES PETSC_LIBRARIES PETSC_EXECUTABLE_RUNS) (found
  version "3.11.1")

Any ideas?

jedbrown commented 5 years ago

Please check CMakeFiles/CMakeOutput.log and CMakeFiles/CMakeError.log.

You might also prefer to use CMake's pkg-config support instead of FindPETSc.cmake unless you need legacy support (to very old versions of PETSc before PETSc.pc was distributed).