mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-29 01:58:26 +00:00
Make hiding ncurses memleaks optional and disable it by default
This commit is contained in:
parent
f695ed58d9
commit
0627946ca1
@ -87,6 +87,11 @@ option(BUILD_BUILTIN_CONFIG "Enable builtin default configuration" true)
|
|||||||
option(BUILD_MATH "Enable math support" true)
|
option(BUILD_MATH "Enable math support" true)
|
||||||
|
|
||||||
option(BUILD_NCURSES "Enable ncurses support" true)
|
option(BUILD_NCURSES "Enable ncurses support" true)
|
||||||
|
if(BUILD_NCURSES)
|
||||||
|
option(LEAKFREE_NCURSES "Enable to hide false ncurses-memleaks in valgrind (works only when ncurses is compiled with --disable-leaks)" false)
|
||||||
|
else(BUILD_NCURSES)
|
||||||
|
set(LEAKFREE_NCURSES false CACHE BOOL "Enable to hide false ncurses-memleaks in valgrind (works only when ncurses is compiled with --disable-leaks)" FORCE)
|
||||||
|
endif(BUILD_NCURSES)
|
||||||
|
|
||||||
option(BUILD_X11 "Build X11 support" true)
|
option(BUILD_X11 "Build X11 support" true)
|
||||||
if(BUILD_X11)
|
if(BUILD_X11)
|
||||||
|
@ -78,6 +78,7 @@
|
|||||||
#cmakedefine BUILD_BUILTIN_CONFIG 1
|
#cmakedefine BUILD_BUILTIN_CONFIG 1
|
||||||
|
|
||||||
#cmakedefine BUILD_NCURSES 1
|
#cmakedefine BUILD_NCURSES 1
|
||||||
|
#cmakedefine LEAKFREE_NCURSES 1
|
||||||
|
|
||||||
#cmakedefine BUILD_APCUPSD 1
|
#cmakedefine BUILD_APCUPSD 1
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#ifdef BUILD_NCURSES
|
#ifdef BUILD_NCURSES
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
#ifdef DEBUG
|
#ifdef LEAKFREE_NCURSES
|
||||||
#include "nc.h"
|
#include "nc.h"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -4344,7 +4344,7 @@ int main(int argc, char **argv)
|
|||||||
kvm_close(kd);
|
kvm_close(kd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(BUILD_NCURSES) && defined(DEBUG)
|
#ifdef LEAKFREE_NCURSES
|
||||||
_nc_free_and_exit(0); //hide false memleaks
|
_nc_free_and_exit(0); //hide false memleaks
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user