Commit 3df4ae67 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:5006] support VALGRIND_PREFIX for using non-standard valgrind installations...

[t:5006] support VALGRIND_PREFIX for using non-standard valgrind installations (and error out correctly if we don't find valgrind).  fixes #5006

git-svn-id: file:///svn/toku/tokudb@44252 c7de825b-a66e-492c-adef-691d508d4ae1
parent ea1c9352
......@@ -30,6 +30,7 @@ endif ()
include_directories(SYSTEM
/usr/local/include
${ZLIB_INCLUDE_DIRS}
${VALGRIND_INCLUDE_DIRS}
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/include
......
# Find Valgrind.
#
# This module defines:
# VALGRIND_INCLUDE_DIR, where to find valgrind/memcheck.h, etc.
# VALGRIND_PROGRAM, the valgrind executable.
# VALGRIND_FOUND, If false, do not try to use valgrind.
#
# If you have valgrind installed in a non-standard place, you can define
# VALGRIND_PREFIX to tell cmake where it is.
message(STATUS "Valgrind Prefix: ${VALGRIND_PREFIX}")
find_path(VALGRIND_INCLUDE_DIR valgrind/memcheck.h
${VALGRIND_PREFIX}/include ${VALGRIND_PREFIX}/include/valgrind
/usr/local/include /usr/local/include/valgrind
/usr/include /usr/include/valgrind)
find_program(VALGRIND_PROGRAM NAMES valgrind PATH ${VALGRIND_PREFIX}/bin /usr/local/bin /usr/bin)
find_package_handle_standard_args(VALGRIND DEFAULT_MSG
VALGRIND_INCLUDE_DIR
VALGRIND_PROGRAM)
mark_as_advanced(VALGRIND_INCLUDE_DIR VALGRIND_PROGRAM)
\ No newline at end of file
......@@ -7,6 +7,8 @@ if(USE_BDB)
find_package(BDB REQUIRED)
endif()
find_package(VALGRIND REQUIRED)
include(CheckIncludeFiles)
## check for some include files
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment