From 009901f0597cae820b38193d3485754fba865048 Mon Sep 17 00:00:00 2001
From: Tobias Leibner <tobias.leibner@googlemail.com>
Date: Mon, 19 Nov 2018 16:15:28 +0100
Subject: [PATCH] [cmake.DuneXTTesting] fix dune_add_test usage

---
 cmake/modules/DuneXTTesting.cmake |  3 +--
 cmake/modules/FindMPI4PY.cmake    | 10 +++++-----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/cmake/modules/DuneXTTesting.cmake b/cmake/modules/DuneXTTesting.cmake
index ced9ddebf..2fb60aa54 100644
--- a/cmake/modules/DuneXTTesting.cmake
+++ b/cmake/modules/DuneXTTesting.cmake
@@ -140,7 +140,6 @@ macro(BEGIN_TESTCASES) # https://cmake.org/cmake/help/v3.0/module/FindGTest.html
 
     dune_execute_process(COMMAND
                          ${CMAKE_BINARY_DIR}/run-in-dune-env
-                         CMD_ARGS
                          dxt_code_generation.py
                          "${config_fn}"
                          "${template}"
@@ -157,7 +156,7 @@ macro(BEGIN_TESTCASES) # https://cmake.org/cmake/help/v3.0/module/FindGTest.html
     add_custom_command(OUTPUT "${generated_sources}"
                        COMMAND ${CMAKE_BINARY_DIR}/run-in-dune-env dxt_code_generation.py "${config_fn}" "${template}"
                                "${CMAKE_BINARY_DIR}" "${out_fn}" "${last_dep_bindir}"
-                       DEPENDS "${config_fn}"
+                       DEPENDS "${config_fn}" "${template}"
                        VERBATIM USES_TERMINAL)
     foreach(gen_source ${generated_sources})
       string(REPLACE "${out_fn}."
diff --git a/cmake/modules/FindMPI4PY.cmake b/cmake/modules/FindMPI4PY.cmake
index f5d7e4969..2bd43bc2b 100644
--- a/cmake/modules/FindMPI4PY.cmake
+++ b/cmake/modules/FindMPI4PY.cmake
@@ -16,15 +16,15 @@
 # 1a660df142e9a
 
 if(NOT MPI4PY_INCLUDE_DIR)
-	execute_process(COMMAND "${DUNE_PYTHON_VIRTUALENV_EXECUTABLE}" "-c" "import mpi4py; print(mpi4py.get_include())"
+  execute_process(COMMAND "${DUNE_PYTHON_VIRTUALENV_EXECUTABLE}" "-c" "import mpi4py; print(mpi4py.get_include())"
                   OUTPUT_VARIABLE MPI4PY_INCLUDE_DIR
                   RESULT_VARIABLE MPI4PY_COMMAND_RESULT
                   OUTPUT_STRIP_TRAILING_WHITESPACE)
   if(MPI4PY_COMMAND_RESULT)
-	execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import mpi4py; print(mpi4py.get_include())"
-                  OUTPUT_VARIABLE MPI4PY_INCLUDE_DIR
-                  RESULT_VARIABLE MPI4PY_COMMAND_RESULT
-                  OUTPUT_STRIP_TRAILING_WHITESPACE)
+    execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import mpi4py; print(mpi4py.get_include())"
+                    OUTPUT_VARIABLE MPI4PY_INCLUDE_DIR
+                    RESULT_VARIABLE MPI4PY_COMMAND_RESULT
+                    OUTPUT_STRIP_TRAILING_WHITESPACE)
   endif()
   if(MPI4PY_COMMAND_RESULT)
     message("jfa: mpi4py not found")
-- 
GitLab