tFindPETSc4Py.cmake - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
 (HTM) git clone git://src.adamsgaard.dk/pism
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
       tFindPETSc4Py.cmake (914B)
       ---
            1 # - Find PETSc4Py (cribbed from the FENICs dolfin file FindNumPy.cmake)
            2 # Find the petsc4py include directory
            3 #
            4 #  PETSC4PY_INCLUDES     - where to find petsc4py/petsc4py.i, etc.
            5 #  PETSC4PY_FOUND        - True if petsc4py is found
            6 
            7 if(PETSC4PY_INCLUDES)
            8   # in cache already
            9   set(PETSC4PY_FIND_QUIETLY TRUE)
           10 endif(PETSC4PY_INCLUDES)
           11 
           12 execute_process(
           13   COMMAND ${PYTHON_EXECUTABLE} -c "import petsc4py; from sys import stdout; stdout.write(petsc4py.get_include())"
           14   OUTPUT_VARIABLE PETSC4PY_INCLUDES
           15   RESULT_VARIABLE PETSC4PY_NOT_FOUND)
           16 
           17 execute_process(
           18   COMMAND ${PYTHON_EXECUTABLE} -c "import petsc4py; from sys import stdout; stdout.write(petsc4py.__version__)"
           19   OUTPUT_VARIABLE PETSC4PY_VERSION
           20   RESULT_VARIABLE PETSC4PY_NOT_FOUND)
           21 
           22 include (FindPackageHandleStandardArgs)
           23 find_package_handle_standard_args (PETSc4Py DEFAULT_MSG PETSC4PY_INCLUDES)
           24 
           25 mark_as_advanced(PETSC4PY_INCLUDES PETSC4PY_VERSION)