From 13141f3fddc5a77f6cf7f211370da1f07583d6ed Mon Sep 17 00:00:00 2001
From: Bernd Flemisch <bernd@iws.uni-stuttgart.de>
Date: Fri, 8 Dec 2017 17:37:07 +0100
Subject: [PATCH] fix add_dumux_test for use with Dune 2.6

add_dumux_test forwards to dune_add_test. Since Dune 2.6, this takes
only the "real" command behind COMMAND, the arguments to that command
have to follow behind CMD_ARGS.
---
 cmake/modules/DumuxTestMacros.cmake | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cmake/modules/DumuxTestMacros.cmake b/cmake/modules/DumuxTestMacros.cmake
index 71b6881d7a..3c0ddb5d35 100644
--- a/cmake/modules/DumuxTestMacros.cmake
+++ b/cmake/modules/DumuxTestMacros.cmake
@@ -52,9 +52,12 @@ macro(add_dumux_test dumux_test dumux_test_executable dumux_test_executable_sour
     # tests always require the executable to run
     set_tests_properties(${dumux_test} PROPERTIES REQUIRED_FILES ${dumux_test_executable})
   else()
+    list(GET dumux_test_args 0 dumux_test_command)
+    list(REMOVE_AT dumux_test_args 0)
     dune_add_test(NAME ${dumux_test}
                   TARGET ${dumux_test_executable}
-                  COMMAND ${dumux_test_args}
+                  COMMAND ${dumux_test_command}
+                  CMD_ARGS ${dumux_test_args}
                   TIMEOUT 600) # set default timeout
     # tests always require the executable to run
     set_tests_properties(${dumux_test} PROPERTIES REQUIRED_FILES ${dumux_test_executable})
-- 
GitLab