diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac37cf96eb00ecc636a6377eb426d33eb2cf1458..63844d4d500d72c447703a299b1a8af0675e6bb7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -347,6 +347,9 @@ if( BUILD_TESTING AND NOT IS_SUBPROJECT )
     endif()
 endif()
 
+file(WRITE ${PROJECT_BINARY_DIR}/disabled-tests.log "${DISABLED_TESTS_LOG}")
+unset(DISABLED_TESTS_LOG CACHE) # Don't write to CMakeCache.txt
+
 # The configuration must be called from the source dir and not BaseLib/.
 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/BaseLib/BuildInfo.cpp.in"
     "${CMAKE_CURRENT_BINARY_DIR}/BaseLib/BuildInfo.cpp" @ONLY)
diff --git a/scripts/cmake/test/AddTest.cmake b/scripts/cmake/test/AddTest.cmake
index ebf7f4db6a7d8fa297c8c2fbae5dad47ddc821f3..5b0583398dbc1dd8f7bba022975a0bf0ebfedc86 100644
--- a/scripts/cmake/test/AddTest.cmake
+++ b/scripts/cmake/test/AddTest.cmake
@@ -75,7 +75,7 @@ function (AddTest)
     if(${AddTest_REQUIREMENTS})
         # message(STATUS "Enabling test ${AddTest_NAME}.")
     else()
-        message(STATUS "Requirement ${AddTest_REQUIREMENTS} not met! Disabling test ${AddTest_NAME}.")
+        set(DISABLED_TESTS_LOG "${DISABLED_TESTS_LOG}\nRequirement ${AddTest_REQUIREMENTS} not met! Disabling test ${AddTest_NAME}." CACHE INTERNAL "")
         return()
     endif()
 
@@ -83,7 +83,7 @@ function (AddTest)
         if(TIME_TOOL_PATH)
             set(WRAPPER_COMMAND time)
         else()
-            message(STATUS "WARNING: Disabling time wrapper for ${AddTest_NAME} as time exe was not found!")
+            set(DISABLED_TESTS_LOG "${DISABLED_TESTS_LOG}\nDisabling time wrapper for ${AddTest_NAME} as time exe was not found!" CACHE INTERNAL "")
             set(AddTest_WRAPPER_ARGS "")
         endif()
     elseif(AddTest_WRAPPER STREQUAL "memcheck")
@@ -91,7 +91,7 @@ function (AddTest)
             set(WRAPPER_COMMAND "${VALGRIND_TOOL_PATH} --tool=memcheck --log-file=${AddTest_SOURCE_PATH}/${AddTest_NAME}_memcheck.log -v --leak-check=full --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xff")
             set(tester memcheck)
         else()
-            message(STATUS "WARNING: Disabling memcheck wrapper for ${AddTest_NAME} as memcheck exe was not found!")
+            set(DISABLED_TESTS_LOG "${DISABLED_TESTS_LOG}\nDisabling memcheck wrapper for ${AddTest_NAME} as memcheck exe was not found!" CACHE INTERNAL "")
             set(AddTest_WRAPPER_ARGS "")
         endif()
     elseif(AddTest_WRAPPER STREQUAL "callgrind")
@@ -99,7 +99,7 @@ function (AddTest)
             set(WRAPPER_COMMAND "${VALGRIND_TOOL_PATH} --tool=callgrind --branch-sim=yes --cache-sim=yes --dump-instr=yes --collect-jumps=yes")
             unset(tester)
         else()
-            message(STATUS "WARNING: Disabling callgrind wrapper for ${AddTest_NAME} as callgrind exe was not found!")
+            set(DISABLED_TESTS_LOG "${DISABLED_TESTS_LOG}\nDisabling callgrind wrapper for ${AddTest_NAME} as callgrind exe was not found!" CACHE INTERNAL "")
             set(AddTest_WRAPPER_ARGS "")
         endif()
     elseif(AddTest_WRAPPER STREQUAL "mpirun")