foundationdb/cmake/FindValgrind.cmake

14 lines
431 B
CMake
Raw Normal View History

2019-06-11 06:30:57 +08:00
find_path(VALGRIND_INCLUDE_DIR
NAMES
valgrind.h
PATH_SUFFIXES include valgrind)
find_package_handle_standard_args(Valgrind
REQUIRED_VARS VALGRIND_INCLUDE_DIR
FAIL_MESSAGE "Could not find Valgrind header files, try set the path to the Valgrind headers in the variable Valgrind_ROOT")
if(VALGRIND_FOUND)
add_library(Valgrind INTERFACE)
target_include_directories(Valgrind INTERFACE "${VALGRIND_INCLUDE_DIR}")
endif()