]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: search for valgrind in performance subproject
authorMatthias Maier <tamiko@43-1.org>
Sun, 20 Feb 2022 18:39:32 +0000 (12:39 -0600)
committerMatthias Maier <tamiko@43-1.org>
Fri, 11 Mar 2022 21:46:34 +0000 (15:46 -0600)
tests/performance/CMakeLists.txt

index 0305d274cd62a8a59a1d141c67b4b1c10af1a465..2619be7aef876cba99aace5fcb1318dc094cf8fe 100644 (file)
@@ -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()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.