Skip to content

Commit 4f4400b

Browse files
committed
Add CMake option for LPP_USE_ALLOCATOR
1 parent 1df9105 commit 4f4400b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ ELSE ( ENABLE_NEDMALLOC )
8181
SET(DEFINE_USE_NEDMALLOC "undef")
8282
ENDIF ( ENABLE_NEDMALLOC )
8383

84+
IF ( ENABLE_STANDARD_ALLOCATOR )
85+
SET(DEFINE_USE_ALLOCATOR "undef")
86+
ELSE ( ENABLE_STANDARD_ALLOCATOR )
87+
SET(DEFINE_USE_ALLOCATOR "define")
88+
ENDIF ( ENABLE_STANDARD_ALLOCATOR )
89+
8490
IF ( ENABLE_CYCLIC_CHECK )
8591
SET(DEFINE_USE_CYCLIC_CHECK "define")
8692
ELSE ( ENABLE_CYCLIC_CHECK )

include/Config.h.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
#@DEFINE_USE_CYCLIC_CHECK@ LPP_USE_CYCLIC_CHECK
7979

8080
// Define to use custom allocator (useful in Windows builds and when using nedmalloc)
81-
#define LPP_USE_ALLOCATOR
81+
#@DEFINE_USE_ALLOCATOR@ LPP_USE_ALLOCATOR
8282

8383
// Define to use nedmalloc memory allocator
8484
#@DEFINE_USE_NEDMALLOC@ LPP_USE_NEDMALLOC

0 commit comments

Comments
 (0)