]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: set policy in subdirectory 6169/head
authorMatthias Maier <tamiko@43-1.org>
Thu, 5 Apr 2018 17:38:19 +0000 (12:38 -0500)
committerMatthias Maier <tamiko@43-1.org>
Thu, 5 Apr 2018 17:38:19 +0000 (12:38 -0500)
Due to the call to CMAKE_MINIM_REQUIRED we have to set the policy in the
subdirectory again...

Closes: #6134
tests/CMakeLists.txt

index 608e411f71a8d27ba28c4df87fff832533681a91..cfa8b2ef6082416244543183bf6a453995b3ed81 100644 (file)
@@ -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:

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.