]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Improve error messages during configuration. 12027/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 8 Apr 2021 17:40:37 +0000 (11:40 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 15 Apr 2021 23:38:25 +0000 (17:38 -0600)
cmake/macros/macro_deal_ii_find_file.cmake
cmake/macros/macro_deal_ii_find_library.cmake
cmake/macros/macro_deal_ii_find_path.cmake
cmake/macros/macro_deal_ii_find_program.cmake

index 6ce4c9885afde7a0639931f9ce2d1ad460a032bb..5ac033b0f247ac13026255e7e4837f938989d0e0 100644 (file)
 #
 
 MACRO(DEAL_II_FIND_FILE _file_name)
+  # Save a string representation of the arguments before cmake's
+  # FIND_FILE gets its hands on it.
+  TO_STRING(_str ${ARGN})
+
   FIND_FILE(${_file_name} ${ARGN})
 
   IF(${_file_name} MATCHES "-NOTFOUND")
-    MESSAGE(STATUS "${_file_name} not found! Call:")
-    TO_STRING(_str ${ARGN})
+    MESSAGE(STATUS "${_file_name} not found! The call was:")
     MESSAGE(STATUS "    FIND_FILE(${_file_name} ${_str})")
   ELSE()
     MESSAGE(STATUS "Found ${_file_name}")
index 2f90bc32a1ade43f5b50a9484f7d165e0b4f08e7..7cbd9f2ac2f21354f360ecb7e4326dda2787ed65 100644 (file)
 #
 
 MACRO(DEAL_II_FIND_LIBRARY _library_name)
+  # Save a string representation of the arguments before cmake's
+  # FIND_FILE gets its hands on it.
+  TO_STRING(_str ${ARGN})
+
   FIND_LIBRARY(${_library_name} ${ARGN})
 
   IF(${_library_name} MATCHES "-NOTFOUND")
-    MESSAGE(STATUS "${_library_name} not found! Call:")
-    TO_STRING(_str ${ARGN})
+    MESSAGE(STATUS "${_library_name} not found! The call was:")
     MESSAGE(STATUS "    FIND_LIBRARY(${_library_name} ${_str})")
   ELSE()
     MESSAGE(STATUS "Found ${_library_name}")
index 520a1ba0fe52a994af0d5f4a324a314b752a901b..fb46a889b29cd4e32fb3b126c8bfdb3c42f00326 100644 (file)
 #
 
 MACRO(DEAL_II_FIND_PATH _path_name)
+  # Save a string representation of the arguments before cmake's
+  # FIND_PATH gets its hands on it.
+  TO_STRING(_str ${ARGN})
+
   FIND_PATH(${_path_name} ${ARGN})
 
   IF(${_path_name} MATCHES "-NOTFOUND")
-    MESSAGE(STATUS "${_path_name} not found! Call:")
-    TO_STRING(_str ${ARGN})
+    MESSAGE(STATUS "${_path_name} not found! The call was:")
     MESSAGE(STATUS "    FIND_PATH(${_path_name} ${_str})")
   ELSE()
     MESSAGE(STATUS "Found ${_path_name}")
index 4f3d3b89d5e8a447dd7409f27b721d0805283f49..b26a5c8b8ffe7ea9a1385bd37fbacbd6636c64cf 100644 (file)
 #
 
 MACRO(DEAL_II_FIND_PROGRAM _file_name)
+  # Save a string representation of the arguments before cmake's
+  # FIND_PROGRAM gets its hands on it.
+  TO_STRING(_str ${ARGN})
+
   FIND_PROGRAM(${_file_name} ${ARGN})
 
   IF(${_file_name} MATCHES "-NOTFOUND")
-    MESSAGE(STATUS "${_file_name} not found! Call:")
-    TO_STRING(_str ${ARGN})
+    MESSAGE(STATUS "${_file_name} not found! The call was:")
     MESSAGE(STATUS "    FIND_PROGRAM(${_file_name} ${_str})")
   ELSE()
     MESSAGE(STATUS "Found ${_file_name}")

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.