From b7809c2d261a3bc39c91438bcb28b74bfda24e04 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruenich@dune-project.org>
Date: Wed, 15 Jul 2015 10:57:47 +0200
Subject: [PATCH] [cmake][Release] Rename variable to disable test magic.

---
 cmake/modules/DuneMacros.cmake     | 5 ++++-
 cmake/modules/DuneTestMacros.cmake | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/cmake/modules/DuneMacros.cmake b/cmake/modules/DuneMacros.cmake
index 9d9221c84..fca9fc8ae 100644
--- a/cmake/modules/DuneMacros.cmake
+++ b/cmake/modules/DuneMacros.cmake
@@ -654,6 +654,8 @@ macro(dune_project)
 
   # activate testing the DUNE way
   include(DuneTests)
+  # enable this way of testing by default
+  set(DUNE_TEST_MAGIC ON)
 
   # activate pkg-config
   include(DunePkgConfig)
@@ -882,7 +884,8 @@ endif()
     configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
   endif("${ARGC}" EQUAL "1")
 
-  if(NOT DUNE_DISABLE_TEST_MAGIC)
+  # add dependiencies to target "test"
+  if(DUNE_TEST_MAGIC)
     test_dep()
   endif()
 
diff --git a/cmake/modules/DuneTestMacros.cmake b/cmake/modules/DuneTestMacros.cmake
index 7cea1645c..732f998d0 100644
--- a/cmake/modules/DuneTestMacros.cmake
+++ b/cmake/modules/DuneTestMacros.cmake
@@ -47,7 +47,7 @@ endmacro(get_directory_test_target _target _dir)
 # E.g. for dune/istl/test the target will be dune_istl_test.
 #
 macro(add_directory_test_target _target)
-  if(NOT DUNE_DISABLE_TEST_MAGIC)
+  if(DUNE_TEST_MAGIC)
     get_directory_test_target(${_target} "${CMAKE_CURRENT_BINARY_DIR}")
     add_custom_target(${${_target}})
     dune_common_script_dir(SCRIPT_DIR)
-- 
GitLab