Small cleanup on last commit
parent
68a85afed0
commit
0c6ea4057c
|
@ -205,19 +205,14 @@ if(GTSAM_USE_TBB)
|
||||||
else()
|
else()
|
||||||
list(APPEND possible_allocators BoostPool STL)
|
list(APPEND possible_allocators BoostPool STL)
|
||||||
set(preferred_allocator BoostPool)
|
set(preferred_allocator BoostPool)
|
||||||
if(GOOGLE_PERFTOOLS_FOUND)
|
endif()
|
||||||
list(APPEND possible_allocators tcmalloc)
|
if(GOOGLE_PERFTOOLS_FOUND)
|
||||||
endif()
|
list(APPEND possible_allocators tcmalloc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Check if current allocator choice is valid
|
# Check if current allocator choice is valid and set cache option
|
||||||
list(FIND possible_allocators "${GTSAM_DEFAULT_ALLOCATOR}" allocator_valid)
|
list(FIND possible_allocators "${GTSAM_DEFAULT_ALLOCATOR}" allocator_valid)
|
||||||
if(allocator_valid EQUAL -1)
|
if(allocator_valid EQUAL -1)
|
||||||
set(force_allocator true)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Set allocator cache option
|
|
||||||
if(force_allocator)
|
|
||||||
set(GTSAM_DEFAULT_ALLOCATOR ${preferred_allocator} CACHE STRING "Default allocator" FORCE)
|
set(GTSAM_DEFAULT_ALLOCATOR ${preferred_allocator} CACHE STRING "Default allocator" FORCE)
|
||||||
else()
|
else()
|
||||||
set(GTSAM_DEFAULT_ALLOCATOR ${preferred_allocator} CACHE STRING "Default allocator")
|
set(GTSAM_DEFAULT_ALLOCATOR ${preferred_allocator} CACHE STRING "Default allocator")
|
||||||
|
|
Loading…
Reference in New Issue