]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: change a warning into an error 15252/head
authorMatthias Maier <tamiko@43-1.org>
Tue, 23 May 2023 21:18:36 +0000 (16:18 -0500)
committerMatthias Maier <tamiko@43-1.org>
Tue, 23 May 2023 21:20:32 +0000 (16:20 -0500)
For the time being we are not prepared to encounter an undefined target
at this point of the configure process. Thus simply emit a fatal error
instead of a warning.

cmake/macros/macro_copy_target_properties.cmake
cmake/macros/macro_define_interface_target.cmake

index c9b62b21b254c64386f2a22e543ff9490ff9ac9e..6533dfeef16f72fccfaf2e5131341ea6af48ef8a 100644 (file)
@@ -79,11 +79,13 @@ function(copy_target_properties _destination_target)
       if(TARGET ${_lib})
         list(APPEND _source_targets ${_lib})
       else()
-        # Warn loudly if we encounter an undefined target:
+        #
+        # Complain loudly if we encounter an undefined target:
+        #
         if("${_lib}" MATCHES "::")
-          message(WARNING
+          message(FATAL_ERROR
             "Undefined imported target name »${_lib}« present in interface "
-            "of target »${_entry}«"
+            "of target »${_entry}«."
             )
         endif()
         list(APPEND _libraries ${_lib})
index a3dff00f31e0574efba9d241c229ad2c291531a3..0bc0591dbf54ee1d131703b54817e083bacef121 100644 (file)
@@ -93,9 +93,11 @@ function(define_interface_target _feature)
       )
     if(NOT "${_libraries}" STREQUAL "")
       foreach(_lib ${_libraries})
-        # Warn loudly if we encounter an undefined target:
+        #
+        # Complain loudly if we encounter an undefined target:
+        #
         if("${_lib}" MATCHES "::")
-          message(WARNING
+          message(FATAL_ERROR
             "Undefined imported target name »${_lib}« present when defining "
             "interface target »${_interface_target}«"
             )

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.