From: Matthias Maier
Date: Tue, 11 Jul 2023 05:59:32 +0000 (-0500)
Subject: CMake: remove support for ctest_memcheck() and run_memorycheck.cmake
X-Git-Tag: relicensing~700^2
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bc12789bbb0bbb1b8d12af248e6a89c924afd15;p=dealii.git
CMake: remove support for ctest_memcheck() and run_memorycheck.cmake
Instead of using valgrind it is much better to use compiler sanitizers
such as "-fsanitize=address,undefined,leak" with clang.
---
diff --git a/doc/developers/testsuite.html b/doc/developers/testsuite.html
index 0230c029c0..cce7ca3032 100644
--- a/doc/developers/testsuite.html
+++ b/doc/developers/testsuite.html
@@ -306,33 +306,6 @@ xx: =============================== OUTPUT END ============================
-
- Running with valgrind
-
-
- The testsuite can also be run using valgrind
- to check for memory corruption in the library.
-
-
-
- You can do so by invoking
-
- ctest -DMEMORYCHECK=ON <...> -S ../tests/run_testsuite.cmake
-
- when running the testsuite, or directly by
-
- ctest <...> -S ../tests/run_memorycheck.cmake
-
-
-
-
- At the end of all of this, results will be shown in a separate section
- "Dynamic Analysis" at the
- deal.II cdash site.
-
-
-
Generating coverage information
diff --git a/tests/run_memorycheck.cmake b/tests/run_memorycheck.cmake
deleted file mode 100644
index 8ad9716884..0000000000
--- a/tests/run_memorycheck.cmake
+++ /dev/null
@@ -1,3 +0,0 @@
-set(TRACK "Experimental")
-set(MEMORYCHECK TRUE)
-include(${CMAKE_CURRENT_LIST_DIR}/run_testsuite.cmake)
diff --git a/tests/run_testsuite.cmake b/tests/run_testsuite.cmake
index 9d8c721d44..e30878300e 100644
--- a/tests/run_testsuite.cmake
+++ b/tests/run_testsuite.cmake
@@ -81,10 +81,6 @@
# ctest_coverage() stage will be run. Test results must go into the
# "Experimental" section.
#
-# MEMORYCHECK
-# - If set to ON the CTEST_MEMORYCHECK() stage will be run.
-# Test results must go into the "Experimental" section.
-#
# MAKEOPTS
# - Additional options that will be passed directly to make (or ninja).
#
@@ -436,35 +432,6 @@ endif()
message("-- COVERAGE: ${COVERAGE}")
-#
-# Setup memcheck:
-#
-
-if(MEMORYCHECK)
- if(NOT TRACK MATCHES "Experimental")
- message(FATAL_ERROR "
-TRACK must be set to \"Experimental\" if Memcheck is enabled via
-MEMORYCHECK=TRUE.
-"
- )
- endif()
-
- find_program(MEMORYCHECK_COMMAND NAMES valgrind)
- if(MEMORYCOMMAND MATCHES "-NOTFOUND")
- message(FATAL_ERROR "
-Memcheck enabled but could not find the valgrind executable. Please install
-valgrind.
-"
- )
- endif()
-
- set(CTEST_MEMORYCHECK_COMMAND "${MEMORYCHECK_COMMAND}")
-endif()
-
-message("-- MEMORYCHECK: ${MEMORYCHECK}")
-
-
-
macro(create_targetdirectories_txt)
#
# It gets tricky: Fake a TargetDirectories.txt containing _all_ target
@@ -563,13 +530,9 @@ if("${_res}" STREQUAL "0")
if(DEAL_II_MSVC)
set(CTEST_BUILD_CONFIGURATION "${JOB_BUILD_CONFIGURATION}")
endif()
- if(MEMORYCHECK)
- message("-- Running ctest_memcheck()")
- ctest_memcheck()
- else()
- message("-- Running CTEST_TESTS()")
- ctest_test()
- endif()
+
+ message("-- Running CTEST_TESTS()")
+ ctest_test()
if(COVERAGE)
CREATE_TARGETDIRECTORIES_TXT()