1
- cmake_minimum_required (VERSION 3.10 )
1
+ cmake_minimum_required (VERSION 3.12 )
2
2
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /cmake" )
3
3
include (FetchContent )
4
4
@@ -17,7 +17,7 @@ endif()
17
17
# Metall general configuration
18
18
# -------------------------------------------------------------------------------- #
19
19
project (Metall
20
- VERSION 0.26
20
+ VERSION 0.27
21
21
DESCRIPTION "A persistent memory allocator for data-centric analytics"
22
22
HOMEPAGE_URL "https://github.com/LLNL/metall" )
23
23
@@ -82,33 +82,20 @@ option(JUST_INSTALL_METALL_HEADER "Just install Metall header files (do not buil
82
82
option (BUILD_UTILITY "Build utility programs" OFF )
83
83
option (BUILD_DOC "Build API documentation" OFF )
84
84
option (BUILD_C "Build C examples and libraries" OFF )
85
- option (VERBOSE_SYSTEM_SUPPORT_WARNING "Show compile time warning regarding system support" OFF )
86
- option (DISABLE_FREE_FILE_SPACE "Disable freeing file space" OFF )
87
- option (DISABLE_SMALL_OBJECT_CACHE "Disable small object cache" OFF )
88
85
option (BUILD_EXAMPLE "Build the examples" OFF )
89
- option (BUILD_BENCH "Build the benchmark" OFF )
90
86
option (BUILD_TEST "Build the test" OFF )
91
87
option (RUN_LARGE_SCALE_TEST "Run large scale tests" OFF )
92
88
option (RUN_BUILD_AND_TEST_WITH_CI "Perform build and basic test with CI" OFF )
93
- option (BUILD_VERIFICATION "Build verification directory" OFF )
94
- option (USE_SORTED_BIN "Use VM space aware algorithm in the bin directory" OFF )
95
-
96
- set (DEFAULT_VM_RESERVE_SIZE "0" CACHE STRING
97
- "Set the default VM reserve size (use the internally defined value if 0 is specified)" )
98
- set (MAX_SEGMENT_SIZE "0" CACHE STRING
99
- "Set the max segment size (use the internally defined value if 0 is specified)" )
100
- set (INITIAL_SEGMENT_SIZE "0" CACHE STRING
101
- "Set the initial segment size (use the internally defined value if 0 is specified)" )
89
+ option (BUILD_BENCH "Build the benchmark" OFF )
90
+ option (BUILD_VERIFICATION "Build verification programs" OFF )
91
+ set (COMPILER_DEFS "" CACHE STRING "A list of Metall compile definitions to be added to all targets" )
102
92
103
93
# ---------- Experimental options ---------- #
104
- option (USE_ANONYMOUS_NEW_MAP "Use the anonymous map when creating a new map region" OFF )
105
94
set (UMAP_ROOT "" CACHE PATH "UMap installed root directory" )
106
95
107
96
option (ONLY_DOWNLOAD_GTEST "Only downloading Google Test" OFF )
108
97
option (SKIP_DOWNLOAD_GTEST "Skip downloading Google Test" OFF )
109
98
option (BUILD_NUMA "Build programs that require the NUMA policy library (numa.h)" OFF )
110
- set (FREE_SMALL_OBJECT_SIZE_HINT "0" CACHE STRING
111
- "Try to free the associated pages and file space when objects equal to or larger than that is deallocated" )
112
99
113
100
# -------------------------------------------------------------------------------- #
114
101
@@ -153,63 +140,6 @@ endif ()
153
140
# -------------------------------------------------------------------------------- #
154
141
# Executables
155
142
# -------------------------------------------------------------------------------- #
156
- if (NOT CMAKE_BUILD_TYPE )
157
- set (CMAKE_BUILD_TYPE Release )
158
- message (STATUS "CMAKE_BUILD_TYPE is set as Release" )
159
- endif ()
160
-
161
- # ---------- MPI ---------- #
162
- find_package (MPI )
163
-
164
- # ---------- Configure Metall ---------- #
165
- if (FREE_SMALL_OBJECT_SIZE_HINT GREATER 0 )
166
- list (APPEND METALL_DEFS "METALL_FREE_SMALL_OBJECT_SIZE_HINT=${FREE_SMALL_OBJECT_SIZE_HINT} " )
167
- message (STATUS "Try to free space for objects >= ${FREE_SMALL_OBJECT_SIZE_HINT} bytes" )
168
- endif ()
169
-
170
- if (VERBOSE_SYSTEM_SUPPORT_WARNING )
171
- list (APPEND METALL_DEFS "METALL_VERBOSE_SYSTEM_SUPPORT_WARNING" )
172
- message (STATUS "Show compile time warning regarding system support" )
173
- endif ()
174
-
175
- if (DISABLE_FREE_FILE_SPACE )
176
- list (APPEND METALL_DEFS "METALL_DISABLE_FREE_FILE_SPACE" )
177
- message (STATUS "Disable freeing file space in Metall" )
178
- endif ()
179
-
180
- if (DISABLE_SMALL_OBJECT_CACHE )
181
- list (APPEND METALL_DEFS "METALL_DISABLE_OBJECT_CACHE" )
182
- message (STATUS "Disable small object cache" )
183
- endif ()
184
-
185
- if (DEFAULT_VM_RESERVE_SIZE GREATER 0 )
186
- list (APPEND METALL_DEFS "METALL_DEFAULT_VM_RESERVE_SIZE=${DEFAULT_VM_RESERVE_SIZE} " )
187
- message (STATUS "METALL_DEFAULT_VM_RESERVE_SIZE=${DEFAULT_VM_RESERVE_SIZE} " )
188
- endif ()
189
-
190
- if (MAX_SEGMENT_SIZE GREATER 0 )
191
- list (APPEND METALL_DEFS "METALL_MAX_SEGMENT_SIZE=${MAX_SEGMENT_SIZE} " )
192
- message (STATUS "METALL_MAX_SEGMENT_SIZE=${MAX_SEGMENT_SIZE} " )
193
- endif ()
194
-
195
- if (INITIAL_SEGMENT_SIZE GREATER 0 )
196
- list (APPEND METALL_DEFS "METALL_INITIAL_SEGMENT_SIZE=${INITIAL_SEGMENT_SIZE} " )
197
- message (STATUS "METALL_INITIAL_SEGMENT_SIZE=${INITIAL_SEGMENT_SIZE} " )
198
- endif ()
199
-
200
- if (USE_SORTED_BIN )
201
- list (APPEND METALL_DEFS "METALL_USE_SORTED_BIN" )
202
- message (STATUS "Use VM space aware algorithm in the bin directory" )
203
- endif ()
204
-
205
- if (USE_ANONYMOUS_NEW_MAP )
206
- if (USE_ANONYMOUS_NEW_MAP AND UMAP_ROOT )
207
- message (FATAL_ERROR "USE_ANONYMOUS_NEW_MAP and UMAP_ROOT options cannot coexist" )
208
- endif ()
209
-
210
- list (APPEND METALL_DEFS "METALL_USE_ANONYMOUS_NEW_MAP" )
211
- message (STATUS "Use the anonymous map for new map region" )
212
- endif ()
213
143
214
144
# Requirements for GCC
215
145
if (NOT RUN_BUILD_AND_TEST_WITH_CI )
@@ -220,6 +150,18 @@ if (NOT RUN_BUILD_AND_TEST_WITH_CI)
220
150
endif ()
221
151
endif ()
222
152
153
+ # ---------- Metall Macros ---------- #
154
+ foreach (X ${COMPILER_DEFS} )
155
+ message (STATUS "Metall compile definition: ${X} " )
156
+ endforeach ()
157
+
158
+
159
+ # ---------- CMAKE_BUILD_TYPE ---------- #
160
+ if (NOT CMAKE_BUILD_TYPE )
161
+ set (CMAKE_BUILD_TYPE Release )
162
+ message (STATUS "CMAKE_BUILD_TYPE is set as Release" )
163
+ endif ()
164
+
223
165
224
166
# ---------- Threads ---------- #
225
167
find_package (Threads REQUIRED )
@@ -304,8 +246,8 @@ function(common_setup_for_metall_executable name)
304
246
# --------------------
305
247
306
248
# ----- Compile Definitions ----- #
307
- foreach (X IN LISTS METALL_DEFS )
308
- target_compile_definitions (${name} PRIVATE ${X} )
249
+ foreach (X ${COMPILER_DEFS} )
250
+ target_compile_definitions (${name} PRIVATE ${X} )
309
251
endforeach ()
310
252
# --------------------
311
253
@@ -325,7 +267,7 @@ function(common_setup_for_metall_executable name)
325
267
target_include_directories (${name} PRIVATE ${UMAP_ROOT} /include )
326
268
if (LIBUMAP )
327
269
target_link_libraries (${name} PRIVATE ${LIBUMAP} )
328
- target_compile_definitions (${name} PRIVATE METALL_USE_UMAP )
270
+ target_compile_definitions (${name} PRIVATE " METALL_USE_UMAP" )
329
271
endif ()
330
272
endif ()
331
273
# --------------------
0 commit comments