ThirdPartyMPI.cmake 1.08 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
SET(NEKTAR_USE_MPI    OFF CACHE BOOL 
    "Use MPICH2 for parallelisation.")
SET(THIRDPARTY_BUILD_GSMPI OFF CACHE BOOL
    "Build GSMPI if needed")

IF( NEKTAR_USE_MPI )
    INCLUDE (FindMPI)
    MARK_AS_ADVANCED(MPI_LIBRARY)
    MARK_AS_ADVANCED(MPI_EXTRA_LIBRARY)
    MARK_AS_ADVANCED(file_cmd)
    ADD_DEFINITIONS(-DNEKTAR_USE_MPI)
    INCLUDE_DIRECTORIES( ${MPI_INCLUDE_PATH} )
    
    IF (THIRDPARTY_BUILD_GSMPI)
        EXTERNALPROJECT_ADD(
Chris Cantwell's avatar
Chris Cantwell committed
16
            gsmpi-1.1
17
            PREFIX ${TPSRC}
Chris Cantwell's avatar
Chris Cantwell committed
18
            URL ${TPURL}/gsmpi-1.1.tar.bz2
19
            URL_MD5 "f2c1f7695f361c6d87365e2ea63aece1"
20 21 22 23
            DOWNLOAD_DIR ${TPSRC}
            CONFIGURE_COMMAND 
                ${CMAKE_COMMAND} 
                -DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist 
Chris Cantwell's avatar
Chris Cantwell committed
24
                ${TPSRC}/src/gsmpi-1.1
25
        )
26
        SET(GSMPI_LIBRARY gsmpi CACHE FILEPATH
27
            "GSMPI path" FORCE)
Chris Cantwell's avatar
Chris Cantwell committed
28 29
        SET(XXT_LIBRARY xxt CACHE FILEPATH
            "XXT path" FORCE)
30 31
    ELSE (THIRDPARTY_BUILD_GSMPI)
        INCLUDE (FindGSMPI)
Chris Cantwell's avatar
Chris Cantwell committed
32
        INCLUDE (FindXXT)
33 34 35 36
    ENDIF (THIRDPARTY_BUILD_GSMPI)

ENDIF( NEKTAR_USE_MPI )