diff --git a/CMakeLists.txt b/CMakeLists.txt
index 900ccc90f7bcff4ee97c735b179e9fe5420e28e8..a36421bb8a009353f7113dd7305decea1e081a5a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -265,6 +265,12 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/ThirdParty/vtkdiff/CMakeLists.txt AND BUILD_TEST
     install(PROGRAMS $<TARGET_FILE:vtkdiff> DESTINATION bin COMPONENT ogs_extras)
 endif()
 
+# xdmfdiff
+if(EXISTS ${PROJECT_SOURCE_DIR}/ThirdParty/xdmfdiff/CMakeLists.txt AND BUILD_TESTING)
+    add_subdirectory(ThirdParty/xdmfdiff)
+    install(PROGRAMS $<TARGET_FILE:xdmfdiff> DESTINATION bin COMPONENT ogs_extras)
+endif()
+
 include(scripts/cmake/CheckHeaderCompilation.cmake)
 
 add_subdirectory(Applications)
diff --git a/scripts/cmake/test/AddTest.cmake b/scripts/cmake/test/AddTest.cmake
index e44273373efe8ce411416ea4e44db150377d8864..08dfceda927b57193733d9a02530994796ae57ca 100644
--- a/scripts/cmake/test/AddTest.cmake
+++ b/scripts/cmake/test/AddTest.cmake
@@ -136,6 +136,9 @@ function (AddTest)
     if(AddTest_TESTER STREQUAL "vtkdiff" AND NOT TARGET vtkdiff)
         return()
     endif()
+    if(AddTest_TESTER STREQUAL "xdmfdiff" AND NOT TARGET xdmfdiff)
+        return()
+    endif()
     if(AddTest_TESTER STREQUAL "memcheck" AND NOT GREP_TOOL_PATH)
         return()
     endif()
@@ -147,7 +150,7 @@ function (AddTest)
         endif()
     endif()
 
-    if((AddTest_TESTER STREQUAL "diff" OR AddTest_TESTER STREQUAL "vtkdiff") AND NOT AddTest_DIFF_DATA)
+    if((AddTest_TESTER STREQUAL "diff" OR AddTest_TESTER STREQUAL "vtkdiff" OR AddTest_TESTER STREQUAL "xdmfdiff") AND NOT AddTest_DIFF_DATA)
         message(FATAL_ERROR "AddTest(): ${AddTest_NAME} - no DIFF_DATA given!")
     endif()
 
@@ -156,6 +159,8 @@ function (AddTest)
         set(TESTER_ARGS "-sbB")
     elseif(AddTest_TESTER STREQUAL "vtkdiff")
         set(SELECTED_DIFF_TOOL_PATH $<TARGET_FILE:vtkdiff>)
+    elseif(AddTest_TESTER STREQUAL "xdmfdiff")
+        set(SELECTED_DIFF_TOOL_PATH $<TARGET_FILE:xdmfdiff>)
     endif()
 
     if(AddTest_TESTER STREQUAL "diff")
@@ -165,7 +170,7 @@ function (AddTest)
                 ${TESTER_ARGS} ${AddTest_SOURCE_PATH}/${FILE_EXPECTED} \
                 ${AddTest_BINARY_PATH}/${FILE}")
         endforeach()
-    elseif(AddTest_TESTER STREQUAL "vtkdiff")
+    elseif(AddTest_TESTER STREQUAL "vtkdiff" OR AddTest_TESTER STREQUAL "xdmfdiff")
         list(LENGTH AddTest_DIFF_DATA DiffDataLength)
         math(EXPR DiffDataLengthMod4 "${DiffDataLength} % 4")
         math(EXPR DiffDataLengthMod6 "${DiffDataLength} % 6")