From 983a265af68d13df9c89aed7b98e8d70d326044b Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 5 Apr 2018 12:38:19 -0500 Subject: [PATCH] CMake: set policy in subdirectory Due to the call to CMAKE_MINIM_REQUIRED we have to set the policy in the subdirectory again... Closes: #6134 --- tests/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 608e411f71..cfa8b2ef60 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -33,6 +33,16 @@ SET_IF_EMPTY(MAKEOPTS $ENV{MAKEOPTS}) IF(DEFINED DEAL_II_HAVE_TESTS_DIRECTORY) + # + # We have to repeat the policy statement here because the new + # CMAKE_MINIMUM_REQUIRED call resets our previous policy set in the main + # CMakeLists.txt file. + # + IF("${CMAKE_VERSION}" VERSION_LESS "3.11" AND POLICY CMP0037) + # allow to override "test" target for quick tests + CMAKE_POLICY(SET CMP0037 OLD) + ENDIF() + # # If this CMakeLists.txt file is called from within the deal.II build # system, set up quick tests as well: -- 2.39.5