diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cef0c3c..5ee08ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -36,8 +36,13 @@ find_package(FlatBuffers REQUIRED 1.4.0) | |||
36 | find_package(KAsync REQUIRED 0.1.2) | 36 | find_package(KAsync REQUIRED 0.1.2) |
37 | find_package(LMDB REQUIRED 0.9) | 37 | find_package(LMDB REQUIRED 0.9) |
38 | 38 | ||
39 | find_program(MEMORYCHECK_COMMAND valgrind) | 39 | if (${ENABLE_MEMCHECK}) |
40 | set(MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full") | 40 | find_program(MEMORYCHECK_COMMAND valgrind) |
41 | if(NOT MEMORYCHECK_COMMAND) | ||
42 | message(FATAL_ERROR "valgrind not found!") | ||
43 | endif() | ||
44 | set(MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full") | ||
45 | endif() | ||
41 | 46 | ||
42 | #Clang-format support | 47 | #Clang-format support |
43 | add_custom_command( | 48 | add_custom_command( |