Fix missing early return() in xxx_not_found() dependency macros.
- This could result in potentially confusing output if dependencies
were found with the QUIET option: "XXX not found due to ...", followed
by "found <part of> XXX".
- If find_package() was called with REQUIRED, then a FATAL_ERROR was
triggered in the xxx_not_found() macros, resulting in early
termination.
Change-Id: Ibf59afd10067b9debd1a5e15f735a41b61bed52e
diff --git a/cmake/FindCXSparse.cmake b/cmake/FindCXSparse.cmake
index 623eefb..e6c21d2 100644
--- a/cmake/FindCXSparse.cmake
+++ b/cmake/FindCXSparse.cmake
@@ -100,6 +100,7 @@
# but continues configuration and allows generation.
message("-- Failed to find CXSparse - " ${REASON_MSG} ${ARGN})
endif ()
+ return()
endmacro(CXSPARSE_REPORT_NOT_FOUND)
# Handle possible presence of lib prefix for libraries on MSVC, see
diff --git a/cmake/FindEigen.cmake b/cmake/FindEigen.cmake
index 6d86197..5d8ecda 100644
--- a/cmake/FindEigen.cmake
+++ b/cmake/FindEigen.cmake
@@ -80,6 +80,7 @@
# but continues configuration and allows generation.
message("-- Failed to find Eigen - " ${REASON_MSG} ${ARGN})
endif ()
+ return()
endmacro(EIGEN_REPORT_NOT_FOUND)
# Search user-installed locations first, so that we prefer user installs
diff --git a/cmake/FindGflags.cmake b/cmake/FindGflags.cmake
index 7e39b9e..6587089 100644
--- a/cmake/FindGflags.cmake
+++ b/cmake/FindGflags.cmake
@@ -121,6 +121,7 @@
# but continues configuration and allows generation.
message("-- Failed to find gflags - " ${REASON_MSG} ${ARGN})
endif ()
+ return()
endmacro(GFLAGS_REPORT_NOT_FOUND)
# Verify that all variable names passed as arguments are defined (can be empty
diff --git a/cmake/FindGlog.cmake b/cmake/FindGlog.cmake
index 9ec157a..3057b31 100644
--- a/cmake/FindGlog.cmake
+++ b/cmake/FindGlog.cmake
@@ -93,6 +93,7 @@
# but continues configuration and allows generation.
message("-- Failed to find glog - " ${REASON_MSG} ${ARGN})
endif ()
+ return()
endmacro(GLOG_REPORT_NOT_FOUND)
# Handle possible presence of lib prefix for libraries on MSVC, see
diff --git a/cmake/FindSuiteSparse.cmake b/cmake/FindSuiteSparse.cmake
index 1086a9c..6815c03 100644
--- a/cmake/FindSuiteSparse.cmake
+++ b/cmake/FindSuiteSparse.cmake
@@ -147,7 +147,9 @@
message("-- Failed to find SuiteSparse - " ${REASON_MSG} ${ARGN})
endif (SuiteSparse_FIND_QUIETLY)
- # Do not call RETURN(), s/t we keep processing if not called with REQUIRED.
+ # Do not call return(), s/t we keep processing if not called with REQUIRED
+ # and report all missing components, rather than bailing after failing to find
+ # the first.
endmacro(SUITESPARSE_REPORT_NOT_FOUND)
# Handle possible presence of lib prefix for libraries on MSVC, see