summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-24 12:01:37 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-10-15 18:22:47 +0200
commite08c9b3a5681cd56293f2245ac049525c5a69b0e (patch)
tree2a897b5ed99dfe286ad37b04134206917ca079f8
parentf3ada4c77a609f3057c8dd0dbeae59f5159aad86 (diff)
Make use of LibEfence optional
Change-Id: I22b52611dab0be6021b08d6c6d63bc369df0b4d4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--cmake/cmake.d/01-build_options.cmake2
-rw-r--r--samples.d/config.cmake.sample1
2 files changed, 2 insertions, 1 deletions
diff --git a/cmake/cmake.d/01-build_options.cmake b/cmake/cmake.d/01-build_options.cmake
index 84649fc..112a1b2 100644
--- a/cmake/cmake.d/01-build_options.cmake
+++ b/cmake/cmake.d/01-build_options.cmake
@@ -97,7 +97,7 @@ foreach (PKG_CONFIG ${PKG_REQUIRED_LIST})
endforeach(PKG_CONFIG)
# Optional LibEfence Malloc debug library
-IF(CMAKE_BUILD_TYPE MATCHES DEBUG)
+IF(CMAKE_BUILD_TYPE MATCHES DEBUG AND USE_EFENCE)
CHECK_LIBRARY_EXISTS(efence malloc "" HAVE_LIBEFENCE)
IF(HAVE_LIBEFENCE)
MESSAGE(STATUS "Linking with ElectricFence for debugging purposes...")
diff --git a/samples.d/config.cmake.sample b/samples.d/config.cmake.sample
index 2497ee2..4b152cc 100644
--- a/samples.d/config.cmake.sample
+++ b/samples.d/config.cmake.sample
@@ -46,6 +46,7 @@ set(PROJECT_APP_TEMPLATES_DIR "conf.d/app-templates")
# Compilation Mode (DEBUG, RELEASE)
# ----------------------------------
set(CMAKE_BUILD_TYPE "DEBUG")
+set(USE_EFENCE 1)
# Kernel selection if needed. You can choose between a
# mandatory version to impose a minimal version.