-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathCMakeLists.txt
133 lines (106 loc) · 2.88 KB
/
CMakeLists.txt
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#
# A) Define the package
#
TRIBITS_PACKAGE(Zoltan)
#
# B) Set up package-specific options
#
TRIBITS_ADD_OPTION_AND_DEFINE( ${PACKAGE_NAME}_ENABLE_UINT_IDS
UNSIGNED_INT_GLOBAL_IDS
"typedef unsigned int ZOLTAN_ID_TYPE"
OFF )
TRIBITS_ADD_OPTION_AND_DEFINE( ${PACKAGE_NAME}_ENABLE_ULONG_IDS
UNSIGNED_LONG_GLOBAL_IDS
"typedef unsigned long ZOLTAN_ID_TYPE"
OFF )
TRIBITS_ADD_OPTION_AND_DEFINE( ${PACKAGE_NAME}_ENABLE_ULLONG_IDS
UNSIGNED_LONG_LONG_GLOBAL_IDS
"typedef unsigned long long ZOLTAN_ID_TYPE"
OFF )
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_HUND
HAVE_ZOLTAN_HUND
"Enable support for HUND in ${PACKAGE_NAME}."
OFF )
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_KNUTH_HASH
HAVE_ZOLTAN_KNUTH_HASH
"Enable support for Knuth's hash function in ${PACKAGE_NAME}."
OFF )
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_F90INTERFACE
BUILD_ZOLTAN_F90_INTERFACE
"Enable build of F90 interface to ${PACKAGE_NAME}."
OFF )
TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_PURIFY
HAVE_PURIFY
"Enable work-arounds to purify bugs."
OFF )
OPTION(${PACKAGE_NAME}_ENABLE_CPPDRIVER
"Enable C++ driver for ${PACKAGE_NAME}."
${${PROJECT_NAME}_ENABLE_CXX} )
IF (${PROJECT_NAME}_ENABLE_CXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMPICH_IGNORE_CXX_SEEK")
ENDIF()
IF(${PROJECT_NAME}_ENABLE_Fortran AND BUILD_ZOLTAN_F90_INTERFACE)
# Special Fortran compiler-specific flags
IF (${CMAKE_Fortran_COMPILER_ID} MATCHES "PGI")
SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DPGI")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPGI")
ENDIF()
IF (${CMAKE_Fortran_COMPILER_ID} MATCHES "LAHEY")
SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DFUJITSU")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFUJITSU")
ENDIF()
SET(ZOLTAN_BUILD_ZFDRIVE YES)
ENDIF()
#
# C) Add the libraries, tests, and examples
#
IF (NOT TPL_ENABLE_MPI)
ADD_SUBDIRECTORY(siMPI)
SET(ZOLTAN_BUILD_ZFDRIVE NO)
ENDIF()
ADD_SUBDIRECTORY(src)
TRIBITS_ADD_TEST_DIRECTORIES(src/driver)
IF(ZOLTAN_BUILD_ZFDRIVE)
# CMAKE version > 2.6.4 is needed; earlier versions use C++ compiler to link
# fdriver, while fdriver needs F90.
TRIBITS_ADD_TEST_DIRECTORIES(src/fdriver)
ENDIF()
TRIBITS_ADD_TEST_DIRECTORIES(test)
TRIBITS_ADD_EXAMPLE_DIRECTORIES(example)
TRIBITS_EXCLUDE_FILES(
test/ch_brack2_3
test/ch_bug
test/ch_degenerate
test/ch_degenerateAA
test/ch_drake
test/ch_grid20x19
test/ch_hammond
test/ch_hammond2
test/ch_hughes
test/ch_nograph
test/ch_onedbug
test/ch_random
test/ch_serial
test/ch_slac
test/hg_cage10
test/hg_diag500_4
test/hg_ewgt
test/hg_felix
test/hg_ibm03
test/hg_ml27
test/hg_nograph
test/hg_vwgt
test/nem_ti_20k
test/nem_ti_4k
test/misc_siefert
test/th
test/bin
doc/Zoltan_html/tu_html
src/ZoltanComponent
src/driver_old
src/fdriver_old
)
#
# D) Do standard postprocessing
#
TRIBITS_PACKAGE_POSTPROCESS()