mariadb/cmake_modules/FindValgrind.cmake
Leif Walsh 576ecc92a2 [t:5006] change what we search for so VALGRIND_PREFIX makes more sense
git-svn-id: file:///svn/toku/tokudb@44253 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-17 00:00:43 -04:00

20 lines
No EOL
738 B
CMake

# 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 include/valgrind/memcheck.h ${VALGRIND_PREFIX} /usr/local /usr)
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)