comparison OrthancServer/CMakeLists.txt @ 5159:f5907aecbaed

conditional usage of malloc_trim
author Alain Mazy <am@osimis.io>
date Thu, 02 Feb 2023 11:28:35 +0100
parents f2dcdbe05884
children 0ea402b4d901
comparison
equal deleted inserted replaced
5158:02cfd23a556a 5159:f5907aecbaed
279 ##################################################################### 279 #####################################################################
280 ## Configuration of the C/C++ macros 280 ## Configuration of the C/C++ macros
281 ##################################################################### 281 #####################################################################
282 282
283 check_symbol_exists(mallopt "malloc.h" HAVE_MALLOPT) 283 check_symbol_exists(mallopt "malloc.h" HAVE_MALLOPT)
284 check_symbol_exists(malloc_trim "malloc.h" HAVE_MALLOC_TRIM)
284 285
285 if (HAVE_MALLOPT) 286 if (HAVE_MALLOPT)
286 add_definitions(-DHAVE_MALLOPT=1) 287 add_definitions(-DHAVE_MALLOPT=1)
287 else() 288 else()
288 add_definitions(-DHAVE_MALLOPT=0) 289 add_definitions(-DHAVE_MALLOPT=0)
289 endif() 290 endif()
290 291
292 if (HAVE_MALLOC_TRIM)
293 add_definitions(-DHAVE_MALLOC_TRIM=1)
294 else()
295 add_definitions(-DHAVE_MALLOC_TRIM=0)
296 endif()
291 297
292 if (STATIC_BUILD) 298 if (STATIC_BUILD)
293 add_definitions(-DORTHANC_STATIC=1) 299 add_definitions(-DORTHANC_STATIC=1)
294 else() 300 else()
295 add_definitions(-DORTHANC_STATIC=0) 301 add_definitions(-DORTHANC_STATIC=0)