From 727e3dc51a84286885cf0fd406834ac0a1561734 Mon Sep 17 00:00:00 2001 From: Quentin Glidic Date: Tue, 4 Jul 2017 15:35:49 +0200 Subject: [PATCH] meson: Actually define TIMINGS if needed (#621) Signed-off-by: Quentin Glidic --- include/timings.h | 2 +- meson.build | 1 + source/timings.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/timings.h b/include/timings.h index 41e0de3e..c57f4e9b 100644 --- a/include/timings.h +++ b/include/timings.h @@ -34,7 +34,7 @@ * @ingroup HELPERS * @{ */ -#if TIMINGS +#ifdef TIMINGS /** * Init the timestamping mechanism . * implementation. diff --git a/meson.build b/meson.build index ac827d16..505a37ca 100644 --- a/meson.build +++ b/meson.build @@ -94,6 +94,7 @@ endif header_conf.set('ENABLE_DRUN', get_option('enable-drun')) header_conf.set('WINDOW_MODE', get_option('enable-window')) +header_conf.set('TIMINGS', get_option('enable-timings')) header_conf.set_quoted('MANPAGE_PATH', join_paths(get_option('prefix'), get_option('mandir'))) header_conf.set_quoted('SYSCONFDIR', join_paths(get_option('prefix'), get_option('sysconfdir'))) diff --git a/source/timings.c b/source/timings.c index b6d45e52..062af60a 100644 --- a/source/timings.c +++ b/source/timings.c @@ -28,7 +28,7 @@ #include #include "rofi.h" #include "timings.h" -#if TIMINGS +#ifdef TIMINGS GTimer *global_timer = NULL; double global_timer_last = 0.0; FILE *timing_log = NULL;