ThirdPartyMPI.cmake 1.12 KB
Newer Older
1 2
SET(NEKTAR_USE_MPI    OFF CACHE BOOL 
    "Use MPICH2 for parallelisation.")
3
SET(THIRDPARTY_BUILD_GSMPI ON CACHE BOOL
4 5 6 7 8 9 10 11 12 13 14 15
    "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
            DOWNLOAD_DIR ${TPSRC}
            CONFIGURE_COMMAND 
22 23
                ${CMAKE_COMMAND}
                -DCMAKE_BUILD_TYPE:STRING=Debug 
24
                -DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist 
Chris Cantwell's avatar
Chris Cantwell committed
25
                ${TPSRC}/src/gsmpi-1.1
26
        )
27
        SET(GSMPI_LIBRARY gsmpi CACHE FILEPATH
28
            "GSMPI path" FORCE)
Chris Cantwell's avatar
Chris Cantwell committed
29 30
        SET(XXT_LIBRARY xxt CACHE FILEPATH
            "XXT path" FORCE)
31 32
    ELSE (THIRDPARTY_BUILD_GSMPI)
        INCLUDE (FindGSMPI)
Chris Cantwell's avatar
Chris Cantwell committed
33
        INCLUDE (FindXXT)
34 35 36 37
    ENDIF (THIRDPARTY_BUILD_GSMPI)

ENDIF( NEKTAR_USE_MPI )