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=refs%2Fpull%2F6169%2Fhead;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: