From: Wolfgang Bangerth Date: Thu, 8 Apr 2021 17:40:37 +0000 (-0600) Subject: Improve error messages during configuration. X-Git-Tag: v9.3.0-rc1~218^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12027%2Fhead;p=dealii.git Improve error messages during configuration. --- diff --git a/cmake/macros/macro_deal_ii_find_file.cmake b/cmake/macros/macro_deal_ii_find_file.cmake index 6ce4c9885a..5ac033b0f2 100644 --- a/cmake/macros/macro_deal_ii_find_file.cmake +++ b/cmake/macros/macro_deal_ii_find_file.cmake @@ -18,11 +18,14 @@ # 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}") diff --git a/cmake/macros/macro_deal_ii_find_library.cmake b/cmake/macros/macro_deal_ii_find_library.cmake index 2f90bc32a1..7cbd9f2ac2 100644 --- a/cmake/macros/macro_deal_ii_find_library.cmake +++ b/cmake/macros/macro_deal_ii_find_library.cmake @@ -18,11 +18,14 @@ # 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}") diff --git a/cmake/macros/macro_deal_ii_find_path.cmake b/cmake/macros/macro_deal_ii_find_path.cmake index 520a1ba0fe..fb46a889b2 100644 --- a/cmake/macros/macro_deal_ii_find_path.cmake +++ b/cmake/macros/macro_deal_ii_find_path.cmake @@ -18,11 +18,14 @@ # 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}") diff --git a/cmake/macros/macro_deal_ii_find_program.cmake b/cmake/macros/macro_deal_ii_find_program.cmake index 4f3d3b89d5..b26a5c8b8f 100644 --- a/cmake/macros/macro_deal_ii_find_program.cmake +++ b/cmake/macros/macro_deal_ii_find_program.cmake @@ -18,11 +18,14 @@ # 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}")