From ec85cb472fe5646289bcf8010bff9b23d9f43356 Mon Sep 17 00:00:00 2001 From: Timo Koch Date: Wed, 27 May 2020 15:13:00 +0200 Subject: [PATCH 1/2] Deprecate valgrind wrapper Using valgrind works fine without manually setting things. This was previously used to check some uninitialized values. However, we should never have uninitialized values anyway, so instead such a code should be improved. --- dumux/common/valgrind.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/dumux/common/valgrind.hh b/dumux/common/valgrind.hh index 435492e750..d10ac3a796 100644 --- a/dumux/common/valgrind.hh +++ b/dumux/common/valgrind.hh @@ -23,6 +23,7 @@ */ #ifndef DUMUX_VALGRIND_HH #define DUMUX_VALGRIND_HH +#warning "This header is deprecated and will be removed after release 3.3" #if ! HAVE_VALGRIND namespace Valgrind -- GitLab From 574f9c52aa827985c31c2b7460399566e285d4cc Mon Sep 17 00:00:00 2001 From: Timo Koch Date: Wed, 27 May 2020 15:20:29 +0200 Subject: [PATCH 2/2] [preprocessor][cmake] Don't look for valgrind / HAVE_VALGRIND will always be false --- cmake/modules/FindValgrind.cmake | 45 -------------------------------- config.h.cmake | 3 --- 2 files changed, 48 deletions(-) delete mode 100644 cmake/modules/FindValgrind.cmake diff --git a/cmake/modules/FindValgrind.cmake b/cmake/modules/FindValgrind.cmake deleted file mode 100644 index e7251791b3..0000000000 --- a/cmake/modules/FindValgrind.cmake +++ /dev/null @@ -1,45 +0,0 @@ -# -# Module that checks whether Valgrind's header memcheck.h is present -# -# Variables used by this module which you may want to set: -# VALGRIND_ROOT Path list to search for memcheck.h -# -# Sets the follwing variable: -# -# Valgrind_FOUND True if Valgrind was found -# VALGRIND_INCLUDE_DIR Path to Valgrind's include dirs. - - -# look for header files, only at positions given by the user -find_path(VALGRIND_INCLUDE_DIR - NAMES "valgrind/memcheck.h" - PATHS ${VALGRIND_ROOT} - PATH_SUFFIXES "include" - NO_DEFAULT_PATH -) -# look for header files, including default paths -find_path(VALGRIND_INCLUDE_DIR - NAMES "valgrind/memcheck.h" - PATH_SUFFIXES "include" -) - -# handle package arguments -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - "Valgrind" - DEFAULT_MSG - VALGRIND_INCLUDE_DIR -) - -# set HAVE_VALGRIND for config.h -set(HAVE_VALGRIND ${Valgrind_FOUND}) - -# register all Valgrind related flags -if(Valgrind_FOUND) - dune_register_package_flags(INCLUDE_DIRS "${VALGRIND_INCLUDE_DIR}") -endif() - -# text for feature summary -set_package_properties("Valgrind" PROPERTIES - DESCRIPTION "Memory debugging, memory leak detection, profiling" - PURPOSE "Identify undefined variables with Memcheck") diff --git a/config.h.cmake b/config.h.cmake index 0480729745..f7f2bc4b05 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -43,9 +43,6 @@ /* Define the path to dumux */ #define DUMUX_SOURCE_DIR "${CMAKE_SOURCE_DIR}" -/* Define to 1 if Valgrind was found */ -#cmakedefine HAVE_VALGRIND 1 - /* Define to 1 if gnuplot was found */ #cmakedefine HAVE_GNUPLOT 1 -- GitLab