From cdbe8c8aeadb4d9f2671fd565632ea39cf748c8f Mon Sep 17 00:00:00 2001
From: Florent Pruvost <florent.pruvost@inria.fr>
Date: Fri, 6 Feb 2015 17:28:17 +0000
Subject: [PATCH] fix an if in FindSTARPU.cmake headers find process

---
 cmake_modules/morse/find/FindSTARPU.cmake | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/cmake_modules/morse/find/FindSTARPU.cmake b/cmake_modules/morse/find/FindSTARPU.cmake
index 4de459a6b..376ee95f3 100644
--- a/cmake_modules/morse/find/FindSTARPU.cmake
+++ b/cmake_modules/morse/find/FindSTARPU.cmake
@@ -368,14 +368,18 @@ if( (NOT STARPU_SHM_FOUND) OR (NOT STARPU_SHM_LIBRARIES) OR
                 message(STATUS "Looking for starpu -- ${starpu_hdr} not found")
             endif()
             if(starpu_hdr STREQUAL "starpu_mpi.h")
-                if(NOT ${STARPU_FIND_REQUIRED_MPI} STREQUAL 1 AND NOT STARPU_FIND_QUIETLY)
-                    message(STATUS "Looking for starpu -- ${starpu_hdr} not required")
+                if(NOT ${STARPU_FIND_REQUIRED_MPI} STREQUAL 1)
+                    if (NOT STARPU_FIND_QUIETLY)
+                        message(STATUS "Looking for starpu -- ${starpu_hdr} not required")
+                    endif()
                 else()
                     list(APPEND STARPU_INCLUDE_DIRS "${STARPU_${starpu_hdr}_INCLUDE_DIRS}" )
                 endif()
             elseif( (starpu_hdr STREQUAL "starpu_cuda.h") OR (starpu_hdr STREQUAL "starpu_scheduler.h") )
-                if(NOT ${STARPU_FIND_REQUIRED_CUDA} STREQUAL 1 AND NOT STARPU_FIND_QUIETLY)
-                    message(STATUS "Looking for starpu -- ${starpu_hdr} not required")
+                if(NOT ${STARPU_FIND_REQUIRED_CUDA} STREQUAL 1)
+                    if (NOT STARPU_FIND_QUIETLY)
+                        message(STATUS "Looking for starpu -- ${starpu_hdr} not required")
+                    endif()
                 else()
                     list(APPEND STARPU_INCLUDE_DIRS "${STARPU_${starpu_hdr}_INCLUDE_DIRS}" )
                 endif()
-- 
GitLab