From 8e21f400782ea1953bf3ba5f9b15b44ba8108a1a Mon Sep 17 00:00:00 2001
From: Florent Pruvost <florent.pruvost@inria.fr>
Date: Fri, 30 Jan 2015 16:20:25 +0000
Subject: [PATCH] add hwloc dependency to find quark if hwloc found

---
 cmake_modules/morse/find/FindQUARK.cmake | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cmake_modules/morse/find/FindQUARK.cmake b/cmake_modules/morse/find/FindQUARK.cmake
index ec94845c2..d4778d370 100644
--- a/cmake_modules/morse/find/FindQUARK.cmake
+++ b/cmake_modules/morse/find/FindQUARK.cmake
@@ -192,6 +192,11 @@ if(QUARK_LIBRARIES)
     set(CMAKE_REQUIRED_INCLUDES  "${QUARK_INCLUDE_DIRS}")
     set(CMAKE_REQUIRED_LIBRARIES "${QUARK_LIBRARIES};${CMAKE_THREAD_LIBS_INIT}")
     set(CMAKE_REQUIRED_FLAGS     "-L${QUARK_LIBRARY_DIRS}")
+    if (HWLOC_FOUND)
+        list(APPEND CMAKE_REQUIRED_INCLUDES "${HWLOC_INCLUDE_DIRS}")
+        list(APPEND CMAKE_REQUIRED_LIBRARIES "${HWLOC_LIBRARIES}")
+        list(APPEND CMAKE_REQUIRED_FLAGS "-L${HWLOC_LIBRARIES}")
+    endif()
 
     unset(QUARK_WORKS CACHE)
     include(CheckFunctionExists)
-- 
GitLab