From 3ecb15e298c0a2b297c84b6d1f90388b3e1746a8 Mon Sep 17 00:00:00 2001
From: Florent Pruvost <florent.pruvost@inria.fr>
Date: Tue, 29 May 2018 10:33:21 +0200
Subject: [PATCH] _DEP variables was not set

---
 modules/find/FindHYPRE.cmake | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/find/FindHYPRE.cmake b/modules/find/FindHYPRE.cmake
index 2beb94d..944d33d 100644
--- a/modules/find/FindHYPRE.cmake
+++ b/modules/find/FindHYPRE.cmake
@@ -280,11 +280,12 @@ if(HYPRE_LIBRARIES)
   check_function_exists(HYPRE_StructGridCreate HYPRE_WORKS)
   mark_as_advanced(HYPRE_WORKS)
 
-  if(NOT HYPRE_WORKS)
+  if(HYPRE_WORKS)
     # save link with dependencies
     set(HYPRE_LIBRARIES_DEP "${REQUIRED_LIBS}")
     set(HYPRE_LIBRARY_DIRS_DEP "${REQUIRED_LIBDIRS}")
     set(HYPRE_INCLUDE_DIRS_DEP "${REQUIRED_INCDIRS}")
+  else()
     if(NOT HYPRE_FIND_QUIETLY)
       message(STATUS "Looking for HYPRE : test of HYPRE_StructGridCreate with HYPRE library fails")
       message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}")
-- 
GitLab