forked from wenqing/mesh_partition
-
Notifications
You must be signed in to change notification settings - Fork 1
/
MetisSetup.cmake
31 lines (25 loc) · 922 Bytes
/
MetisSetup.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
MESSAGE( STATUS "The METIS package is copyrighted by the Regents of the University of Minnesota." )
MESSAGE( STATUS "Please read the license of the METIS package carefully before you use the METIS." )
set(METIS_PATH "${CMAKE_SOURCE_DIR}/metis")
add_definitions(-DSVNINFO="${SVNREV}")
add_definitions(-DUSE_GKREGEX)
set(GKLIB_PATH "${METIS_PATH}/GKlib" CACHE PATH "path to GKlib")
set(SHARED FALSE CACHE BOOL "build a shared library")
if(MSVC)
set(METIS_INSTALL FALSE)
else()
set(METIS_INSTALL TRUE)
endif()
# Configure libmetis library.
if(SHARED)
set(METIS_LIBRARY_TYPE SHARED)
else()
set(METIS_LIBRARY_TYPE STATIC)
endif(SHARED)
include(${GKLIB_PATH}/GKlibSystem.cmake)
# Add include directories.
include_directories(${GKLIB_PATH})
include_directories(${METIS_PATH}/include)
# Recursively look for CMakeLists.txt in subdirs.
add_subdirectory("${METIS_PATH}/include")
add_subdirectory("${METIS_PATH}/libmetis")