From: Matthias Maier Date: Sun, 20 Feb 2022 18:39:32 +0000 (-0600) Subject: CMake: search for valgrind in performance subproject X-Git-Tag: v9.4.0-rc1~372^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8618e20bfd44a5aa4fd009f8eb1fee8eac50bf4b;p=dealii.git CMake: search for valgrind in performance subproject --- diff --git a/tests/performance/CMakeLists.txt b/tests/performance/CMakeLists.txt index 0305d274cd..2619be7aef 100644 --- a/tests/performance/CMakeLists.txt +++ b/tests/performance/CMakeLists.txt @@ -1,4 +1,29 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0) INCLUDE(../setup_testsubproject.cmake) PROJECT(testsuite CXX) + +# +# Try to locate valgrind: +# + +FIND_PROGRAM(VALGRIND_EXECUTABLE + NAMES valgrind + HINTS ${VALGRIND_DIR} + PATH_SUFFIXES bin + ) + +FIND_PATH(VALGRIND_INCLUDE_DIR valgrind/callgrind.h + HINTS ${VALGRIND_DIR} + PATH_SUFFIXES include + ) + +IF( NOT VALGRIND_EXECUTABLE MATCHES "-NOTFOUND" AND + NOT VALGRIND_INCLUDE_DIR MATCHES "-NOTFOUND" ) + MESSAGE(STATUS "Found valgrind at ${VALGRIND_EXECUTABLE}") + SET(DEAL_II_WITH_VALGRIND TRUE) +ELSE() + MESSAGE(STATUS "COuld not find valgrind") + SET(DEAL_II_WITH_VALGRIND FALSE) +ENDIF() + DEAL_II_PICKUP_TESTS()