From c4401d8e26b8073ad1311239aca3aa78c7beb810 Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Mon, 30 Jul 2018 18:54:31 +0200
Subject: [PATCH] [test][1p] Reuse executable for restart test

---
 test/porousmediumflow/1p/implicit/CMakeLists.txt | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/test/porousmediumflow/1p/implicit/CMakeLists.txt b/test/porousmediumflow/1p/implicit/CMakeLists.txt
index 4bfccb804e..bbfe6bdfc0 100644
--- a/test/porousmediumflow/1p/implicit/CMakeLists.txt
+++ b/test/porousmediumflow/1p/implicit/CMakeLists.txt
@@ -53,9 +53,11 @@ dune_add_test(NAME test_1pnibox_conduction
                        --command "${CMAKE_CURRENT_BINARY_DIR}/test_1pnibox_conduction test_1pnifv_conduction.input -Problem.Name 1pnibox_conduction"
                        --zeroThreshold {"velocity_H2O":1e-8})
 
+add_executable(test_1pnibox_convection EXCLUDE_FROM_ALL test_1pnifv.cc)
+target_compile_definitions(test_1pnibox_convection PUBLIC TYPETAG=OnePNIConvectionBoxTypeTag)
+
 dune_add_test(NAME test_1pnibox_convection
-              SOURCES test_1pnifv.cc
-              COMPILE_DEFINITIONS TYPETAG=OnePNIConvectionBoxTypeTag
+              TARGET test_1pnibox_convection
               COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
               CMD_ARGS --script fuzzy
                        --files ${CMAKE_SOURCE_DIR}/test/references/1pniboxconvection-reference.vtp
@@ -64,8 +66,7 @@ dune_add_test(NAME test_1pnibox_convection
                        --zeroThreshold {"velocity":1e-15})
 
 dune_add_test(NAME test_1pnibox_convection_restart
-              SOURCES test_1pnifv.cc
-              COMPILE_DEFINITIONS TYPETAG=OnePNIConvectionBoxTypeTag
+              TARGET test_1pnibox_convection
               COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
               CMD_ARGS --script fuzzy
                        --files ${CMAKE_SOURCE_DIR}/test/references/1pniboxconvection-reference.vtp
-- 
GitLab