blob: ac94279585e4a23e39271b1b11cff4c6360c3d57 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001From 24e2b0edc2612acefcc48414bb6f0aeb086061a9 Mon Sep 17 00:00:00 2001
Patrick Williamsb48b7b42016-08-17 15:04:38 -05002From: Jackie Huang <jackie.huang@windriver.com>
Brad Bishop19323692019-04-05 15:28:33 -04003Date: Tue, 26 Feb 2019 23:57:06 -0800
Patrick Williamsb48b7b42016-08-17 15:04:38 -05004Subject: [PATCH] configure.cmake: fix valgrind
5
6Check valgrind headers only if WITH_VALGRIND is set.
7
8mariadb uses two macros for valgrind compilations:
9HAVE_valgrind - valgrind is installed and can be set by configure option -DWITH_VALGRIND
10HAVE_VALGRIND - valgrind debug libraries is installed, set by auto check
11
12We would like to set them both by the configure option so that we can use
13PACKAGECONFIG to decide if valgrind is needed or not.
14
15Upstream-Status: Inappropriate [oe specific]
16
17Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Brad Bishop19323692019-04-05 15:28:33 -040018Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
19
Patrick Williamsb48b7b42016-08-17 15:04:38 -050020---
Brad Bishop19323692019-04-05 15:28:33 -040021 configure.cmake | 5 ++---
22 1 file changed, 2 insertions(+), 3 deletions(-)
Patrick Williamsb48b7b42016-08-17 15:04:38 -050023
24diff --git a/configure.cmake b/configure.cmake
Brad Bishop19323692019-04-05 15:28:33 -040025index 3cfc4b31..d017b3b3 100644
Patrick Williamsb48b7b42016-08-17 15:04:38 -050026--- a/configure.cmake
27+++ b/configure.cmake
Brad Bishop19323692019-04-05 15:28:33 -040028@@ -930,10 +930,9 @@ HAVE_GCC_C11_ATOMICS)
Patrick Williamsb48b7b42016-08-17 15:04:38 -050029
30 IF(WITH_VALGRIND)
31 SET(HAVE_valgrind 1)
Brad Bishop19323692019-04-05 15:28:33 -040032-ENDIF()
33-
Patrick Williamsb48b7b42016-08-17 15:04:38 -050034-CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h"
Brad Bishop19323692019-04-05 15:28:33 -040035+ CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h"
36 HAVE_VALGRIND_MEMCHECK_H)
37+ENDIF()
Patrick Williamsb48b7b42016-08-17 15:04:38 -050038
39 #--------------------------------------------------------------------
40 # Check for IPv6 support