From 6e143754beaf7c275c73b5c501419e3ac0b40839 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Thu, 1 May 2003 11:25:35 -0400 Subject: [PATCH] ENH: Only compile memdebug when CURL_MALLOC_DEBUG is on --- Source/CTest/Curl/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/CTest/Curl/CMakeLists.txt b/Source/CTest/Curl/CMakeLists.txt index 9c269b10c..870ff8fb3 100644 --- a/Source/CTest/Curl/CMakeLists.txt +++ b/Source/CTest/Curl/CMakeLists.txt @@ -59,7 +59,6 @@ SET(libCurl_SRCS easy.c security.c krb4.c - memdebug.c http_chunks.c strtok.c connect.c @@ -69,6 +68,14 @@ SET(libCurl_SRCS content_encoding.c ) +OPTION(CURL_MALLOC_DEBUG "Debug mallocs in Curl" OFF) +MARK_AS_ADVANCED(CURL_MALLOC_DEBUG) +IF(CURL_MALLOC_DEBUG) + SET(libCurl_SRCS ${libCurl_SRCS} + memdebug.c + ) +ENDIF(CURL_MALLOC_DEBUG) + # On windows preload settings #IF(WIN32) # INCLUDE(${LIBCURL_SOURCE_DIR}/Platforms/WindowsCache.cmake)