On Tue, May 20, 2014 at 2:55 PM, Imran Ali
<[email protected]> wrote:
> I commented out the following in the cmake file :
>
> ## Try to figure out PETSC_DIR by finding petsc.h
> #find_path(PETSC_DIR include/petsc.h
> #  HINTS ${PETSC_DIR} $ENV{PETSC_DIR}
> #  PATHS ${petsc_dir_locations}
> #  DOC "PETSc directory")
> message("Skipped find petsc")
> # Report result of search for PETSC_DIR
> if (DEFINED PETSC_DIR)
>   message(STATUS "PETSC_DIR is ${PETSC_DIR}")
> else()
>   message(STATUS "PETSC_DIR is empty")
> endif()
>
>
> And the build went successfully, however without being able to find PETSc.
> Which I need.

I was thinking more of disabling some of the try_run calls in
FindPETSc.cmake. However, you can also try to turn off
DOLFIN_SKIP_BUILD_TESTS and then apply the following patch to
FindPETSc.cmake:

   # Build PETSc test program
  -if (DOLFIN_SKIP_BUILD_TESTS)
  +if (1)
     set(PETSC_TEST_RUNS TRUE)
  -  set(PETSC_VERSION "UNKNOWN")
  +  set(PETSC_VERSION "3.4.4")
     set(PETSC_VERSION_OK TRUE)
   elseif (FOUND_PETSC_CONF)

Change the version number according to your PETSc version.

Johannes
_______________________________________________
fenics-support mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics-support

Reply via email to