ThirdPartyPETSc.cmake 530 Bytes
Newer Older
Dave Moxey's avatar
Dave Moxey committed
1 2 3 4
OPTION(NEKTAR_USE_PETSC
    "Enable PETSc parallel matrix solver support." OFF)

CMAKE_DEPENDENT_OPTION(THIRDPARTY_BUILD_PETSC
5
    "Build PETSc if needed" OFF
Dave Moxey's avatar
Dave Moxey committed
6 7 8 9 10 11 12 13
    "NEKTAR_USE_PETSC" OFF)

IF( NEKTAR_USE_PETSC )
    IF (THIRDPARTY_BUILD_PETSC)
        # TODO
    ELSE (THIRDPARTY_BUILD_PETSC)
        INCLUDE (FindPETSc)
        MESSAGE(STATUS "Found PETSc: ${PETSC_LIBRARIES}")
14
        ADD_DEFINITIONS(-DNEKTAR_USING_PETSC)
Dave Moxey's avatar
Dave Moxey committed
15 16 17 18 19 20 21 22 23
    ENDIF (THIRDPARTY_BUILD_PETSC)
ENDIF( NEKTAR_USE_PETSC )

INCLUDE_DIRECTORIES(${PETSC_INCLUDES})