File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,9 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
103
103
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR} /bin" CACHE PATH "Executable/dll output dir." )
104
104
endif ()
105
105
106
- set (JSONCPP_USE_SECURE_MEMORY "0" CACHE STRING "-D...=1 to use memory-wiping allocator for STL" )
106
+ if (JSONCPP_USE_SECURE_MEMORY)
107
+ add_definitions ("-DJSONCPP_USE_SECURE_MEMORY=1" )
108
+ endif ()
107
109
108
110
configure_file ("${PROJECT_SOURCE_DIR} /version.in"
109
111
"${PROJECT_BINARY_DIR} /version"
Original file line number Diff line number Diff line change 18
18
((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | \
19
19
(JSONCPP_VERSION_PATCH << 8))
20
20
21
- #ifdef JSONCPP_USING_SECURE_MEMORY
22
- #undef JSONCPP_USING_SECURE_MEMORY
23
- #endif
21
+ #if !defined(JSONCPP_USE_SECURE_MEMORY )
24
22
#define JSONCPP_USING_SECURE_MEMORY 0
23
+ #endif
25
24
// If non-zero, the library zeroes any memory that it has allocated before
26
25
// it frees its memory.
27
26
You can’t perform that action at this time.
0 commit comments