FindValgrind.cmake 773 B

12345678910111213141516171819
  1. # Find Valgrind.
  2. #
  3. # This module defines:
  4. # VALGRIND_INCLUDE_DIR, where to find valgrind/memcheck.h, etc.
  5. # VALGRIND_PROGRAM, the valgrind executable.
  6. # VALGRIND_FOUND, If false, do not try to use valgrind.
  7. #
  8. # If you have valgrind installed in a non-standard place, you can define
  9. # VALGRIND_PREFIX to tell cmake where it is.
  10. find_path(VALGRIND_INCLUDE_DIR memcheck.h
  11. /usr/include /usr/include/valgrind /usr/local/include /usr/local/include/valgrind
  12. ${VALGRIND_PREFIX}/include ${VALGRIND_PREFIX}/include/valgrind)
  13. find_program(VALGRIND_PROGRAM NAMES valgrind PATH /usr/bin /usr/local/bin ${VALGRIND_PREFIX}/bin)
  14. find_package_handle_standard_args(VALGRIND DEFAULT_MSG VALGRIND_INCLUDE_DIR VALGRIND_PROGRAM)
  15. mark_as_advanced(VALGRIND_INCLUDE_DIR VALGRIND_PROGRAM)