From: Matthias Maier Date: Thu, 5 Apr 2018 17:38:19 +0000 (-0500) Subject: CMake: set policy in subdirectory X-Git-Tag: v9.0.0-rc1~228^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=983a265af68d13df9c89aed7b98e8d70d326044b;p=dealii.git 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 --- 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: