ThirdPartyMetis.cmake 888 Bytes
Newer Older
1
SET(THIRDPARTY_BUILD_METIS ON CACHE BOOL
2 3 4 5 6
    "Build ModMetis library from ThirdParty")

IF (THIRDPARTY_BUILD_METIS)
    INCLUDE(ExternalProject)
    EXTERNALPROJECT_ADD(
7
        modmetis-5.0.2
8
        PREFIX ${TPSRC}
9
        URL ${TPURL}/modmetis-5.0.2.tar.bz2
10
        URL_MD5 "ffbdc6a50283934389a0b3b0c32b62c0"
11
        DOWNLOAD_DIR ${TPSRC}
12
        CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist -DCMAKE_C_FLAGS:STRING=-fPIC -DGKLIB_PATH:PATH=${TPSRC}/src/modmetis-5.0.2/GKlib ${TPSRC}/src/modmetis-5.0.2
13
    )
14
    SET(METIS_LIB metis CACHE FILEPATH
15
        "METIS library" FORCE)
16
    MARK_AS_ADVANCED(METIS_LIB)
17
    LINK_DIRECTORIES(${TPSRC}/dist/lib)
18
    INCLUDE_DIRECTORIES(${TPSRC}/dist/include)
19
    MESSAGE(STATUS "Build Metis: ${TPSRC}/dist/lib/lib${METIS_LIB}.a")
20 21 22 23
ELSE (THIRDPARTY_BUILD_METIS)
    INCLUDE (FindMetis)
ENDIF (THIRDPARTY_BUILD_METIS)