From 99cb609597c57e2dd843d15c16a5ee9c3665727f Mon Sep 17 00:00:00 2001
From: Florent Pruvost <florent.pruvost@inria.fr>
Date: Thu, 22 Jan 2015 14:07:57 +0000
Subject: [PATCH] add a MORSE_VERBOSE mode to activate or not hints during the
 detection - remove specific print functions inside Finds (should remain
 generic) - upgrade FindBLAS

---
 CMakeLists.txt                                | 230 ++++++++---
 cmake_modules/morse/MorseInit.cmake           |   6 +
 cmake_modules/morse/find/FindBLAS.cmake       | 368 ++++++++++++------
 cmake_modules/morse/find/FindBLASEXT.cmake    |  66 ++--
 cmake_modules/morse/find/FindCBLAS.cmake      |  46 +--
 cmake_modules/morse/find/FindFXT.cmake        |  52 +--
 cmake_modules/morse/find/FindHWLOC.cmake      |  58 +--
 cmake_modules/morse/find/FindLAPACK.cmake     | 201 ++++++----
 cmake_modules/morse/find/FindLAPACKE.cmake    |  44 +--
 cmake_modules/morse/find/FindLAPACKEXT.cmake  |  62 ++-
 cmake_modules/morse/find/FindMAGMA.cmake      |  52 +--
 cmake_modules/morse/find/FindMETIS.cmake      |  28 +-
 cmake_modules/morse/find/FindPARMETIS.cmake   |  29 +-
 cmake_modules/morse/find/FindPTSCOTCH.cmake   |  38 +-
 cmake_modules/morse/find/FindQUARK.cmake      |  22 +-
 cmake_modules/morse/find/FindSCOTCH.cmake     |  32 +-
 cmake_modules/morse/find/FindSTARPU.cmake     | 344 ++++++++--------
 cmake_modules/morse/find/FindTMG.cmake        |  20 +-
 .../morse/find/PrintFindStatus.cmake          |  12 +-
 19 files changed, 938 insertions(+), 772 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0bf26b3fe..6d5e6d9b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,7 +66,6 @@ set(CHAMELEON_DEFINITIONS_LIST "")
 # ------------------------------------------------------------------
 add_definitions(-DADD_)
 
-
 # Set the RPATH config
 # --------------------
 
@@ -152,7 +151,7 @@ if(CHAMELEON_USE_FXT AND NOT CHAMELEON_SCHED_STARPU)
     "Use -DCHAMELEON_SCHED_QUARK=OFF -DCHAMELEON_SCHED_STARPU=ON at cmake \n"
     "configure to do so.")
 endif()
-        
+
 # Additional options
 # ------------------
 
@@ -223,11 +222,11 @@ if(UNIX OR WIN32)
         list(APPEND EXTRA_LIBRARIES "${M_m_LIBRARY}")
     else()
         message(FATAL_ERROR "Could NOT find libm on your system."
-            "Are you sure to a have a C compiler installed?")        
+            "Are you sure to a have a C compiler installed?")
     endif()
 endif()
 
-# Try to find librt (libposix4 - POSIX.1b Realtime Extensions library) 
+# Try to find librt (libposix4 - POSIX.1b Realtime Extensions library)
 # on Unix systems except Apple ones because it does not exist on it
 set(RT_LIBRARIES "")
 if(UNIX AND NOT APPLE)
@@ -240,11 +239,11 @@ if(UNIX AND NOT APPLE)
         list(APPEND RT_LIBRARIES "${RT_rt_LIBRARY}")
         list(APPEND EXTRA_LIBRARIES "${RT_rt_LIBRARY}")
     else()
-        message(FATAL_ERROR "Could NOT find librt on your system")        
+        message(FATAL_ERROR "Could NOT find librt on your system")
     endif()
 endif()
 
-# If simulation we don't enter in kernel functions so that we don't need to 
+# If simulation we don't enter in kernel functions so that we don't need to
 # link with concerned libraries
 if(NOT CHAMELEON_SIMULATION)
 
@@ -255,49 +254,85 @@ if(NOT CHAMELEON_SIMULATION)
     if(BLAS_FOUND AND BLAS_LIBRARY_DIRS)
         # the RPATH to be used when installing
         list(APPEND CMAKE_INSTALL_RPATH "${BLAS_LIBRARY_DIRS}")
+    else()
+        message(FATAL_ERROR "A BLAS library is required but has not been found")
     endif()
 
     set(CBLAS_DIR "" CACHE PATH "Root directory of CBLAS library")
-    find_package(CBLAS REQUIRED)
+    find_package(CBLAS)
     if(CBLAS_FOUND)
         include_directories(${CBLAS_INCLUDE_DIRS})
-    endif()
-    if(CBLAS_FOUND AND CBLAS_LIBRARY_DIRS)
-        # the RPATH to be used when installing
-        list(APPEND CMAKE_INSTALL_RPATH "${CBLAS_LIBRARY_DIRS}")
+        if(CBLAS_LIBRARY_DIRS)
+            # the RPATH to be used when installing
+            list(APPEND CMAKE_INSTALL_RPATH "${CBLAS_LIBRARY_DIRS}")
+        endif()
+    else()
+        if(MORSE_VERBOSE)
+            if(CBLAS_STANDALONE OR NOT CBLAS_WORKS)
+                if (NOT CBLAS_cblas.h_DIRS)
+                    Print_Find_Header_Status(cblas cblas.h)
+                endif ()
+                if (NOT CBLAS_cblas_LIBRARY)
+                    Print_Find_Library_Status(cblas libcblas)
+                endif ()
+            endif()
+        else()
+            message(WARNING "CBLAS library has not been found and MORSE_VERBOSE is set to OFF"
+            "Try to activate MORSE_VERBOSE option (-DMORSE_VERBOSE=ON) to get some hints for the detection")
+        endif()
+        message(FATAL_ERROR "A CBLAS library is required but has not been found")
     endif()
 
-    #---------------------------------------------
-    # CHAMELEON depends on LAPACKE (via coreblas)
+    # CHAMELEON depends on LAPACKE
+    #-----------------------------
     set(LAPACK_DIR "" CACHE PATH "Root directory of LAPACK library")
-    find_package(LAPACKEXT REQUIRED)
+    find_package(LAPACKEXT)
     if(LAPACK_FOUND AND LAPACK_LIBRARY_DIRS)
         # the RPATH to be used when installing
         list(APPEND CMAKE_INSTALL_RPATH "${LAPACK_LIBRARY_DIRS}")
+    else()
+        message(FATAL_ERROR "A LAPACK library is required but has not been found")
     endif()
 
     # standalone version of lapacke seems useless for now
-    # let the comment in case we meet some problems of non existing lapacke 
+    # let the comment in case we meet some problems of non existing lapacke
     # functions in lapack library such as mkl, acml, ...
     #set(LAPACKE_STANDALONE TRUE)
     set(LAPACKE_DIR "" CACHE PATH "Root directory of LAPACKE library")
-    find_package(LAPACKE REQUIRED)
+    find_package(LAPACKE)
     if(LAPACKE_FOUND)
         include_directories(${LAPACKE_INCLUDE_DIRS})
-    endif()
-    if(LAPACKE_FOUND AND LAPACKE_LIBRARY_DIRS)
-        # the RPATH to be used when installing
-        list(APPEND CMAKE_INSTALL_RPATH "${LAPACKE_LIBRARY_DIRS}")
+        if(LAPACKE_LIBRARY_DIRS)
+            # the RPATH to be used when installing
+            list(APPEND CMAKE_INSTALL_RPATH "${LAPACKE_LIBRARY_DIRS}")
+        endif()
+    else()
+        if(MORSE_VERBOSE)
+            if (LAPACKE_STANDALONE OR NOT LAPACKE_WORKS)
+                if (NOT LAPACKE_lapacke.h_DIRS)
+                    Print_Find_Header_Status(lapacke lapacke.h)
+                endif ()
+                if (NOT LAPACKE_lapacke_LIBRARY)
+                    Print_Find_Library_Status(lapacke liblapacke)
+                endif ()
+            endif()
+        else()
+            message(WARNING "LAPACKE library has not been found and MORSE_VERBOSE is set to OFF"
+            "Try to activate MORSE_VERBOSE option (-DMORSE_VERBOSE=ON) to get some hints for the detection")
+        endif()
+        message(FATAL_ERROR "A LAPACKE library is required but has not been found")
     endif()
 
     # CHAMELEON depends on TMG
     #--------------------------
     if (CHAMELEON_ENABLE_TESTING OR CHAMELEON_ENABLE_TIMING)
         set(TMG_DIR "" CACHE PATH "Root directory of TMG library")
-        find_package(TMG REQUIRED)
+        find_package(TMG)
         if(TMG_FOUND AND TMG_LIBRARY_DIRS)
             # the RPATH to be used when installing
             list(APPEND CMAKE_INSTALL_RPATH "${TMG_LIBRARY_DIRS}")
+        else()
+            message(FATAL_ERROR "A TMG library is required but has not been found")
         endif()
     endif()
 
@@ -327,34 +362,44 @@ if(NOT CHAMELEON_SIMULATION)
             endif()
             set(CMAKE_REQUIRED_INCLUDES  "${saved_include}")
             set(CMAKE_REQUIRED_LIBRARIES "${saved_libs}")
-            FindHeader(CUDA cublas_v2.h)
-            if(CUDA_cublas_v2.h_DIRS)
+            #FindHeader(CUDA cublas_v2.h)
+            #if(CUDA_cublas_v2.h_DIRS)
                 #add_definitions(-DCHAMELEON_USE_CUBLAS_V2)
-            endif()
+            #endif()
         endif (CUDA_FOUND)
 
         # CHAMELEON depends on MAGMA gpu kernels
         # call our cmake module to test (in cmake_modules)
         # change this call position if not appropriated
         #----------------------------------------------
-        if ( CUDA_FOUND )
-            if ( CHAMELEON_USE_MAGMA )
-                set(CHAMELEON_MAGMA_VERSION "1.4" CACHE STRING "oldest MAGMA version desired")
-                set(MAGMA_DIR "" CACHE PATH "Root directory of MAGMA library")
-                find_package(MAGMA ${CHAMELEON_MAGMA_VERSION} REQUIRED COMPONENTS CBLAS LAPACK CUDA)
-
-                if ( MAGMA_FOUND )
-                    add_definitions(-DHAVE_CUBLAS)
-                    add_definitions(-DCHAMELEON_USE_CUBLAS)
-                    add_definitions(-DCHAMELEON_USE_MAGMA)
-                    list(APPEND EXTRA_LIBRARIES ${CUDA_CUBLAS_LIBRARIES})
-                    include_directories(${MAGMA_INCLUDE_DIRS})
-                    if(MAGMA_LIBRARY_DIRS)
-                        # the RPATH to be used when installing
-                        list(APPEND CMAKE_INSTALL_RPATH "${MAGMA_LIBRARY_DIRS}")
-                    endif()
-                endif( MAGMA_FOUND )
-            endif()
+        if ( CUDA_FOUND AND CHAMELEON_USE_MAGMA )
+            set(CHAMELEON_MAGMA_VERSION "1.4" CACHE STRING "oldest MAGMA version desired")
+            set(MAGMA_DIR "" CACHE PATH "Root directory of MAGMA library")
+            find_package(MAGMA ${CHAMELEON_MAGMA_VERSION} COMPONENTS CBLAS LAPACK CUDA)
+            if ( MAGMA_FOUND )
+                add_definitions(-DHAVE_CUBLAS)
+                add_definitions(-DCHAMELEON_USE_CUBLAS)
+                add_definitions(-DCHAMELEON_USE_MAGMA)
+                list(APPEND EXTRA_LIBRARIES ${CUDA_CUBLAS_LIBRARIES})
+                include_directories(${MAGMA_INCLUDE_DIRS})
+                if(MAGMA_LIBRARY_DIRS)
+                    # the RPATH to be used when installing
+                    list(APPEND CMAKE_INSTALL_RPATH "${MAGMA_LIBRARY_DIRS}")
+                endif()
+            else( MAGMA_FOUND )
+                if(MORSE_VERBOSE)
+                    if (NOT MAGMA_magma.h_DIRS)
+                        Print_Find_Header_Status(magma magma.h)
+                    endif ()
+                    if (NOT MAGMA_magma_LIBRARY)
+                        Print_Find_Library_Status(magma libmagma)
+                    endif ()
+                else()
+                    message(WARNING "MAGMA library has not been found and MORSE_VERBOSE is set to OFF"
+                    "Try to activate MORSE_VERBOSE option (-DMORSE_VERBOSE=ON) to get some hints for the detection")
+                endif()
+                message(FATAL_ERROR "MAGMA library is required but has not been found")
+            endif( MAGMA_FOUND )
         endif()
 
     endif(CHAMELEON_USE_CUDA)
@@ -365,7 +410,7 @@ if(NOT CHAMELEON_SIMULATION)
 
         # allows to use an external mpi compilation by setting compilers with
         # -DMPI_C_COMPILER=path/to/mpicc -DMPI_Fortran_COMPILER=path/to/mpif90
-        # at cmake configure 
+        # at cmake configure
         if(NOT MPI_C_COMPILER)
             set(MPI_C_COMPILER mpicc)
         endif()
@@ -381,7 +426,7 @@ if(NOT CHAMELEON_SIMULATION)
         endif (MPI_C_FOUND)
 
     endif (CHAMELEON_USE_MPI)
-    
+
 else (NOT CHAMELEON_SIMULATION)
 
     message("${BoldBlue}Simulation mode of CHAMELEON is activated (CHAMELEON_SIMULATION=ON)."
@@ -449,11 +494,11 @@ if( CHAMELEON_SCHED_STARPU )
     set(HWLOC_DIR "" CACHE PATH "Root directory of HWLOC library")
     set(FXT_DIR "" CACHE PATH "Root directory of FXT library")
     set(STARPU_DIR "" CACHE PATH "Root directory of STARPU library")
-    find_package(STARPU ${CHAMELEON_STARPU_VERSION} REQUIRED
+    find_package(STARPU ${CHAMELEON_STARPU_VERSION}
                  COMPONENTS ${STARPU_COMPONENT_LIST})
 
     # Add definition and include_dir if found
-    if(STARPU_FOUND)
+    if ( STARPU_FOUND )
         add_definitions(-DCHAMELEON_SCHED_STARPU) # TODO: remove that
         include_directories(${STARPU_INCLUDE_DIRS})
         set(CMAKE_REQUIRED_INCLUDES "${STARPU_INCLUDE_DIRS}")
@@ -492,7 +537,56 @@ if( CHAMELEON_SCHED_STARPU )
             # the RPATH to be used when installing
             list(APPEND CMAKE_INSTALL_RPATH "${STARPU_LIBRARY_DIRS}")
         endif()
-    endif( STARPU_FOUND )
+    else ( STARPU_FOUND )
+        if(MORSE_VERBOSE)
+            if(NOT HWLOC_FOUND OR NOT HWLOC_LIBRARIES)
+                if (NOT HWLOC_hwloc.h_DIRS)
+                    Print_Find_Header_Status(hwloc hwloc.h)
+                endif ()
+                if (NOT HWLOC_hwloc_LIBRARY)
+                    Print_Find_Library_Status(hwloc libhwloc)
+                endif ()
+            endif()
+            if(CHAMELEON_USE_FXT AND (NOT FXT_FOUND OR NOT FXT_LIBRARIES))
+                if (NOT FXT_fxt.h_DIRS)
+                    Print_Find_Header_Status(fxt fxt.h)
+                endif ()
+                if (NOT FXT_fxt_LIBRARY)
+                    Print_Find_Library_Status(fxt libfxt)
+                endif ()
+            endif()
+            if( (NOT STARPU_SHM_FOUND) OR (NOT STARPU_SHM_LIBRARIES) OR
+                ( STARPU_LOOK_FOR_MPI AND (NOT STARPU_MPI_FOUND OR NOT STARPU_MPI_LIBRARIES) )
+              )
+                foreach(starpu_hdr ${STARPU_hdrs_to_find})
+                    if (NOT STARPU_${starpu_hdr}_INCLUDE_DIRS)
+                        Print_Find_Header_Status(starpu ${starpu_hdr})
+                    endif ()
+                endforeach()
+                if(STARPU_VERSION_STRING)
+                    foreach(starpu_lib ${STARPU_libs_to_find})
+                        if (NOT STARPU_${starpu_lib}_LIBRARY)
+                            Print_Find_Library_Status(starpu ${starpu_lib})
+                        endif ()
+                    endforeach()
+                endif()
+            endif()
+        else(MORSE_VERBOSE)
+            message(WARNING "StarPU library has not been found and MORSE_VERBOSE is set to OFF"
+            "Try to activate MORSE_VERBOSE option (-DMORSE_VERBOSE=ON) to get some hints for the detection")
+        endif(MORSE_VERBOSE)
+        if(NOT HWLOC_FOUND OR NOT HWLOC_LIBRARIES)
+            message(FATAL_ERROR "hwloc library is required but has not been found")
+        endif()
+        if(CHAMELEON_USE_FXT AND (NOT FXT_FOUND OR NOT FXT_LIBRARIES))
+            message(FATAL_ERROR "FxT library is required but has not been found")
+        endif()
+        if( (NOT STARPU_SHM_FOUND) OR (NOT STARPU_SHM_LIBRARIES) OR
+            ( STARPU_LOOK_FOR_MPI AND (NOT STARPU_MPI_FOUND OR NOT STARPU_MPI_LIBRARIES) )
+          )
+            message(FATAL_ERROR "StarPU library is required but has not been found")
+        endif()
+    endif ( STARPU_FOUND )
 
 endif( CHAMELEON_SCHED_STARPU )
 
@@ -501,22 +595,46 @@ if( CHAMELEON_SCHED_QUARK )
 
     set(HWLOC_DIR "" CACHE PATH "Root directory of HWLOC library")
     set(QUARK_DIR "" CACHE PATH "Root directory of QUARK library")
-    find_package(QUARK REQUIRED COMPONENTS HWLOC)
+    find_package(QUARK COMPONENTS HWLOC)
 
     # Add definition and include_dir if found
     if(QUARK_FOUND)
         add_definitions(-DCHAMELEON_SCHED_QUARK) # TODO: remove that
         include_directories(${QUARK_INCLUDE_DIRS})
-    endif()
-    if(QUARK_FOUND AND QUARK_LIBRARY_DIRS)
-        # the RPATH to be used when installing
-        list(APPEND CMAKE_INSTALL_RPATH "${QUARK_LIBRARY_DIRS}")
-    endif()
+        if(QUARK_LIBRARY_DIRS)
+            # the RPATH to be used when installing
+            list(APPEND CMAKE_INSTALL_RPATH "${QUARK_LIBRARY_DIRS}")
+        endif()
+    else(QUARK_FOUND)
+        if(MORSE_VERBOSE)
+            if(NOT HWLOC_FOUND OR NOT HWLOC_LIBRARIES)
+                if (NOT HWLOC_hwloc.h_DIRS)
+                    Print_Find_Header_Status(hwloc hwloc.h)
+                endif ()
+                if (NOT HWLOC_hwloc_LIBRARY)
+                    Print_Find_Library_Status(hwloc libhwloc)
+                endif ()
+            endif()
+            if (NOT QUARK_quark.h_DIRS)
+                Print_Find_Header_Status(quark quark.h)
+            endif ()
+            if (NOT QUARK_quark_LIBRARY)
+                Print_Find_Library_Status(quark libquark)
+            endif ()
+        else()
+            message(WARNING "QUARK library has not been found and MORSE_VERBOSE is set to OFF"
+            "Try to activate MORSE_VERBOSE option (-DMORSE_VERBOSE=ON) to get some hints for the detection")
+        endif()
+        if(NOT HWLOC_FOUND OR NOT HWLOC_LIBRARIES)
+            message(FATAL_ERROR "hwloc library is required but has not been found")
+        endif()
+        message(FATAL_ERROR "QUARK library is required but has not been found")
+    endif(QUARK_FOUND)
 
 endif()
 
 #------------------------------------------------------------------------------
-# Save all dependencies (all required links) 
+# Save all dependencies (all required links)
 set(CHAMELEON_DEP -lchameleon)
 if(CHAMELEON_SCHED_STARPU)
     if ( CHAMELEON_USE_MPI )
@@ -554,7 +672,7 @@ if(NOT CHAMELEON_SIMULATION)
     list(APPEND CHAMELEON_DEP
     -lcoreblas
     ${LAPACKE_LIBRARIES}
-    ${CBLAS_LIBRARIES}    
+    ${CBLAS_LIBRARIES}
     ${LAPACK_SEQ_LIBRARIES}
     ${BLAS_SEQ_LIBRARIES}
     ${HWLOC_LIBRARIES}
@@ -563,7 +681,7 @@ if(NOT CHAMELEON_SIMULATION)
 else()
     list(APPEND CHAMELEON_DEP
     -lcoreblas
-    -lsimulapacke    
+    -lsimulapacke
     -lsimucblas
     ${HWLOC_LIBRARIES}
     ${EXTRA_LIBRARIES}
diff --git a/cmake_modules/morse/MorseInit.cmake b/cmake_modules/morse/MorseInit.cmake
index 3ec892674..3534c2594 100644
--- a/cmake_modules/morse/MorseInit.cmake
+++ b/cmake_modules/morse/MorseInit.cmake
@@ -36,9 +36,15 @@ include(ColorizeMessage)
 # To find headers and libs
 include(FindHeadersAndLibs)
 
+# Some macros to print status when search for headers and libs
+# PrintFindStatus.cmake is in cmake_modules/morse/find directory
+include(PrintFindStatus)
+
 # Add the path where we handle our FindFOO.cmake to seek for liraries
 list(APPEND CMAKE_MODULE_PATH ${MORSE_CMAKE_MODULE_PATH}/find)
 
+option(MORSE_VERBOSE "CMake configure is verbose" OFF)
+
 ##
 ## @end file MorseInit.cmake
 ##
diff --git a/cmake_modules/morse/find/FindBLAS.cmake b/cmake_modules/morse/find/FindBLAS.cmake
index 07402fa3b..3d8be8a23 100644
--- a/cmake_modules/morse/find/FindBLAS.cmake
+++ b/cmake_modules/morse/find/FindBLAS.cmake
@@ -30,7 +30,7 @@
 #  BLA_VENDOR  if set checks only the specified vendor, if not set checks
 #     all the possibilities
 #  BLA_F95     if set on tries to find the f95 interfaces for BLAS/LAPACK
-# The user can give specific paths where to find the libraries adding cmake 
+# The user can give specific paths where to find the libraries adding cmake
 # options at configure (ex: cmake path/to/project -DBLAS_DIR=path/to/blas):
 #  BLAS_DIR            - Where to find the base directory of blas
 #  BLAS_INCDIR         - Where to find the header files
@@ -56,10 +56,85 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
-# Some macros to print status when search for headers and libs
-# PrintFindStatus.cmake is in cmake_modules/morse/find directory
-include(PrintFindStatus)
-option(BLAS_VERBOSE "Print some additional information during BLAS 
+
+# Set some colors
+if(NOT WIN32)
+    string(ASCII 27 Esc)
+    set(ColourReset "${Esc}[m")
+    set(ColourBold  "${Esc}[1m")
+    set(Red         "${Esc}[31m")
+    set(Green       "${Esc}[32m")
+    set(Yellow      "${Esc}[33m")
+    set(Blue        "${Esc}[34m")
+    set(Magenta     "${Esc}[35m")
+    set(Cyan        "${Esc}[36m")
+    set(White       "${Esc}[37m")
+    set(BoldRed     "${Esc}[1;31m")
+    set(BoldGreen   "${Esc}[1;32m")
+    set(BoldYellow  "${Esc}[1;33m")
+    set(BoldBlue    "${Esc}[1;34m")
+    set(BoldMagenta "${Esc}[1;35m")
+    set(BoldCyan    "${Esc}[1;36m")
+    set(BoldWhite   "${Esc}[1;37m")
+endif()
+
+## Some macros to print status when search for headers and libs
+# This macro informs why the _lib_to_find file has not been found
+macro(Print_Find_Library_Blas_Status _libname _lib_to_find)
+
+    # save _libname upper/lower case
+    string(TOUPPER ${_libname} LIBNAME)
+    string(TOLOWER ${_libname} libname)
+
+    # print status
+    #message(" ")
+    if(${LIBNAME}_LIBDIR)
+        message("${Yellow}${LIBNAME}_LIBDIR is defined but ${_lib_to_find}"
+                "has not been found in ${ARGN}${ColourReset}")
+    else()
+        if(${LIBNAME}_DIR)
+            message("${Yellow}${LIBNAME}_DIR is defined but ${_lib_to_find}"
+                    "has not been found in ${ARGN}${ColourReset}")
+        else()
+            message("${Yellow}${_lib_to_find} not found."
+                    "Nor ${LIBNAME}_DIR neither ${LIBNAME}_LIBDIR"
+                    "are defined so that we look for ${_lib_to_find} in"
+                    "system paths (Linux: LD_LIBRARY_PATH, Windows: LIB,"
+                    "Mac: DYLD_LIBRARY_PATH,"
+                    "CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES,"
+                    "CMAKE_C_IMPLICIT_LINK_DIRECTORIES)${ColourReset}")
+            if(_lib_env)
+                message("${Yellow}${_lib_to_find} has not been found in"
+                        "${_lib_env}${ColourReset}")
+            endif()
+        endif()
+    endif()
+    message("${BoldYellow}Please indicate where to find ${_lib_to_find}. You have three options:\n"
+            "- Option 1: Provide the root directory of the library with cmake option: -D${LIBNAME}_DIR=your/path/to/${libname}/\n"
+            "- Option 2: Provide the directory where to find the library with cmake option: -D${LIBNAME}_LIBDIR=your/path/to/${libname}/lib/\n"
+            "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n"
+            "- Option 4: If your library provides a PkgConfig file, make sure pkg-config finds your library${ColourReset}")
+
+endmacro()
+
+# This macro informs why the _lib_to_find file has not been found
+macro(Print_Find_Library_Blas_CheckFunc_Status _name)
+
+    # save _libname upper/lower case
+    string(TOUPPER ${_name} FUNCNAME)
+    string(TOLOWER ${_name} funcname)
+
+    # print status
+    #message(" ")
+    message("${Red}Libs have been found but check of symbol ${_name} failed "
+            "with following libraries ${ARGN}${ColourReset}")
+    message("${BoldRed}Please open your error file CMakeFiles/CMakeError.log"
+            "to figure out why it fails${ColourReset}")
+    #message(" ")
+
+endmacro()
+
+option(BLAS_VERBOSE "Print some additional information during BLAS
 libraries detection" OFF)
 
 include(CheckFunctionExists)
@@ -95,7 +170,7 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
 # are generated internally and marked advanced by this macro.
 
     set(_libdir ${ARGN})
-    
+
     set(_libraries_work TRUE)
     set(${LIBRARIES} ${_flags})
     set(_combined_name)
@@ -122,14 +197,14 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
         list(APPEND _libdir "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}")
         list(APPEND _libdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
     endif ()
-    
+
     if (BLAS_VERBOSE)
         message("${Cyan}Try to find BLAS libraries: ${_list}")
     endif ()
-    
+
     foreach(_library ${_list})
         set(_combined_name ${_combined_name}_${_library})
-    
+
         if(_libraries_work)
             if (BLA_STATIC)
                 if (WIN32)
@@ -153,21 +228,24 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
             mark_as_advanced(${_prefix}_${_library}_LIBRARY)
             # Print status if not found
             # -------------------------
-            if (NOT ${_prefix}_${_library}_LIBRARY AND BLAS_VERBOSE)
+            if (NOT ${_prefix}_${_library}_LIBRARY AND NOT BLAS_FIND_QUIETLY AND BLAS_VERBOSE)
                 Print_Find_Library_Blas_Status(blas ${_library} ${_libdir})
             endif ()
             set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
             set(_libraries_work ${${_prefix}_${_library}_LIBRARY})
         endif(_libraries_work)
-    endforeach(_library ${_list})  
-    
-    if(_libraries_work) 
+    endforeach(_library ${_list})
+
+    if(_libraries_work)
         # Test this combination of libraries.
         set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_thread})
         if (BLAS_VERBOSE)
             message("${Cyan}BLAS libs found. Try to compile symbol ${_name} with"
                     "following libraries: ${CMAKE_REQUIRED_LIBRARIES}")
-        endif ()             
+        endif ()
+        if(NOT BLAS_FOUND)
+            unset(${_prefix}${_combined_name}_WORKS CACHE)
+        endif()
         if (_CHECK_FORTRAN)
             check_fortran_function_exists("${_name}" ${_prefix}${_combined_name}_WORKS)
         else()
@@ -177,12 +255,12 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
         set(_libraries_work ${${_prefix}${_combined_name}_WORKS})
         # Print status if not found
         # -------------------------
-        if (NOT _libraries_work AND BLAS_VERBOSE)
+        if (NOT _libraries_work AND NOT BLAS_FIND_QUIETLY AND BLAS_VERBOSE)
             Print_Find_Library_Blas_CheckFunc_Status(${_name} ${CMAKE_REQUIRED_LIBRARIES})
         endif ()
         set(CMAKE_REQUIRED_LIBRARIES)
     endif()
-    
+
     if(NOT _libraries_work)
         set(${LIBRARIES} FALSE)
     endif()
@@ -205,7 +283,7 @@ endif ()
 
 #BLAS in intel mkl 10 library? (em64t 64bit)
 if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
-    
+
     if (NOT WIN32)
         set(LM "-lm")
     endif ()
@@ -217,112 +295,184 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
         endif()
 
         set(BLAS_SEARCH_LIBS "")
-        
+
         set(additional_flags)
         if(NOT WIN32)
             if (CMAKE_Fortran_COMPILER MATCHES ".+f95.*" OR
                 CMAKE_Fortran_COMPILER MATCHES ".+gfortran.*")
-                list(APPEND additional_flags "-Wl,--no-as-needed")      
+                list(APPEND additional_flags "-Wl,--no-as-needed")
             endif ()
         endif()
-           
 
         if(BLA_F95)
-        
+
             set(BLAS_mkl_SEARCH_SYMBOL SGEMM)
             set(_LIBRARIES BLAS95_LIBRARIES)
             if (WIN32)
-                list(APPEND BLAS_SEARCH_LIBS
-                    "mkl_blas95 mkl_intel_c mkl_intel_thread mkl_core libguide40")
-            else ()         
+                if (BLA_STATIC)
+                    set(BLAS_mkl_DLL_SUFFIX "")
+                else()
+                    set(BLAS_mkl_DLL_SUFFIX "_dll")
+                endif()
+
+                # Find the main file (32-bit or 64-bit)
+                set(BLAS_SEARCH_LIBS_WIN_MAIN "")
+                if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
+                    list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN
+                    "mkl_blas95${BLAS_mkl_DLL_SUFFIX} mkl_intel_c${BLAS_mkl_DLL_SUFFIX}")
+                endif()
+                if (BLA_VENDOR STREQUAL "Intel10_64lp*" OR BLA_VENDOR STREQUAL "All")
+                    list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN
+                    "mkl_blas95_lp64${BLAS_mkl_DLL_SUFFIX} mkl_intel_lp64${BLAS_mkl_DLL_SUFFIX}")
+                endif ()
+
+                # Add threading/sequential libs
+                set(BLAS_SEARCH_LIBS_WIN_THREAD "")
+                if (BLA_VENDOR STREQUAL "*_seq" OR BLA_VENDOR STREQUAL "All")
+                    list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD
+                    "mkl_sequential${BLAS_mkl_DLL_SUFFIX}")
+                endif()
+                if (NOT BLA_VENDOR STREQUAL "*_seq" OR BLA_VENDOR STREQUAL "All")
+                    # old version
+                    list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD
+                    "libguide40 mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}")
+                    # mkl >= 10.3
+                    list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD
+                    "libiomp5md mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}")
+                endif()
+
+                # Cartesian product of the above
+                foreach (MAIN ${BLAS_SEARCH_LIBS_WIN_MAIN})
+                    foreach (THREAD ${BLAS_SEARCH_LIBS_WIN_THREAD})
+                        list(APPEND BLAS_SEARCH_LIBS
+                        "${MAIN} ${THREAD} mkl_core${BLAS_mkl_DLL_SUFFIX}")
+                    endforeach()
+                endforeach()
+            else (WIN32)
                 if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
                     list(APPEND BLAS_SEARCH_LIBS
-                        "mkl_blas95 mkl_intel mkl_intel_thread mkl_core guide")
+                    "mkl_blas95 mkl_intel mkl_intel_thread mkl_core guide")
                 endif ()
                 if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All")
                     # old version
                     list(APPEND BLAS_SEARCH_LIBS
-                        "mkl_blas95 mkl_intel_lp64 mkl_intel_thread mkl_core guide")
-
+                    "mkl_blas95 mkl_intel_lp64 mkl_intel_thread mkl_core guide")
                     # mkl >= 10.3
-                    if (CMAKE_C_COMPILER MATCHES ".+gcc.*")
+                    if (CMAKE_C_COMPILER MATCHES ".+gcc" OR
+                        CMAKE_C_COMPILER MATCHES ".+cc")
                         list(APPEND BLAS_SEARCH_LIBS
-                            "mkl_blas95_lp64 mkl_intel_lp64 mkl_gnu_thread mkl_core gomp")
+                        "mkl_blas95_lp64 mkl_intel_lp64 mkl_gnu_thread mkl_core gomp")
                     else ()
                         list(APPEND BLAS_SEARCH_LIBS
-                            "mkl_blas95_lp64 mkl_intel_lp64 mkl_intel_thread mkl_core iomp5")
+                        "mkl_blas95_lp64 mkl_intel_lp64 mkl_intel_thread mkl_core iomp5")
                     endif ()
                 endif ()
-            endif ()
-            if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All")
-                list(APPEND BLAS_SEARCH_LIBS
-                    "mkl_blas95_lp64 mkl_intel_lp64 mkl_sequential mkl_core")
-            endif ()
-            
+                if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All")
+                    list(APPEND BLAS_SEARCH_LIBS
+                    "mkl_intel_lp64 mkl_sequential mkl_core")
+                endif ()
+            endif (WIN32)
+
         else (BLA_F95)
-        
+
             set(BLAS_mkl_SEARCH_SYMBOL sgemm)
             set(_LIBRARIES BLAS_LIBRARIES)
             if (WIN32)
-                list(APPEND BLAS_SEARCH_LIBS
-                    "mkl_c_dll mkl_intel_thread_dll mkl_core_dll libguide40")
-            else (WIN32)
-#                set(additional_flags)
-#                if (CMAKE_Fortran_COMPILER MATCHES ".+gfortran.*")
-#                    list(APPEND additional_flags "-Wl,--no-as-needed")      
-#                endif ()
+                if (BLA_STATIC)
+                    set(BLAS_mkl_DLL_SUFFIX "")
+                else()
+                    set(BLAS_mkl_DLL_SUFFIX "_dll")
+                endif()
 
+                # Find the main file (32-bit or 64-bit)
+                set(BLAS_SEARCH_LIBS_WIN_MAIN "")
+                if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
+                    list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN
+                    "mkl_intel_c${BLAS_mkl_DLL_SUFFIX}")
+                endif()
+                if (BLA_VENDOR STREQUAL "Intel10_64lp*" OR BLA_VENDOR STREQUAL "All")
+                    list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN
+                    "mkl_intel_lp64${BLAS_mkl_DLL_SUFFIX}")
+                endif ()
+
+                # Add threading/sequential libs
+                set(BLAS_SEARCH_LIBS_WIN_THREAD "")
+                if (NOT BLA_VENDOR STREQUAL "*_seq" OR BLA_VENDOR STREQUAL "All")
+                    # old version
+                    list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD
+                    "libguide40 mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}")
+                    # mkl >= 10.3
+                    list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD
+                    "libiomp5md mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}")
+                endif()
+                if (BLA_VENDOR STREQUAL "*_seq" OR BLA_VENDOR STREQUAL "All")
+                    list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD
+                    "mkl_sequential${BLAS_mkl_DLL_SUFFIX}")
+                endif()
+
+                # Cartesian product of the above
+                foreach (MAIN ${BLAS_SEARCH_LIBS_WIN_MAIN})
+                    foreach (THREAD ${BLAS_SEARCH_LIBS_WIN_THREAD})
+                        list(APPEND BLAS_SEARCH_LIBS
+                        "${MAIN} ${THREAD} mkl_core${BLAS_mkl_DLL_SUFFIX}")
+                    endforeach()
+                endforeach()
+            else (WIN32)
                 if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All")
                     list(APPEND BLAS_SEARCH_LIBS
-                        "mkl_intel mkl_intel_thread mkl_core guide")
+                    "mkl_intel mkl_intel_thread mkl_core guide")
                 endif ()
-      
                 if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All")
+
                     # old version
                     list(APPEND BLAS_SEARCH_LIBS
-                        "mkl_intel_lp64 mkl_intel_thread mkl_core guide")
+                    "mkl_intel_lp64 mkl_intel_thread mkl_core guide")
+
                     # mkl >= 10.3
-                    if (CMAKE_C_COMPILER MATCHES ".+gcc.*")
+                    if (CMAKE_C_COMPILER MATCHES ".+gcc" OR
+                        CMAKE_C_COMPILER MATCHES ".+cc")
                         list(APPEND BLAS_SEARCH_LIBS
-                            "mkl_intel_lp64 mkl_gnu_thread mkl_core gomp")
+                        "mkl_intel_lp64 mkl_gnu_thread mkl_core gomp")
                     else ()
                         list(APPEND BLAS_SEARCH_LIBS
-                            "mkl_intel_lp64 mkl_intel_thread mkl_core iomp5")
+                        "mkl_intel_lp64 mkl_intel_thread mkl_core iomp5")
                     endif ()
                 endif ()
+                if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All")
+                    list(APPEND BLAS_SEARCH_LIBS
+                    "mkl_intel_lp64 mkl_sequential mkl_core")
+                endif ()
 
                 #older vesions of intel mkl libs
                 if (BLA_VENDOR STREQUAL "Intel" OR BLA_VENDOR STREQUAL "All")
                     list(APPEND BLAS_SEARCH_LIBS
-                        "mkl")
+                    "mkl")
                     list(APPEND BLAS_SEARCH_LIBS
-                        "mkl_ia32")
+                    "mkl_ia32")
                     list(APPEND BLAS_SEARCH_LIBS
-                        "mkl_em64t")
+                    "mkl_em64t")
                 endif ()
             endif (WIN32)
-            
-            if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All")
-                list(APPEND BLAS_SEARCH_LIBS
-                    "mkl_intel_lp64 mkl_sequential mkl_core")
-            endif ()
-            
+
         endif (BLA_F95)
 
         foreach (IT ${BLAS_SEARCH_LIBS})
             string(REPLACE " " ";" SEARCH_LIBS ${IT})
-            check_fortran_libraries(
-            ${_LIBRARIES}
-            BLAS
-            ${BLAS_mkl_SEARCH_SYMBOL}
-            "${additional_flags}"
-            "${SEARCH_LIBS}"
-            "${CMAKE_THREAD_LIBS_INIT};${LM}"
-            )
+            if (${_LIBRARIES})
+            else ()
+                check_fortran_libraries(
+                ${_LIBRARIES}
+                BLAS
+                ${BLAS_mkl_SEARCH_SYMBOL}
+                "${additional_flags}"
+                "${SEARCH_LIBS}"
+                "${CMAKE_THREAD_LIBS_INIT};${LM}"
+                )
+            endif()
         endforeach ()
 
     endif (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
-    
+
 endif (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
 
 
@@ -339,7 +489,7 @@ if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
         ""
         )
     endif()
-    
+
 endif (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
 
 
@@ -356,7 +506,7 @@ if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All")
         ""
         )
     endif()
-    
+
 endif (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All")
 
 
@@ -373,7 +523,7 @@ if (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All")
         ""
         )
     endif()
-    
+
 endif (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All")
 
 
@@ -388,7 +538,7 @@ if (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All")
         ""
         "cxml"
         ""
-        )    
+        )
     endif()
 
 endif (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All")
@@ -427,7 +577,7 @@ if (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All")
             set(BLAS_LINKER_FLAGS "-xlic_lib=sunperf")
         endif()
     endif()
-    
+
 endif ()
 
 
@@ -444,7 +594,7 @@ if (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All")
         ""
         )
     endif()
-    
+
 endif ()
 
 
@@ -461,7 +611,7 @@ if (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All")
         ""
         )
     endif()
-    
+
 endif ()
 
 
@@ -478,7 +628,7 @@ if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
         ""
         )
     endif()
-    
+
 endif ()
 
 
@@ -488,7 +638,7 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
     if( ((BLA_VENDOR STREQUAL "ACML") AND (NOT BLAS_ACML_LIB_DIRS)) OR
         ((BLA_VENDOR STREQUAL "ACML_MP") AND (NOT BLAS_ACML_MP_LIB_DIRS)) OR
         ((BLA_VENDOR STREQUAL "ACML_GPU") AND (NOT BLAS_ACML_GPU_LIB_DIRS)))
-      
+
         # try to find acml in "standard" paths
         if( WIN32 )
             file( GLOB _ACML_ROOT "C:/AMD/acml*/ACML-EULA.txt" )
@@ -502,9 +652,9 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
         endif()
         list(GET _ACML_ROOT 0 _ACML_ROOT)
         list(GET _ACML_GPU_ROOT 0 _ACML_GPU_ROOT)
-        
+
         if( _ACML_ROOT )
-        
+
             get_filename_component( _ACML_ROOT ${_ACML_ROOT} PATH )
             if( SIZEOF_INTEGER EQUAL 8 )
                 set( _ACML_PATH_SUFFIX "_int64" )
@@ -546,13 +696,13 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
                     "${_ACML_ROOT}/${_ACML_COMPILER32}${_ACML_PATH_SUFFIX}/lib"
                     "${_ACML_ROOT}/${_ACML_COMPILER64}${_ACML_PATH_SUFFIX}/lib" )
             endif()
-            
+
         endif(_ACML_ROOT)
-        
+
     elseif(BLAS_${BLA_VENDOR}_LIB_DIRS)
-    
+
         set(_${BLA_VENDOR}_LIB_DIRS ${BLAS_${BLA_VENDOR}_LIB_DIRS})
-        
+
     endif()
 
     if( BLA_VENDOR STREQUAL "ACML_MP" )
@@ -604,7 +754,7 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
         ""
         )
     endif()
-    
+
     if(NOT BLAS_LIBRARIES)
         check_fortran_libraries(
         BLAS_LIBRARIES
@@ -615,7 +765,7 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
         ""
         )
     endif()
-    
+
     if(NOT BLAS_LIBRARIES)
         check_fortran_libraries(
         BLAS_LIBRARIES
@@ -626,7 +776,7 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
         ""
         )
     endif()
- 
+
 endif (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All") # ACML
 
 
@@ -643,7 +793,7 @@ if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All")
         ""
         )
     endif()
-    
+
 endif (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All")
 
 
@@ -659,7 +809,7 @@ if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
         ""
         )
     endif ()
-    
+
 endif (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
 
 
@@ -676,7 +826,7 @@ if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All")
         ""
         )
     endif()
-    
+
 endif (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All")
 
 
@@ -694,15 +844,15 @@ if(BLA_F95)
             message(STATUS "BLAS_LIBRARIES ${BLAS_LIBRARIES}")
         else(BLAS95_FOUND)
             message(WARNING "BLA_VENDOR has been set to ${BLA_VENDOR} but blas 95 libraries could not be found or check of symbols failed."
-                "\nPlease indicate where to find blas libraries. You have three options:\n"
-                "- Option 1: Provide the root directory of BLAS library with cmake option: -DBLAS_DIR=your/path/to/blas\n"
-                "- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\n"
-                "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n"                
-                "\nTo follow libraries detection more precisely you can activate a verbose mode with -DBLAS_VERBOSE=ON at cmake configure."
-                "\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name."
-                "\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit),"
-                "Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model), Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),"
-                "Intel( older versions of mkl 32 and 64 bit), ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic")
+                        "\nPlease indicate where to find blas libraries. You have three options:\n"
+                        "- Option 1: Provide the root directory of BLAS library with cmake option: -DBLAS_DIR=your/path/to/blas\n"
+                        "- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\n"
+                        "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n"
+                        "\nTo follow libraries detection more precisely you can activate a verbose mode with -DBLAS_VERBOSE=ON at cmake configure."
+                        "\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name."
+                        "\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit),"
+                        "Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model), Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),"
+                        "Intel( older versions of mkl 32 and 64 bit), ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic")
             if(BLAS_FIND_REQUIRED)
                 message(FATAL_ERROR
                 "A required library with BLAS95 API not found. Please specify library location.")
@@ -715,7 +865,7 @@ if(BLA_F95)
 
     set(BLAS_FOUND TRUE)
     set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}")
-    
+
 else(BLA_F95)
 
     if(BLAS_LIBRARIES)
@@ -730,22 +880,22 @@ else(BLA_F95)
             message(STATUS "BLAS_LIBRARIES ${BLAS_LIBRARIES}")
         else(BLAS_FOUND)
             message(WARNING "BLA_VENDOR has been set to ${BLA_VENDOR} but blas libraries could not be found or check of symbols failed."
-                "\nPlease indicate where to find blas libraries. You have three options:\n"
-                "- Option 1: Provide the root directory of BLAS library with cmake option: -DBLAS_DIR=your/path/to/blas\n"
-                "- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\n"
-                "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n"                
-                "\nTo follow libraries detection more precisely you can activate a verbose mode with -DBLAS_VERBOSE=ON at cmake configure."
-                "\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name."
-                "\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit),"
-                "Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model), Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),"
-                "Intel( older versions of mkl 32 and 64 bit), ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic")
+                        "\nPlease indicate where to find blas libraries. You have three options:\n"
+                        "- Option 1: Provide the root directory of BLAS library with cmake option: -DBLAS_DIR=your/path/to/blas\n"
+                        "- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\n"
+                        "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n"
+                        "\nTo follow libraries detection more precisely you can activate a verbose mode with -DBLAS_VERBOSE=ON at cmake configure."
+                        "\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name."
+                        "\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit),"
+                        "Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model), Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),"
+                        "Intel( older versions of mkl 32 and 64 bit), ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic")
             if(BLAS_FIND_REQUIRED)
                 message(FATAL_ERROR
                     "A required library with BLAS API not found. Please specify library location.")
             else()
                 message(STATUS
                     "A library with BLAS API not found. Please specify library location.")
-            endif()                      
+            endif()
         endif(BLAS_FOUND)
     endif(NOT BLAS_FIND_QUIETLY)
 
diff --git a/cmake_modules/morse/find/FindBLASEXT.cmake b/cmake_modules/morse/find/FindBLASEXT.cmake
index e97066de4..4838e5143 100644
--- a/cmake_modules/morse/find/FindBLASEXT.cmake
+++ b/cmake_modules/morse/find/FindBLASEXT.cmake
@@ -41,10 +41,6 @@
 #  License text for the above reference.)
 
 
-# Some macros to print status when search for headers and libs
-# PrintFindStatus.cmake is in cmake_modules/morse/find directory
-include(PrintFindStatus)
-
 # add a cache variable to let the user specify the BLAS vendor
 set(BLA_VENDOR "" CACHE STRING "list of possible BLAS vendor:
     Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL,
@@ -77,16 +73,26 @@ if(BLA_VENDOR STREQUAL "All" AND
     if(BLAS_mkl_intel_lp64_LIBRARY)
         set(BLA_VENDOR "Intel10_64lp")
     endif()
+    if(NOT BLASEXT_FIND_QUIETLY)
+        message(STATUS "A BLAS library has been found (${BLAS_LIBRARIES}) but we"
+            "have also potentially detected some BLAS libraries from the MKL."
+            "We try to use this one.")
+        message(STATUS "If you want to force the use of one specific library, "
+            "please specify the BLAS vendor by setting -DBLA_VENDOR=blas_vendor_name"
+            "at cmake configure.")
+        message(STATUS "List of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, "
+            "DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit),"
+            "Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model),"
+            "Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),"
+            "Intel( older versions of mkl 32 and 64 bit),"
+            "ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic")
+    endif()
+    set(BLAS_FOUND "")
 elseif(BLA_VENDOR STREQUAL "All" AND BLAS_acml_LIBRARY)
     set(BLA_VENDOR "ACML")
-endif()
-
-# Intel case
-if(BLA_VENDOR MATCHES "Intel*")
-
     if(NOT BLASEXT_FIND_QUIETLY)
         message(STATUS "A BLAS library has been found (${BLAS_LIBRARIES}) but we"
-            "have also potentially detected some BLAS libraries from the MKL."
+            "have also potentially detected some BLAS libraries from the ACML."
             "We try to use this one.")
         message(STATUS "If you want to force the use of one specific library, "
             "please specify the BLAS vendor by setting -DBLA_VENDOR=blas_vendor_name"
@@ -98,6 +104,12 @@ if(BLA_VENDOR MATCHES "Intel*")
             "Intel( older versions of mkl 32 and 64 bit),"
             "ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic")
     endif()
+    set(BLAS_FOUND "")
+endif()
+
+# Intel case
+if(BLA_VENDOR MATCHES "Intel*")
+
     ###
     # look for include path if the BLAS vendor is Intel
     ###
@@ -123,27 +135,30 @@ if(BLA_VENDOR MATCHES "Intel*")
     # find mkl.h inside known include paths
     set(BLAS_mkl.h_INCLUDE_DIRS "BLAS_mkl.h_INCLUDE_DIRS-NOTFOUND")
     if(BLAS_INCDIR)
+        set(BLAS_mkl.h_INCLUDE_DIRS "BLAS_mkl.h_INCLUDE_DIRS-NOTFOUND")
         find_path(BLAS_mkl.h_INCLUDE_DIRS
                 NAMES mkl.h
                 HINTS ${BLAS_INCDIR})
     else()
         if(BLAS_DIR)
+            set(BLAS_mkl.h_INCLUDE_DIRS "BLAS_mkl.h_INCLUDE_DIRS-NOTFOUND")
             find_path(BLAS_mkl.h_INCLUDE_DIRS
                     NAMES mkl.h
                     HINTS ${BLAS_DIR}
                     PATH_SUFFIXES include)
         else()
+            set(BLAS_mkl.h_INCLUDE_DIRS "BLAS_mkl.h_INCLUDE_DIRS-NOTFOUND")
             find_path(BLAS_mkl.h_INCLUDE_DIRS
                     NAMES mkl.h
                     HINTS ${_inc_env})
         endif()
     endif()
     mark_as_advanced(BLAS_mkl.h_INCLUDE_DIRS)
-    # Print status if not found
-    # -------------------------
-    if (NOT BLAS_mkl.h_INCLUDE_DIRS)
-        Print_Find_Header_Status(blas mkl.h)
-    endif ()
+    ## Print status if not found
+    ## -------------------------
+    #if (NOT BLAS_mkl.h_INCLUDE_DIRS AND MORSE_VERBOSE)
+    #    Print_Find_Header_Status(blas mkl.h)
+    #endif ()
     set(BLAS_INCLUDE_DIRS "")
     if(BLAS_mkl.h_INCLUDE_DIRS)
         list(APPEND BLAS_INCLUDE_DIRS "${BLAS_mkl.h_INCLUDE_DIRS}" )
@@ -157,6 +172,9 @@ if(BLA_VENDOR MATCHES "Intel*")
 
         ## look for the sequential version
         set(BLA_VENDOR "Intel10_64lp_seq")
+        if(NOT BLASEXT_FIND_QUIETLY)
+            message(STATUS "Look for the sequential version Intel10_64lp_seq")
+        endif()
 #         if(NOT BLAS_FOUND AND BLASEXT_FIND_REQUIRED)
         if(BLASEXT_FIND_REQUIRED)
             find_package(BLAS REQUIRED)
@@ -171,6 +189,9 @@ if(BLA_VENDOR MATCHES "Intel*")
 
         ## look for the multithreaded version
         set(BLA_VENDOR "Intel10_64lp")
+        if(NOT BLASEXT_FIND_QUIETLY)
+            message(STATUS "Look for the multithreaded version Intel10_64lp")
+        endif()
         find_package(BLAS)
         if(BLAS_FOUND)
             set(BLAS_PAR_LIBRARIES "${BLAS_LIBRARIES}")
@@ -191,21 +212,6 @@ if(BLA_VENDOR MATCHES "Intel*")
 # ACML case
 elseif(BLA_VENDOR MATCHES "ACML*")
 
-    if(NOT BLASEXT_FIND_QUIETLY)
-        message(STATUS "A BLAS library has been found (${BLAS_LIBRARIES}) but we"
-            "have also potentially detected some BLAS libraries from the ACML."
-            "We try to use this one.")
-        message(STATUS "If you want to force the use of one specific library, "
-            "please specify the BLAS vendor by setting -DBLA_VENDOR=blas_vendor_name"
-            "at cmake configure.")
-        message(STATUS "List of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, "
-            "DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit),"
-            "Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model),"
-            "Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),"
-            "Intel( older versions of mkl 32 and 64 bit),"
-            "ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic")
-    endif()
-
     ## look for the sequential version
     set(BLA_VENDOR "ACML")
     if(BLASEXT_FIND_REQUIRED)
diff --git a/cmake_modules/morse/find/FindCBLAS.cmake b/cmake_modules/morse/find/FindCBLAS.cmake
index 92ddfa95e..0a0ddf04a 100644
--- a/cmake_modules/morse/find/FindCBLAS.cmake
+++ b/cmake_modules/morse/find/FindCBLAS.cmake
@@ -14,21 +14,21 @@
 #               [REQUIRED]             # Fail with error if cblas is not found
 #               [COMPONENTS <libs>...] # required dependencies
 #              )
-# This module finds headers and cblas library. 
+# This module finds headers and cblas library.
 # Results are reported in variables:
 #  CBLAS_FOUND           - True if headers and requested libraries were found
 #  CBLAS_INCLUDE_DIRS    - cblas include directories
 #  CBLAS_LIBRARY_DIRS    - Link directories for cblas libraries
 #  CBLAS_LIBRARIES       - cblas component libraries to be linked
-# The user can give specific paths where to find the libraries adding cmake 
+# The user can give specific paths where to find the libraries adding cmake
 # options at configure (ex: cmake path/to/project -DCBLAS_DIR=path/to/cblas):
 #  CBLAS_DIR             - Where to find the base directory of cblas
 #  CBLAS_INCDIR          - Where to find the header files
 #  CBLAS_LIBDIR          - Where to find the library files
-# CBLAS could be directly embedded in BLAS library (ex: Intel MKL) so that 
-# we test a cblas function with the blas libraries found and set CBLAS 
-# variables to BLAS ones if test is successful. To skip this feature and 
-# look for a stand alone cblas, please add the following in your 
+# CBLAS could be directly embedded in BLAS library (ex: Intel MKL) so that
+# we test a cblas function with the blas libraries found and set CBLAS
+# variables to BLAS ones if test is successful. To skip this feature and
+# look for a stand alone cblas, please add the following in your
 # CMakeLists.txt before to call find_package(CBLAS):
 # set(CBLAS_STANDALONE TRUE)
 
@@ -50,10 +50,6 @@
 #  License text for the above reference.)
 
 
-# Some macros to print status when search for headers and libs
-# PrintFindStatus.cmake is in cmake_modules/morse/find directory
-include(PrintFindStatus)
-
 # CBLAS depends on BLAS
 # try to find it specified as COMPONENTS during the call
 if (CBLAS_FIND_COMPONENTS)
@@ -83,7 +79,7 @@ if (BLAS_FOUND)
         check_function_exists(cblas_dscal CBLAS_WORKS)
         mark_as_advanced(CBLAS_WORKS)
         set(CMAKE_REQUIRED_LIBRARIES)
-    
+
         if(CBLAS_WORKS)
             if(NOT CBLAS_FIND_QUIETLY)
                 message(STATUS "Looking for cblas: test with blas succeeds")
@@ -96,17 +92,17 @@ if (BLAS_FOUND)
             endif()
         endif()
     endif (NOT CBLAS_STANDALONE)
-        
+
     if (CBLAS_STANDALONE OR NOT CBLAS_WORKS)
-   
+
         if(NOT CBLAS_WORKS AND NOT CBLAS_FIND_QUIETLY)
             message(STATUS "Looking for cblas : test with blas fails")
         endif()
         # test fails: try to find CBLAS lib exterior to BLAS
-        
+
         # Try to find CBLAS lib
         #######################
-        
+
         # Looking for include
         # -------------------
 
@@ -153,12 +149,6 @@ if (BLAS_FOUND)
             endif()
         endif()
         mark_as_advanced(CBLAS_cblas.h_DIRS)
-        
-        # Print status if not found
-        # -------------------------
-        if (NOT CBLAS_cblas.h_DIRS)
-            Print_Find_Header_Status(cblas cblas.h)
-        endif ()        
 
         # If found, add path to cmake variable
         # ------------------------------------
@@ -215,12 +205,6 @@ if (BLAS_FOUND)
             endif()
         endif()
         mark_as_advanced(CBLAS_cblas_LIBRARY)
-        
-        # Print status if not found
-        # -------------------------
-        if (NOT CBLAS_cblas_LIBRARY AND NOT CBLAS_FIND_QUIETLY)
-            Print_Find_Library_Status(cblas libcblas)
-        endif ()
 
         # If found, add path to cmake variable
         # ------------------------------------
@@ -236,16 +220,16 @@ if (BLAS_FOUND)
                 message(STATUS "Looking for cblas -- lib cblas not found")
             endif()
         endif ()
-        
+
     endif (CBLAS_STANDALONE OR NOT CBLAS_WORKS)
-    
+
 else(BLAS_FOUND)
 
-    if (NOT CBLAS_FIND_QUIETLY)
+    if (NOT CBLAS_FIND_QUIETLY OR NOT MORSE_VERBOSE)
         message(STATUS "CBLAS requires BLAS but BLAS has not been found."
             "Please look for BLAS first.")
     endif()
-        
+
 endif(BLAS_FOUND)
 
 
diff --git a/cmake_modules/morse/find/FindFXT.cmake b/cmake_modules/morse/find/FindFXT.cmake
index 5efb8feb7..c14c26ff9 100644
--- a/cmake_modules/morse/find/FindFXT.cmake
+++ b/cmake_modules/morse/find/FindFXT.cmake
@@ -12,13 +12,13 @@
 # Use this module by invoking find_package with the form:
 #  find_package(FXT
 #               [REQUIRED]) # Fail with error if fxt is not found
-# This module finds headers and fxt library. 
+# This module finds headers and fxt library.
 # Results are reported in variables:
 #  FXT_FOUND           - True if headers and requested libraries were found
 #  FXT_INCLUDE_DIRS    - fxt include directories
 #  FXT_LIBRARY_DIRS    - Link directories for fxt libraries
 #  FXT_LIBRARIES       - fxt component libraries to be linked
-# The user can give specific paths where to find the libraries adding cmake 
+# The user can give specific paths where to find the libraries adding cmake
 # options at configure (ex: cmake path/to/project -DFXT_DIR=path/to/fxt):
 #  FXT_DIR             - Where to find the base directory of fxt
 #  FXT_INCDIR          - Where to find the header files
@@ -42,10 +42,6 @@
 #  License text for the above reference.)
 
 
-# Some macros to print status when search for headers and libs
-# PrintFindStatus.cmake is in cmake_modules/morse/find directory
-include(PrintFindStatus)
-
 # Optionally use pkg-config to detect include/library dirs (if pkg-config is available)
 # -------------------------------------------------------------------------------------
 include(FindPkgConfig)
@@ -56,11 +52,11 @@ if(PKG_CONFIG_EXECUTABLE)
     if (NOT FXT_FIND_QUIETLY)
         if (FXT_FOUND AND FXT_LIBRARIES)
             message(STATUS "Looking for FXT - found using PkgConfig")
-            if(NOT FXT_INCLUDE_DIRS)
-                message("${Magenta}FXT_INCLUDE_DIRS is empty using PkgConfig."
-                    "Perhaps the path to fxt headers is already present in your"
-                    "C(PLUS)_INCLUDE_PATH environment variable.${ColourReset}")
-            endif()
+            #if(NOT FXT_INCLUDE_DIRS)
+            #    message("${Magenta}FXT_INCLUDE_DIRS is empty using PkgConfig."
+            #        "Perhaps the path to fxt headers is already present in your"
+            #        "C(PLUS)_INCLUDE_PATH environment variable.${ColourReset}")
+            #endif()
         else()
             message("${Magenta}Looking for FXT - not found using PkgConfig."
                 "Perhaps you should add the directory containing fxt.pc to the"
@@ -78,7 +74,7 @@ if(NOT FXT_FOUND OR NOT FXT_LIBRARIES)
 
     # Looking for include
     # -------------------
-    
+
     # Add system include paths to search include
     # ------------------------------------------
     unset(_inc_env)
@@ -97,7 +93,7 @@ if(NOT FXT_FOUND OR NOT FXT_LIBRARIES)
     list(APPEND _inc_env "${CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES}")
     list(APPEND _inc_env "${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}")
     list(REMOVE_DUPLICATES _inc_env)
-    
+
     # Try to find the fxt header in the given paths
     # -------------------------------------------------
     # call cmake macro to find the header path
@@ -121,13 +117,7 @@ if(NOT FXT_FOUND OR NOT FXT_LIBRARIES)
         endif()
     endif()
     mark_as_advanced(FXT_fxt.h_DIRS)
-    
-    # Print status if not found
-    # -------------------------
-    if (NOT FXT_fxt.h_DIRS AND NOT FXT_FIND_QUIETLY)
-        Print_Find_Header_Status(fxt fxt.h)
-    endif ()
-    
+
     # Add path to cmake variable
     # ------------------------------------
     if (FXT_fxt.h_DIRS)
@@ -138,15 +128,15 @@ if(NOT FXT_FOUND OR NOT FXT_LIBRARIES)
             message(STATUS "Looking for fxt -- fxt.h not found")
         endif()
     endif ()
-    
+
     if (FXT_INCLUDE_DIRS)
         list(REMOVE_DUPLICATES FXT_INCLUDE_DIRS)
     endif ()
-    
-    
+
+
     # Looking for lib
     # ---------------
-    
+
     # Add system library paths to search lib
     # --------------------------------------
     unset(_lib_env)
@@ -162,10 +152,10 @@ if(NOT FXT_FOUND OR NOT FXT_LIBRARIES)
         list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
     endif()
     list(REMOVE_DUPLICATES _lib_env)
-    
+
     # Try to find the fxt lib in the given paths
     # ----------------------------------------------
-    
+
     # call cmake macro to find the lib path
     if(FXT_LIBDIR)
         set(FXT_fxt_LIBRARY "FXT_fxt_LIBRARY-NOTFOUND")
@@ -187,13 +177,7 @@ if(NOT FXT_FOUND OR NOT FXT_LIBRARIES)
         endif()
     endif()
     mark_as_advanced(FXT_fxt_LIBRARY)
-    
-    # Print status if not found
-    # -------------------------
-    if (NOT FXT_fxt_LIBRARY AND NOT FXT_FIND_QUIETLY)
-        Print_Find_Library_Status(fxt libfxt)
-    endif ()
-    
+
     # If found, add path to cmake variable
     # ------------------------------------
     if (FXT_fxt_LIBRARY)
@@ -208,7 +192,7 @@ if(NOT FXT_FOUND OR NOT FXT_LIBRARIES)
             message(STATUS "Looking for fxt -- lib fxt not found")
         endif()
     endif ()
-    
+
     if (FXT_LIBRARY_DIRS)
         list(REMOVE_DUPLICATES FXT_LIBRARY_DIRS)
     endif ()
diff --git a/cmake_modules/morse/find/FindHWLOC.cmake b/cmake_modules/morse/find/FindHWLOC.cmake
index 4b1054af9..0b3f891b9 100644
--- a/cmake_modules/morse/find/FindHWLOC.cmake
+++ b/cmake_modules/morse/find/FindHWLOC.cmake
@@ -12,13 +12,13 @@
 # Use this module by invoking find_package with the form:
 #  find_package(HWLOC
 #               [REQUIRED]) # Fail with error if hwloc is not found
-# This module finds headers and hwloc library. 
+# This module finds headers and hwloc library.
 # Results are reported in variables:
 #  HWLOC_FOUND           - True if headers and requested libraries were found
 #  HWLOC_INCLUDE_DIRS    - hwloc include directories
 #  HWLOC_LIBRARY_DIRS    - Link directories for hwloc libraries
 #  HWLOC_LIBRARIES       - hwloc component libraries to be linked
-# The user can give specific paths where to find the libraries adding cmake 
+# The user can give specific paths where to find the libraries adding cmake
 # options at configure (ex: cmake path/to/project -DHWLOC_DIR=path/to/hwloc):
 #  HWLOC_DIR             - Where to find the base directory of hwloc
 #  HWLOC_INCDIR          - Where to find the header files
@@ -42,10 +42,6 @@
 #  License text for the above reference.)
 
 
-# Some macros to print status when search for headers and libs
-# PrintFindStatus.cmake is in cmake_modules/morse/find directory
-include(PrintFindStatus)
-
 # Optionally use pkg-config to detect include/library dirs (if pkg-config is available)
 # -------------------------------------------------------------------------------------
 include(FindPkgConfig)
@@ -56,11 +52,11 @@ if(PKG_CONFIG_EXECUTABLE)
     if (NOT HWLOC_FIND_QUIETLY)
         if (HWLOC_FOUND AND HWLOC_LIBRARIES)
             message(STATUS "Looking for HWLOC - found using PkgConfig")
-            if(NOT HWLOC_INCLUDE_DIRS)
-                message("${Magenta}HWLOC_INCLUDE_DIRS is empty using PkgConfig."
-                    "Perhaps the path to hwloc headers is already present in your"
-                    "C(PLUS)_INCLUDE_PATH environment variable.${ColourReset}")
-            endif()
+            #if(NOT HWLOC_INCLUDE_DIRS)
+            #    message("${Magenta}HWLOC_INCLUDE_DIRS is empty using PkgConfig."
+            #        "Perhaps the path to hwloc headers is already present in your"
+            #        "C(PLUS)_INCLUDE_PATH environment variable.${ColourReset}")
+            #endif()
         else()
             message("${Magenta}Looking for HWLOC - not found using PkgConfig."
                 "Perhaps you should add the directory containing hwloc.pc to"
@@ -78,7 +74,7 @@ if(NOT HWLOC_FOUND OR NOT HWLOC_LIBRARIES)
 
     # Looking for include
     # -------------------
-    
+
     # Add system include paths to search include
     # ------------------------------------------
     unset(_inc_env)
@@ -97,10 +93,10 @@ if(NOT HWLOC_FOUND OR NOT HWLOC_LIBRARIES)
     list(APPEND _inc_env "${CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES}")
     list(APPEND _inc_env "${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}")
     list(REMOVE_DUPLICATES _inc_env)
-    
+
     # set paths where to look for
     set(PATH_TO_LOOK_FOR "${_inc_env}")
-    
+
     # Try to find the hwloc header in the given paths
     # -------------------------------------------------
     # call cmake macro to find the header path
@@ -124,13 +120,7 @@ if(NOT HWLOC_FOUND OR NOT HWLOC_LIBRARIES)
         endif()
     endif()
     mark_as_advanced(HWLOC_hwloc.h_DIRS)
-    
-    # Print status if not found
-    # -------------------------
-    if (NOT HWLOC_hwloc.h_DIRS AND NOT HWLOC_FIND_QUIETLY)
-        Print_Find_Header_Status(hwloc hwloc.h)
-    endif ()
-    
+
     # Add path to cmake variable
     # ------------------------------------
     if (HWLOC_hwloc.h_DIRS)
@@ -141,15 +131,15 @@ if(NOT HWLOC_FOUND OR NOT HWLOC_LIBRARIES)
             message(STATUS "Looking for hwloc -- hwloc.h not found")
         endif()
     endif ()
-    
+
     if (HWLOC_INCLUDE_DIRS)
         list(REMOVE_DUPLICATES HWLOC_INCLUDE_DIRS)
     endif ()
-    
-    
+
+
     # Looking for lib
     # ---------------
-    
+
     # Add system library paths to search lib
     # --------------------------------------
     unset(_lib_env)
@@ -165,13 +155,13 @@ if(NOT HWLOC_FOUND OR NOT HWLOC_LIBRARIES)
         list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
     endif()
     list(REMOVE_DUPLICATES _lib_env)
-    
+
     # set paths where to look for
     set(PATH_TO_LOOK_FOR "${_lib_env}")
-    
+
     # Try to find the hwloc lib in the given paths
     # ----------------------------------------------
-    
+
     # call cmake macro to find the lib path
     if(HWLOC_LIBDIR)
         set(HWLOC_hwloc_LIBRARY "HWLOC_hwloc_LIBRARY-NOTFOUND")
@@ -186,20 +176,14 @@ if(NOT HWLOC_FOUND OR NOT HWLOC_LIBRARIES)
                 HINTS ${HWLOC_DIR}
                 PATH_SUFFIXES lib lib32 lib64)
         else()
-            set(HWLOC_hwloc_LIBRARY "HWLOC_hwloc_LIBRARY-NOTFOUND")    
+            set(HWLOC_hwloc_LIBRARY "HWLOC_hwloc_LIBRARY-NOTFOUND")
             find_library(HWLOC_hwloc_LIBRARY
                          NAMES hwloc
                          HINTS ${PATH_TO_LOOK_FOR})
         endif()
     endif()
     mark_as_advanced(HWLOC_hwloc_LIBRARY)
-    
-    # Print status if not found
-    # -------------------------
-    if (NOT HWLOC_hwloc_LIBRARY AND NOT HWLOC_FIND_QUIETLY)
-        Print_Find_Library_Status(hwloc libhwloc)
-    endif ()
-    
+
     # If found, add path to cmake variable
     # ------------------------------------
     if (HWLOC_hwloc_LIBRARY)
@@ -214,7 +198,7 @@ if(NOT HWLOC_FOUND OR NOT HWLOC_LIBRARIES)
             message(STATUS "Looking for hwloc -- lib hwloc not found")
         endif()
     endif ()
-    
+
     if (HWLOC_LIBRARY_DIRS)
         list(REMOVE_DUPLICATES HWLOC_LIBRARY_DIRS)
     endif ()
diff --git a/cmake_modules/morse/find/FindLAPACK.cmake b/cmake_modules/morse/find/FindLAPACK.cmake
index 623aa8843..85739163c 100644
--- a/cmake_modules/morse/find/FindLAPACK.cmake
+++ b/cmake_modules/morse/find/FindLAPACK.cmake
@@ -30,7 +30,7 @@
 #  BLA_VENDOR  if set checks only the specified vendor, if not set checks
 #     all the possibilities
 #  BLA_F95     if set on tries to find the f95 interfaces for BLAS/LAPACK
-# The user can give specific paths where to find the libraries adding cmake 
+# The user can give specific paths where to find the libraries adding cmake
 # options at configure (ex: cmake path/to/project -DLAPACK_DIR=path/to/lapack):
 #  LAPACK_DIR            - Where to find the base directory of lapack
 #  LAPACK_INCDIR         - Where to find the header files
@@ -53,10 +53,67 @@
 #  License text for the above reference.)
 
 
-# Some macros to print status when search for headers and libs
-# PrintFindStatus.cmake is in cmake_modules/morse/find directory
-include(PrintFindStatus)
-option(LAPACK_VERBOSE "Print some additional information during LAPACK 
+# Set some colors
+if(NOT WIN32)
+    string(ASCII 27 Esc)
+    set(ColourReset "${Esc}[m")
+    set(ColourBold  "${Esc}[1m")
+    set(Red         "${Esc}[31m")
+    set(Green       "${Esc}[32m")
+    set(Yellow      "${Esc}[33m")
+    set(Blue        "${Esc}[34m")
+    set(Magenta     "${Esc}[35m")
+    set(Cyan        "${Esc}[36m")
+    set(White       "${Esc}[37m")
+    set(BoldRed     "${Esc}[1;31m")
+    set(BoldGreen   "${Esc}[1;32m")
+    set(BoldYellow  "${Esc}[1;33m")
+    set(BoldBlue    "${Esc}[1;34m")
+    set(BoldMagenta "${Esc}[1;35m")
+    set(BoldCyan    "${Esc}[1;36m")
+    set(BoldWhite   "${Esc}[1;37m")
+endif()
+
+## Some macros to print status when search for headers and libs
+# This macro informs why the _lib_to_find file has not been found
+macro(Print_Find_Library_Blas_Status _libname _lib_to_find)
+
+    # save _libname upper/lower case
+    string(TOUPPER ${_libname} LIBNAME)
+    string(TOLOWER ${_libname} libname)
+
+    # print status
+    #message(" ")
+    if(${LIBNAME}_LIBDIR)
+        message("${Yellow}${LIBNAME}_LIBDIR is defined but ${_lib_to_find}"
+                "has not been found in ${ARGN}${ColourReset}")
+    else()
+        if(${LIBNAME}_DIR)
+            message("${Yellow}${LIBNAME}_DIR is defined but ${_lib_to_find}"
+                    "has not been found in ${ARGN}${ColourReset}")
+        else()
+            message("${Yellow}${_lib_to_find} not found."
+                    "Nor ${LIBNAME}_DIR neither ${LIBNAME}_LIBDIR"
+                    "are defined so that we look for ${_lib_to_find} in"
+                    "system paths (Linux: LD_LIBRARY_PATH, Windows: LIB,"
+                    "Mac: DYLD_LIBRARY_PATH,"
+                    "CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES,"
+                    "CMAKE_C_IMPLICIT_LINK_DIRECTORIES)${ColourReset}")
+            if(_lib_env)
+                message("${Yellow}${_lib_to_find} has not been found in"
+                        "${_lib_env}${ColourReset}")
+            endif()
+        endif()
+    endif()
+    message("${BoldYellow}Please indicate where to find ${_lib_to_find}. You have three options:\n"
+            "- Option 1: Provide the root directory of the library with cmake option: -D${LIBNAME}_DIR=your/path/to/${libname}/\n"
+            "- Option 2: Provide the directory where to find the library with cmake option: -D${LIBNAME}_LIBDIR=your/path/to/${libname}/lib/\n"
+            "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n"
+            "- Option 4: If your library provides a PkgConfig file, make sure pkg-config finds your library${ColourReset}")
+
+endmacro()
+
+option(LAPACK_VERBOSE "Print some additional information during LAPACK
 libraries detection" OFF)
 if (BLAS_VERBOSE)
     set(LAPACK_VERBOSE ON)
@@ -92,7 +149,7 @@ set(${LIBRARIES})
 set(_combined_name)
 if (NOT _libdir)
   if (BLAS_DIR)
-    list(APPEND _libdir "${BLAS_DIR}")  
+    list(APPEND _libdir "${BLAS_DIR}")
     list(APPEND _libdir "${BLAS_DIR}/lib")
     list(APPEND _libdir "${BLAS_DIR}/lib32")
     list(APPEND _libdir "${BLAS_DIR}/lib64")
@@ -101,9 +158,9 @@ if (NOT _libdir)
   endif ()
   if (BLAS_LIBDIR)
     list(APPEND _libdir "${BLAS_LIBDIR}")
-  endif ()  
+  endif ()
   if (LAPACK_DIR)
-    list(APPEND _libdir "${LAPACK_DIR}")  
+    list(APPEND _libdir "${LAPACK_DIR}")
     list(APPEND _libdir "${LAPACK_DIR}/lib")
     list(APPEND _libdir "${LAPACK_DIR}/lib32")
     list(APPEND _libdir "${LAPACK_DIR}/lib64")
@@ -120,15 +177,15 @@ if (NOT _libdir)
   else ()
     string(REPLACE ":" ";" _libdir2 "$ENV{LD_LIBRARY_PATH}")
   endif ()
-  list(APPEND _libdir "${_libdir2}")  
+  list(APPEND _libdir "${_libdir2}")
   list(APPEND _libdir "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}")
-  list(APPEND _libdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")  
+  list(APPEND _libdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
 endif ()
 
 if (LAPACK_VERBOSE)
     message("${Cyan}Try to find LAPACK libraries: ${_list}")
 endif ()
-    
+
 foreach(_library ${_list})
   set(_combined_name ${_combined_name}_${_library})
 
@@ -155,7 +212,7 @@ foreach(_library ${_list})
     mark_as_advanced(${_prefix}_${_library}_LIBRARY)
     # Print status if not found
     # -------------------------
-    if (NOT ${_prefix}_${_library}_LIBRARY AND LAPACK_VERBOSE)
+    if (NOT ${_prefix}_${_library}_LIBRARY AND NOT LAPACK_FIND_QUIETLY AND LAPACK_VERBOSE)
         Print_Find_Library_Blas_Status(lapack ${_library} ${_libdir})
     endif ()
     set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
@@ -173,7 +230,10 @@ if(_libraries_work)
   if (LAPACK_VERBOSE)
       message("${Cyan}LAPACK libs found. Try to compile symbol ${_name} with"
               "following libraries: ${CMAKE_REQUIRED_LIBRARIES}")
-  endif ()    
+  endif ()
+  if(NOT LAPACK_FOUND)
+    unset(${_prefix}${_combined_name}_WORKS CACHE)
+  endif()
   if (NOT _LANGUAGES_ MATCHES Fortran)
     check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS)
   else (NOT _LANGUAGES_ MATCHES Fortran)
@@ -281,72 +341,73 @@ if (BLA_VENDOR STREQUAL "Generic" OR
   endif ( NOT LAPACK_LIBRARIES )
 endif ()
 #intel lapack
-if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
+if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
   if (NOT WIN32)
     set(LM "-lm")
   endif ()
   if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
     if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
       find_PACKAGE(Threads)
-    else(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
+    else()
       find_package(Threads REQUIRED)
-    endif(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED)
+    endif()
+
+    set(LAPACK_SEARCH_LIBS "")
+
     if (BLA_F95)
-      if(NOT LAPACK95_LIBRARIES)
-        # old
-        check_lapack_libraries(
-          LAPACK95_LIBRARIES
-          LAPACK
-          cheev
-          ""
-          "mkl_lapack95"
-          "${BLAS95_LIBRARIES}"
-          "${CMAKE_THREAD_LIBS_INIT};${LM}"
-          )
-      endif(NOT LAPACK95_LIBRARIES)
-      if(NOT LAPACK95_LIBRARIES)
-        # new >= 10.3
-        check_lapack_libraries(
-          LAPACK95_LIBRARIES
-          LAPACK
-          CHEEV
-          ""
-          "mkl_intel_lp64"
-          "${BLAS95_LIBRARIES}"
-          "${CMAKE_THREAD_LIBS_INIT};${LM}"
-          )
-      endif(NOT LAPACK95_LIBRARIES)
-    else(BLA_F95)
-      if(NOT LAPACK_LIBRARIES)
-        # old
-        check_lapack_libraries(
-          LAPACK_LIBRARIES
-          LAPACK
-          cheev
-          ""
-          "mkl_lapack"
-          "${BLAS_LIBRARIES}"
-          "${CMAKE_THREAD_LIBS_INIT};${LM}"
-          )
-      endif(NOT LAPACK_LIBRARIES)
-      if(NOT LAPACK_LIBRARIES)
-        if (CMAKE_C_COMPILER MATCHES ".+gcc.*")
-            set(LM "${LM};-lgomp")
-        endif()
-        # new >= 10.3
+      set(LAPACK_mkl_SEARCH_SYMBOL "CHEEV")
+      set(_LIBRARIES LAPACK95_LIBRARIES)
+      set(_BLAS_LIBRARIES ${BLAS95_LIBRARIES})
+
+      # old
+      list(APPEND LAPACK_SEARCH_LIBS
+        "mkl_lapack95")
+      # new >= 10.3
+      list(APPEND LAPACK_SEARCH_LIBS
+        "mkl_intel_c")
+      list(APPEND LAPACK_SEARCH_LIBS
+        "mkl_intel_lp64")
+    else()
+      set(LAPACK_mkl_SEARCH_SYMBOL "cheev")
+      set(_LIBRARIES LAPACK_LIBRARIES)
+      set(_BLAS_LIBRARIES ${BLAS_LIBRARIES})
+
+      # old
+      list(APPEND LAPACK_SEARCH_LIBS
+        "mkl_lapack")
+      # new >= 10.3
+      list(APPEND LAPACK_SEARCH_LIBS
+        "mkl_gf_lp64")
+    endif()
+
+    # First try empty lapack libs
+    if (NOT ${_LIBRARIES})
+      check_lapack_libraries(
+        ${_LIBRARIES}
+        BLAS
+        ${LAPACK_mkl_SEARCH_SYMBOL}
+        ""
+        ""
+        "${_BLAS_LIBRARIES}"
+        "${CMAKE_THREAD_LIBS_INIT};${LM}"
+        )
+    endif ()
+    # Then try the search libs
+    foreach (IT ${LAPACK_SEARCH_LIBS})
+      if (NOT ${_LIBRARIES})
         check_lapack_libraries(
-          LAPACK_LIBRARIES
-          LAPACK
-          cheev
+          ${_LIBRARIES}
+          BLAS
+          ${LAPACK_mkl_SEARCH_SYMBOL}
           ""
-          "mkl_intel_lp64"
-          "${BLAS_LIBRARIES}"
+          "${IT}"
+          "${_BLAS_LIBRARIES}"
           "${CMAKE_THREAD_LIBS_INIT};${LM}"
           )
-      endif(NOT LAPACK_LIBRARIES)
-    endif(BLA_F95)
-  endif (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
-endif(BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
+      endif ()
+    endforeach ()
+  endif ()
+endif()
 else(BLAS_FOUND)
   message(STATUS "LAPACK requires BLAS")
 endif(BLAS_FOUND)
@@ -366,12 +427,12 @@ if(BLA_F95)
         "\nPlease indicate where to find LAPACK libraries. You have three options:\n"
         "- Option 1: Provide the root directory of LAPACK library with cmake option: -DLAPACK_DIR=your/path/to/lapack\n"
         "- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\n"
-        "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n"                
+        "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n"
         "\nTo follow libraries detection more precisely you can activate a verbose mode with -DLAPACK_VERBOSE=ON at cmake configure."
         "\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name."
         "\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit),"
         "Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model), Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model),"
-        "Intel( older versions of mkl 32 and 64 bit), ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic")   
+        "Intel( older versions of mkl 32 and 64 bit), ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic")
     if(LAPACK_FIND_REQUIRED)
       message(FATAL_ERROR
       "A required library with LAPACK95 API not found. Please specify library location."
@@ -401,7 +462,7 @@ else(BLA_F95)
         "\nPlease indicate where to find LAPACK libraries. You have three options:\n"
         "- Option 1: Provide the root directory of LAPACK library with cmake option: -DLAPACK_DIR=your/path/to/lapack\n"
         "- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\n"
-        "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n"                
+        "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n"
         "\nTo follow libraries detection more precisely you can activate a verbose mode with -DLAPACK_VERBOSE=ON at cmake configure."
         "\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name."
         "\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit),"
diff --git a/cmake_modules/morse/find/FindLAPACKE.cmake b/cmake_modules/morse/find/FindLAPACKE.cmake
index 3e6aecbbd..78788ef5f 100644
--- a/cmake_modules/morse/find/FindLAPACKE.cmake
+++ b/cmake_modules/morse/find/FindLAPACKE.cmake
@@ -14,21 +14,21 @@
 #               [REQUIRED]             # Fail with error if lapacke is not found
 #               [COMPONENTS <libs>...] # required dependencies
 #              )
-# This module finds headers and lapacke library. 
+# This module finds headers and lapacke library.
 # Results are reported in variables:
 #  LAPACKE_FOUND           - True if headers and requested libraries were found
 #  LAPACKE_INCLUDE_DIRS    - lapacke include directories
 #  LAPACKE_LIBRARY_DIRS    - Link directories for lapacke libraries
 #  LAPACKE_LIBRARIES       - lapacke component libraries to be linked
-# The user can give specific paths where to find the libraries adding cmake 
+# The user can give specific paths where to find the libraries adding cmake
 # options at configure (ex: cmake path/to/project -DLAPACKE_DIR=path/to/lapacke):
 #  LAPACKE_DIR             - Where to find the base directory of lapacke
 #  LAPACKE_INCDIR          - Where to find the header files
 #  LAPACKE_LIBDIR          - Where to find the library files
-# LAPACKE could be directly embedded in LAPACK library (ex: Intel MKL) so that 
-# we test a lapacke function with the lapack libraries found and set LAPACKE 
-# variables to LAPACK ones if test is successful. To skip this feature and 
-# look for a stand alone lapacke, please add the following in your 
+# LAPACKE could be directly embedded in LAPACK library (ex: Intel MKL) so that
+# we test a lapacke function with the lapack libraries found and set LAPACKE
+# variables to LAPACK ones if test is successful. To skip this feature and
+# look for a stand alone lapacke, please add the following in your
 # CMakeLists.txt before to call find_package(LAPACKE):
 # set(LAPACKE_STANDALONE TRUE)
 
@@ -50,10 +50,6 @@
 #  License text for the above reference.)
 
 
-# Some macros to print status when search for headers and libs
-# PrintFindStatus.cmake is in cmake_modules/morse/find directory
-include(PrintFindStatus)
-
 # LAPACKE depends on LAPACK
 # try to find it specified as COMPONENTS during the call
 if (LAPACKE_FIND_COMPONENTS)
@@ -83,7 +79,7 @@ if (LAPACK_FOUND)
         check_function_exists(LAPACKE_dgeqrf LAPACKE_WORKS)
         mark_as_advanced(LAPACKE_WORKS)
         set(CMAKE_REQUIRED_LIBRARIES)
-    
+
         if(LAPACKE_WORKS)
             if(NOT LAPACKE_FIND_QUIETLY)
                 message(STATUS "Looking for lapacke: test with lapack succeeds")
@@ -96,17 +92,17 @@ if (LAPACK_FOUND)
             endif()
         endif()
     endif (NOT LAPACKE_STANDALONE)
-        
+
     if (LAPACKE_STANDALONE OR NOT LAPACKE_WORKS)
-   
+
         if(NOT LAPACKE_WORKS AND NOT LAPACKE_FIND_QUIETLY)
             message(STATUS "Looking for lapacke : test with lapack fails")
         endif()
         # test fails: try to find LAPACKE lib exterior to LAPACK
-        
+
         # Try to find LAPACKE lib
         #######################
-        
+
         # Looking for include
         # -------------------
 
@@ -153,12 +149,6 @@ if (LAPACK_FOUND)
             endif()
         endif()
         mark_as_advanced(LAPACKE_lapacke.h_DIRS)
-        
-        # Print status if not found
-        # -------------------------
-        if (NOT LAPACKE_lapacke.h_DIRS)
-            Print_Find_Header_Status(lapacke lapacke.h)
-        endif ()        
 
         # If found, add path to cmake variable
         # ------------------------------------
@@ -215,12 +205,6 @@ if (LAPACK_FOUND)
             endif()
         endif()
         mark_as_advanced(LAPACKE_lapacke_LIBRARY)
-        
-        # Print status if not found
-        # -------------------------
-        if (NOT LAPACKE_lapacke_LIBRARY AND NOT LAPACKE_FIND_QUIETLY)
-            Print_Find_Library_Status(lapacke liblapacke)
-        endif ()
 
         # If found, add path to cmake variable
         # ------------------------------------
@@ -236,16 +220,16 @@ if (LAPACK_FOUND)
                 message(STATUS "Looking for lapacke -- lib lapacke not found")
             endif()
         endif ()
-        
+
     endif (LAPACKE_STANDALONE OR NOT LAPACKE_WORKS)
-    
+
 else(LAPACK_FOUND)
 
     if (NOT LAPACKE_FIND_QUIETLY)
         message(STATUS "LAPACKE requires LAPACK but LAPACK has not been found."
             "Please look for LAPACK first.")
     endif()
-        
+
 endif(LAPACK_FOUND)
 
 
diff --git a/cmake_modules/morse/find/FindLAPACKEXT.cmake b/cmake_modules/morse/find/FindLAPACKEXT.cmake
index 318d3430b..dc608cc74 100644
--- a/cmake_modules/morse/find/FindLAPACKEXT.cmake
+++ b/cmake_modules/morse/find/FindLAPACKEXT.cmake
@@ -11,14 +11,14 @@
 # - Find LAPACK EXTENDED for MORSE projects: find include dirs and libraries
 #
 # This module allows to find LAPACK libraries by calling the official FindLAPACK module
-# and handles the creation of different library lists whether the user wishes to link 
+# and handles the creation of different library lists whether the user wishes to link
 # with a sequential LAPACK or a multihreaded (LAPACK_SEQ_LIBRARIES and LAPACK_PAR_LIBRARIES).
 # LAPACK is detected with a FindLAPACK call then if the LAPACK vendor is in the following list,
 # Intel mkl, Goto, Openlapack, ACML, IBMESSL
 # then the module tries find the corresponding multithreaded libraries
-# LAPACK_LIBRARIES does not exists anymore. 
+# LAPACK_LIBRARIES does not exists anymore.
 #
-# The following variables have been added to manage links with sequential or multithreaded 
+# The following variables have been added to manage links with sequential or multithreaded
 # versions:
 #  LAPACK_INCLUDE_DIRS  - LAPACK include directories
 #  LAPACK_LIBRARY_DIRS  - Link directories for LAPACK libraries
@@ -43,10 +43,6 @@
 #  License text for the above reference.)
 
 
-# Some macros to print status when search for headers and libs
-# PrintFindStatus.cmake is in cmake_modules/morse/find directory
-include(PrintFindStatus)
-
 # LAPACKEXT depends on BLASEXT
 # call our extended module for BLAS
 #----------------------------------
@@ -64,7 +60,7 @@ if(BLA_VENDOR MATCHES "Intel*")
     ###
     # look for include path if the LAPACK vendor is Intel
     ###
-    
+
     # gather system include paths
     unset(_inc_env)
     if(WIN32)
@@ -82,13 +78,13 @@ if(BLA_VENDOR MATCHES "Intel*")
     list(APPEND _inc_env "${CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES}")
     list(APPEND _inc_env "${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}")
     list(REMOVE_DUPLICATES _inc_env)
-    
+
     if (BLAS_DIR)
         set(LAPACK_DIR ${BLAS_DIR})
     endif ()
     if (BLAS_INCDIR)
         set(LAPACK_INCDIR ${BLAS_INCDIR})
-    endif ()    
+    endif ()
     # find mkl.h inside known include paths
     set(LAPACK_mkl_lapack.h_INCLUDE_DIRS "LAPACK_mkl_lapack.h_INCLUDE_DIRS-NOTFOUND")
     if(LAPACK_INCDIR)
@@ -106,50 +102,50 @@ if(BLA_VENDOR MATCHES "Intel*")
                     NAMES mkl_lapack.h
                     HINTS ${_inc_env})
         endif()
-    endif()  
+    endif()
     mark_as_advanced(LAPACK_mkl_lapack.h_INCLUDE_DIRS)
-    # Print status if not found
-    # -------------------------
-    if (NOT LAPACK_mkl_lapack.h_INCLUDE_DIRS)
-        Print_Find_Header_Status(lapack mkl_lapack.h)
-    endif ()    
+    ## Print status if not found
+    ## -------------------------
+    #if (NOT LAPACK_mkl_lapack.h_INCLUDE_DIRS)
+    #    Print_Find_Header_Status(lapack mkl_lapack.h)
+    #endif ()
     set(LAPACK_INCLUDE_DIRS "")
     if(LAPACK_mkl_lapack.h_INCLUDE_DIRS)
         list(APPEND LAPACK_INCLUDE_DIRS "${LAPACK_mkl_lapack.h_INCLUDE_DIRS}" )
     endif()
-    
+
     ###
     # look for libs
     ###
-    
+
     if (BLA_VENDOR MATCHES "Intel10_64lp*")
         ## look for the sequential version
         set(BLA_VENDOR "Intel10_64lp_seq")
     endif()
-    
+
     if(LAPACKEXT_FIND_REQUIRED)
         find_package(LAPACK REQUIRED)
     else()
         find_package(LAPACK)
     endif()
-    
+
     if (LAPACK_FOUND)
         if(BLAS_SEQ_LIBRARIES)
             set(LAPACK_SEQ_LIBRARIES "${BLAS_SEQ_LIBRARIES}")
         else()
             set(LAPACK_SEQ_LIBRARIES "${LAPACK_SEQ_LIBRARIES-NOTFOUND}")
-        endif()     
+        endif()
         # if BLAS Intel 10 64 bit -> save sequential and multithreaded versions
         if(BLA_VENDOR MATCHES "Intel10_64lp*")
             if(BLAS_PAR_LIBRARIES)
                 set(LAPACK_PAR_LIBRARIES "${BLAS_PAR_LIBRARIES}")
             else()
                 set(LAPACK_PAR_LIBRARIES "${LAPACK_PAR_LIBRARIES-NOTFOUND}")
-            endif()         
-        endif()  
+            endif()
+        endif()
     endif()
-    
-elseif(BLA_VENDOR MATCHES "ACML*") 
+
+elseif(BLA_VENDOR MATCHES "ACML*")
 
     ###
     # look for libs
@@ -165,14 +161,14 @@ elseif(BLA_VENDOR MATCHES "ACML*")
             set(LAPACK_SEQ_LIBRARIES "${BLAS_SEQ_LIBRARIES}")
         else()
             set(LAPACK_SEQ_LIBRARIES "${LAPACK_SEQ_LIBRARIES-NOTFOUND}")
-        endif()    
+        endif()
         if(BLAS_PAR_LIBRARIES)
             set(LAPACK_PAR_LIBRARIES "${BLAS_PAR_LIBRARIES}")
         else()
             set(LAPACK_PAR_LIBRARIES "${LAPACK_PAR_LIBRARIES-NOTFOUND}")
-        endif()  
-    endif()   
-    
+        endif()
+    endif()
+
 else()
 
     ## look for a sequential version
@@ -198,12 +194,12 @@ else()
     else()
         find_package(LAPACK)
     endif()
-    
+
     if(LAPACK_FOUND)
         set(LAPACK_SEQ_LIBRARIES "${LAPACK_LIBRARIES}")
     else()
         set(LAPACK_SEQ_LIBRARIES "${LAPACK_SEQ_LIBRARIES-NOTFOUND}")
-    endif()    
+    endif()
     set(BLAS_PAR_LIBRARIES "${BLAS_PAR_LIBRARIES-NOTFOUND}")
 
 endif()
@@ -257,7 +253,7 @@ if(BLA_VENDOR MATCHES "Intel*")
             find_package_handle_standard_args(LAPACK DEFAULT_MSG
                                               LAPACK_PAR_LIBRARIES)
         endif()
-                          
+
     else()
         if(NOT LAPACKEXT_FIND_QUIETLY)
             message(STATUS "LAPACK sequential libraries stored in"
@@ -266,7 +262,7 @@ if(BLA_VENDOR MATCHES "Intel*")
         find_package_handle_standard_args(LAPACK DEFAULT_MSG
                                           LAPACK_SEQ_LIBRARIES
                                           LAPACK_LIBRARY_DIRS
-                                          LAPACK_INCLUDE_DIRS)    
+                                          LAPACK_INCLUDE_DIRS)
     endif()
 elseif(BLA_VENDOR MATCHES "ACML*")
     if(NOT LAPACKEXT_FIND_QUIETLY)
diff --git a/cmake_modules/morse/find/FindMAGMA.cmake b/cmake_modules/morse/find/FindMAGMA.cmake
index bd1f44a0d..664c37ab0 100644
--- a/cmake_modules/morse/find/FindMAGMA.cmake
+++ b/cmake_modules/morse/find/FindMAGMA.cmake
@@ -13,13 +13,13 @@
 #  find_package(MAGMA
 #               [REQUIRED]             # Fail with error if magma is not found
 #               [COMPONENTS <libs>...] # required dependencies
-#              )  
-# This module finds headers and magma library. 
+#              )
+# This module finds headers and magma library.
 # Results are reported in variables:
 #  MAGMA_FOUND           - True if headers and requested libraries were found
 #  MAGMA_INCLUDE_DIRS    - magma include directories
 #  MAGMA_LIBRARY_DIRS    - Link directories for magma libraries
-# The user can give specific paths where to find the libraries adding cmake 
+# The user can give specific paths where to find the libraries adding cmake
 # options at configure (ex: cmake path/to/project -DMAGMA_DIR=path/to/magma):
 #  MAGMA_DIR             - Where to find the base directory of magma
 #  MAGMA_INCDIR          - Where to find the header files
@@ -43,10 +43,6 @@
 #  License text for the above reference.)
 
 
-# Some macros to print status when search for headers and libs
-# PrintFindStatus.cmake is in cmake_modules/morse/find directory
-include(PrintFindStatus)
-
 # MAGMA may depend on CUDA
 # try to find it specified as COMPONENTS during the call
 if( MAGMA_FIND_COMPONENTS )
@@ -82,11 +78,11 @@ if(PKG_CONFIG_EXECUTABLE)
     if (NOT MAGMA_FIND_QUIETLY)
         if (MAGMA_FOUND AND MAGMA_LIBRARIES)
             message(STATUS "Looking for MAGMA - found using PkgConfig")
-            if(NOT MAGMA_INCLUDE_DIRS)
-                message("${Magenta}MAGMA_INCLUDE_DIRS is empty using PkgConfig."
-                    "Perhaps the path to magma headers is already present in your"
-                    "C(PLUS)_INCLUDE_PATH environment variable.${ColourReset}")
-            endif()
+            #if(NOT MAGMA_INCLUDE_DIRS)
+            #    message("${Magenta}MAGMA_INCLUDE_DIRS is empty using PkgConfig."
+            #        "Perhaps the path to magma headers is already present in your"
+            #        "C(PLUS)_INCLUDE_PATH environment variable.${ColourReset}")
+            #endif()
         else()
             message("${Magenta}Looking for MAGMA - not found using PkgConfig."
                 "Perhaps you should add the directory containing magma.pc"
@@ -125,7 +121,7 @@ if(NOT MAGMA_FOUND OR NOT MAGMA_LIBRARIES)
 
     # Looking for include
     # -------------------
-    
+
     # Add system include paths to search include
     # ------------------------------------------
     unset(_inc_env)
@@ -144,8 +140,8 @@ if(NOT MAGMA_FOUND OR NOT MAGMA_LIBRARIES)
     list(APPEND _inc_env "${CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES}")
     list(APPEND _inc_env "${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}")
     list(REMOVE_DUPLICATES _inc_env)
-    
-    
+
+
     # Try to find the magma header in the given paths
     # -------------------------------------------------
     # call cmake macro to find the header path
@@ -169,13 +165,7 @@ if(NOT MAGMA_FOUND OR NOT MAGMA_LIBRARIES)
         endif()
     endif()
     mark_as_advanced(MAGMA_magma.h_DIRS)
-    
-    # Print status if not found
-    # -------------------------
-    if (NOT MAGMA_magma.h_DIRS AND NOT MAGMA_FIND_QUIETLY)
-        Print_Find_Header_Status(magma magma.h)
-    endif ()
-    
+
     # If found, add path to cmake variable
     # ------------------------------------
     if (MAGMA_magma.h_DIRS)
@@ -186,11 +176,11 @@ if(NOT MAGMA_FOUND OR NOT MAGMA_LIBRARIES)
             message(STATUS "Looking for magma -- magma.h not found")
         endif()
     endif()
-    
-    
+
+
     # Looking for lib
     # ---------------
-    
+
     # Add system library paths to search lib
     # --------------------------------------
     unset(_lib_env)
@@ -206,10 +196,10 @@ if(NOT MAGMA_FOUND OR NOT MAGMA_LIBRARIES)
         list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
     endif()
     list(REMOVE_DUPLICATES _lib_env)
-    
+
     # Try to find the magma lib in the given paths
     # ----------------------------------------------
-    
+
     # call cmake macro to find the lib path
     if(MAGMA_LIBDIR)
         set(MAGMA_magma_LIBRARY "MAGMA_magma_LIBRARY-NOTFOUND")
@@ -231,13 +221,7 @@ if(NOT MAGMA_FOUND OR NOT MAGMA_LIBRARIES)
         endif()
     endif()
     mark_as_advanced(MAGMA_magma_LIBRARY)
-    
-    # Print status if not found
-    # -------------------------
-    if (NOT MAGMA_magma_LIBRARY AND NOT MAGMA_FIND_QUIETLY)
-        Print_Find_Library_Status(magma libmagma)
-    endif ()
-    
+
     # If found, add path to cmake variable
     # ------------------------------------
     if (MAGMA_magma_LIBRARY)
diff --git a/cmake_modules/morse/find/FindMETIS.cmake b/cmake_modules/morse/find/FindMETIS.cmake
index 542811800..3ed6c13c6 100644
--- a/cmake_modules/morse/find/FindMETIS.cmake
+++ b/cmake_modules/morse/find/FindMETIS.cmake
@@ -13,14 +13,14 @@
 #  find_package(METIS
 #               [REQUIRED]             # Fail with error if metis is not found
 #               [COMPONENTS <libs>...] # required dependencies
-#              )  
-# This module finds headers and metis library. 
+#              )
+# This module finds headers and metis library.
 # Results are reported in variables:
 #  METIS_FOUND           - True if headers and requested libraries were found
 #  METIS_INCLUDE_DIRS    - metis include directories
 #  METIS_LIBRARY_DIRS    - Link directories for metis libraries
 #  METIS_LIBRARIES       - metis component libraries to be linked
-# The user can give specific paths where to find the libraries adding cmake 
+# The user can give specific paths where to find the libraries adding cmake
 # options at configure (ex: cmake path/to/project -DMETIS_DIR=path/to/metis):
 #  METIS_DIR             - Where to find the base directory of metis
 #  METIS_INCDIR          - Where to find the header files
@@ -44,10 +44,6 @@
 #  License text for the above reference.)
 
 
-# Some macros to print status when search for headers and libs
-# PrintFindStatus.cmake is in cmake_modules/morse/find directory
-include(PrintFindStatus)
-
 # Looking for include
 # -------------------
 
@@ -85,7 +81,7 @@ else()
         find_path(METIS_metis.h_DIRS
           NAMES metis.h
           HINTS ${METIS_DIR}
-          PATH_SUFFIXES include)        
+          PATH_SUFFIXES include)
     else()
         set(METIS_metis.h_DIRS "METIS_metis.h_DIRS-NOTFOUND")
         find_path(METIS_metis.h_DIRS
@@ -95,11 +91,6 @@ else()
 endif()
 mark_as_advanced(METIS_metis.h_DIRS)
 
-# Print status if not found
-# -------------------------
-if (NOT METIS_metis.h_DIRS AND NOT METIS_FIND_QUIETLY)
-    Print_Find_Header_Status(metis metis.h)
-endif ()
 
 # If found, add path to cmake variable
 # ------------------------------------
@@ -139,9 +130,9 @@ if(METIS_LIBDIR)
     set(METIS_metis_LIBRARY "METIS_metis_LIBRARY-NOTFOUND")
     find_library(METIS_metis_LIBRARY
         NAMES metis
-        HINTS ${METIS_LIBDIR})      
+        HINTS ${METIS_LIBDIR})
 else()
-    if(METIS_DIR)   
+    if(METIS_DIR)
         set(METIS_metis_LIBRARY "METIS_metis_LIBRARY-NOTFOUND")
         find_library(METIS_metis_LIBRARY
             NAMES metis
@@ -151,16 +142,11 @@ else()
         set(METIS_metis_LIBRARY "METIS_metis_LIBRARY-NOTFOUND")
         find_library(METIS_metis_LIBRARY
             NAMES metis
-            HINTS ${_lib_env})        
+            HINTS ${_lib_env})
     endif()
 endif()
 mark_as_advanced(METIS_metis_LIBRARY)
 
-# Print status if not found
-# -------------------------
-if (NOT METIS_metis_LIBRARY AND NOT METIS_FIND_QUIETLY)
-    Print_Find_Library_Status(metis libmetis)
-endif ()
 
 # If found, add path to cmake variable
 # ------------------------------------
diff --git a/cmake_modules/morse/find/FindPARMETIS.cmake b/cmake_modules/morse/find/FindPARMETIS.cmake
index be16333d0..5d40857c0 100644
--- a/cmake_modules/morse/find/FindPARMETIS.cmake
+++ b/cmake_modules/morse/find/FindPARMETIS.cmake
@@ -13,14 +13,14 @@
 #  find_package(PARMETIS
 #               [REQUIRED]             # Fail with error if parmetis is not found
 #               [COMPONENTS <libs>...] # required dependencies
-#              )  
-# This module finds headers and parmetis library. 
+#              )
+# This module finds headers and parmetis library.
 # Results are reported in variables:
 #  PARMETIS_FOUND           - True if headers and requested libraries were found
 #  PARMETIS_INCLUDE_DIRS    - parmetis include directories
 #  PARMETIS_LIBRARY_DIRS    - Link directories for parmetis libraries
 #  PARMETIS_LIBRARIES       - parmetis component libraries to be linked
-# The user can give specific paths where to find the libraries adding cmake 
+# The user can give specific paths where to find the libraries adding cmake
 # options at configure (ex: cmake path/to/project -DPARMETIS_DIR=path/to/parmetis):
 #  PARMETIS_DIR             - Where to find the base directory of parmetis
 #  PARMETIS_INCDIR          - Where to find the header files
@@ -44,10 +44,6 @@
 #  License text for the above reference.)
 
 
-# Some macros to print status when search for headers and libs
-# PrintFindStatus.cmake is in cmake_modules/morse/find directory
-include(PrintFindStatus)
-
 # PARMETIS depends on MPI
 # try to find it specified as COMPONENTS during the call
 if( PARMETIS_FIND_COMPONENTS )
@@ -108,7 +104,7 @@ else()
         find_path(PARMETIS_parmetis.h_DIRS
           NAMES parmetis.h
           HINTS ${PARMETIS_DIR}
-          PATH_SUFFIXES include)        
+          PATH_SUFFIXES include)
     else()
         set(PARMETIS_parmetis.h_DIRS "PARMETIS_parmetis.h_DIRS-NOTFOUND")
         find_path(PARMETIS_parmetis.h_DIRS
@@ -118,11 +114,6 @@ else()
 endif()
 mark_as_advanced(PARMETIS_parmetis.h_DIRS)
 
-# Print status if not found
-# -------------------------
-if (NOT PARMETIS_parmetis.h_DIRS AND NOT PARMETIS_FIND_QUIETLY)
-    Print_Find_Header_Status(parmetis parmetis.h)
-endif ()
 
 # If found, add path to cmake variable
 # ------------------------------------
@@ -162,9 +153,9 @@ if(PARMETIS_LIBDIR)
     set(PARMETIS_parmetis_LIBRARY "PARMETIS_parmetis_LIBRARY-NOTFOUND")
     find_library(PARMETIS_parmetis_LIBRARY
         NAMES parmetis
-        HINTS ${PARMETIS_LIBDIR})      
+        HINTS ${PARMETIS_LIBDIR})
 else()
-    if(PARMETIS_DIR)   
+    if(PARMETIS_DIR)
         set(PARMETIS_parmetis_LIBRARY "PARMETIS_parmetis_LIBRARY-NOTFOUND")
         find_library(PARMETIS_parmetis_LIBRARY
             NAMES parmetis
@@ -174,17 +165,11 @@ else()
         set(PARMETIS_parmetis_LIBRARY "PARMETIS_parmetis_LIBRARY-NOTFOUND")
         find_library(PARMETIS_parmetis_LIBRARY
             NAMES parmetis
-            HINTS ${_lib_env})        
+            HINTS ${_lib_env})
     endif()
 endif()
 mark_as_advanced(PARMETIS_parmetis_LIBRARY)
 
-# Print status if not found
-# -------------------------
-if (NOT PARMETIS_parmetis_LIBRARY AND NOT PARMETIS_FIND_QUIETLY)
-    Print_Find_Library_Status(parmetis libparmetis)
-endif ()
-
 # If found, add path to cmake variable
 # ------------------------------------
 if (PARMETIS_parmetis_LIBRARY)
diff --git a/cmake_modules/morse/find/FindPTSCOTCH.cmake b/cmake_modules/morse/find/FindPTSCOTCH.cmake
index 81e77d9b1..c2ac5cb18 100644
--- a/cmake_modules/morse/find/FindPTSCOTCH.cmake
+++ b/cmake_modules/morse/find/FindPTSCOTCH.cmake
@@ -13,14 +13,14 @@
 #  find_package(PTSCOTCH
 #               [REQUIRED]             # Fail with error if ptscotch is not found
 #               [COMPONENTS <libs>...] # required dependencies
-#              )  
-# This module finds headers and ptscotch library. 
+#              )
+# This module finds headers and ptscotch library.
 # Results are reported in variables:
 #  PTSCOTCH_FOUND           - True if headers and requested libraries were found
 #  PTSCOTCH_INCLUDE_DIRS    - ptscotch include directories
 #  PTSCOTCH_LIBRARY_DIRS    - Link directories for ptscotch libraries
 #  PTSCOTCH_LIBRARIES       - ptscotch component libraries to be linked
-# The user can give specific paths where to find the libraries adding cmake 
+# The user can give specific paths where to find the libraries adding cmake
 # options at configure (ex: cmake path/to/project -DPTSCOTCH=path/to/ptscotch):
 #  PTSCOTCH_DIR             - Where to find the base directory of ptscotch
 #  PTSCOTCH_INCDIR          - Where to find the header files
@@ -44,10 +44,6 @@
 #  License text for the above reference.)
 
 
-# Some macros to print status when search for headers and libs
-# PrintFindStatus.cmake is in cmake_modules/morse/find directory
-include(PrintFindStatus)
-
 # PTSCOTCH may depend on MPI and Threads
 # try to find it specified as COMPONENTS during the call
 if( PTSCOTCH_FIND_COMPONENTS )
@@ -67,7 +63,7 @@ if( PTSCOTCH_FIND_COMPONENTS )
                 mark_as_advanced(MPI_LIBRARY)
                 mark_as_advanced(MPI_EXTRA_LIBRARY)
                 list(APPEND EXTRA_LIBRARIES ${MPI_C_LIBRARIES} )
-                include_directories( ${MPI_C_INCLUDE_PATH} )                
+                include_directories( ${MPI_C_INCLUDE_PATH} )
             endif()
         else()
             set(PTSCOTCH_${component}_FOUND FALSE)
@@ -113,7 +109,7 @@ else()
         find_path(PTSCOTCH_ptscotch.h_DIRS
           NAMES ptscotch.h
           HINTS ${PTSCOTCH_DIR}
-          PATH_SUFFIXES include)        
+          PATH_SUFFIXES include)
     else()
         set(PTSCOTCH_ptscotch.h_DIRS "PTSCOTCH_ptscotch.h_DIRS-NOTFOUND")
         find_path(PTSCOTCH_ptscotch.h_DIRS
@@ -123,12 +119,6 @@ else()
 endif()
 mark_as_advanced(PTSCOTCH_ptscotch.h_DIRS)
 
-# Print status if not found
-# -------------------------
-if (NOT PTSCOTCH_ptscotch.h_DIRS AND NOT PTSCOTCH_FIND_QUIETLY)
-    Print_Find_Header_Status(ptscotch ptscotch.h)
-endif ()
-
 # If found, add path to cmake variable
 # ------------------------------------
 if (PTSCOTCH_ptscotch.h_DIRS)
@@ -171,10 +161,10 @@ if(PTSCOTCH_LIBDIR)
         set(PTSCOTCH_${ptscotch_lib}_LIBRARY "PTSCOTCH_${ptscotch_lib}_LIBRARY-NOTFOUND")
         find_library(PTSCOTCH_${ptscotch_lib}_LIBRARY
             NAMES ${ptscotch_lib}
-            HINTS ${PTSCOTCH_LIBDIR}) 
+            HINTS ${PTSCOTCH_LIBDIR})
     endforeach()
 else()
-    if(PTSCOTCH_DIR)  
+    if(PTSCOTCH_DIR)
         foreach(ptscotch_lib ${PTSCOTCH_libs_to_find})
             set(PTSCOTCH_${ptscotch_lib}_LIBRARY "PTSCOTCH_${ptscotch_lib}_LIBRARY-NOTFOUND")
             find_library(PTSCOTCH_${ptscotch_lib}_LIBRARY
@@ -187,19 +177,11 @@ else()
             set(PTSCOTCH_${ptscotch_lib}_LIBRARY "PTSCOTCH_${ptscotch_lib}_LIBRARY-NOTFOUND")
             find_library(PTSCOTCH_${ptscotch_lib}_LIBRARY
                 NAMES ${ptscotch_lib}
-                HINTS ${_lib_env})  
+                HINTS ${_lib_env})
         endforeach()
     endif()
 endif()
 
-# Print status if not found
-# -------------------------
-foreach(ptscotch_lib ${PTSCOTCH_libs_to_find})
-    if (NOT PTSCOTCH_${ptscotch_lib}_LIBRARY AND NOT PTSCOTCH_FIND_QUIETLY)
-        Print_Find_Library_Status(ptscotch ${ptscotch_lib})
-    endif ()
-endforeach()
-
 set(PTSCOTCH_LIBRARIES "")
 set(PTSCOTCH_LIBRARY_DIRS "")
 # If found, add path to cmake variable
@@ -217,9 +199,9 @@ foreach(ptscotch_lib ${PTSCOTCH_libs_to_find})
             message(STATUS "Looking for ptscotch -- lib ${ptscotch_lib} not found")
         endif()
     endif ()
-    
+
     mark_as_advanced(PTSCOTCH_${ptscotch_lib}_LIBRARY)
-    
+
 endforeach()
 
 
diff --git a/cmake_modules/morse/find/FindQUARK.cmake b/cmake_modules/morse/find/FindQUARK.cmake
index f8575216b..a0c1f3606 100644
--- a/cmake_modules/morse/find/FindQUARK.cmake
+++ b/cmake_modules/morse/find/FindQUARK.cmake
@@ -13,14 +13,14 @@
 #  find_package(QUARK
 #               [REQUIRED]             # Fail with error if quark is not found
 #               [COMPONENTS <libs>...] # required dependencies
-#              )  
-# This module finds headers and quark library. 
+#              )
+# This module finds headers and quark library.
 # Results are reported in variables:
 #  QUARK_FOUND           - True if headers and requested libraries were found
 #  QUARK_INCLUDE_DIRS    - quark include directories
 #  QUARK_LIBRARY_DIRS    - Link directories for quark libraries
 #  QUARK_LIBRARIES       - quark component libraries to be linked
-# The user can give specific paths where to find the libraries adding cmake 
+# The user can give specific paths where to find the libraries adding cmake
 # options at configure (ex: cmake path/to/project -DQUARK=path/to/quark):
 #  QUARK_DIR             - Where to find the base directory of quark
 #  QUARK_INCDIR          - Where to find the header files
@@ -44,10 +44,6 @@
 #  License text for the above reference.)
 
 
-# Some macros to print status when search for headers and libs
-# PrintFindStatus.cmake is in cmake_modules/morse/find directory
-include(PrintFindStatus)
-
 # QUARK may depend on HWLOC
 # try to find it specified as COMPONENTS during the call
 if( QUARK_FIND_COMPONENTS )
@@ -112,12 +108,6 @@ else()
 endif()
 mark_as_advanced(QUARK_quark.h_DIRS)
 
-# Print status if not found
-# -------------------------
-if (NOT QUARK_quark.h_DIRS AND NOT QUARK_FIND_QUIETLY)
-    Print_Find_Header_Status(quark quark.h)
-endif ()
-
 # If found, add path to cmake variable
 # ------------------------------------
 if (QUARK_quark.h_DIRS)
@@ -174,12 +164,6 @@ else()
 endif()
 mark_as_advanced(QUARK_quark_LIBRARY)
 
-# Print status if not found
-# -------------------------
-if (NOT QUARK_quark_LIBRARY AND NOT QUARK_FIND_QUIETLY)
-    Print_Find_Library_Status(quark libquark)
-endif ()
-
 # If found, add path to cmake variable
 # ------------------------------------
 if (QUARK_quark_LIBRARY)
diff --git a/cmake_modules/morse/find/FindSCOTCH.cmake b/cmake_modules/morse/find/FindSCOTCH.cmake
index 267a76c35..d98ab1069 100644
--- a/cmake_modules/morse/find/FindSCOTCH.cmake
+++ b/cmake_modules/morse/find/FindSCOTCH.cmake
@@ -13,14 +13,14 @@
 #  find_package(SCOTCH
 #               [REQUIRED]             # Fail with error if scotch is not found
 #               [COMPONENTS <libs>...] # required dependencies
-#              )  
-# This module finds headers and scotch library. 
+#              )
+# This module finds headers and scotch library.
 # Results are reported in variables:
 #  SCOTCH_FOUND           - True if headers and requested libraries were found
 #  SCOTCH_INCLUDE_DIRS    - scotch include directories
 #  SCOTCH_LIBRARY_DIRS    - Link directories for scotch libraries
 #  SCOTCH_LIBRARIES       - scotch component libraries to be linked
-# The user can give specific paths where to find the libraries adding cmake 
+# The user can give specific paths where to find the libraries adding cmake
 # options at configure (ex: cmake path/to/project -DSCOTCH=path/to/scotch):
 #  SCOTCH_DIR             - Where to find the base directory of scotch
 #  SCOTCH_INCDIR          - Where to find the header files
@@ -44,10 +44,6 @@
 #  License text for the above reference.)
 
 
-# Some macros to print status when search for headers and libs
-# PrintFindStatus.cmake is in cmake_modules/morse/find directory
-include(PrintFindStatus)
-
 # SCOTCH may depend on Threads
 # try to find it specified as COMPONENTS during the call
 if( SCOTCH_FIND_COMPONENTS )
@@ -106,7 +102,7 @@ else()
         find_path(SCOTCH_scotch.h_DIRS
           NAMES scotch.h
           HINTS ${SCOTCH_DIR}
-          PATH_SUFFIXES include)        
+          PATH_SUFFIXES include)
     else()
         set(SCOTCH_scotch.h_DIRS "SCOTCH_scotch.h_DIRS-NOTFOUND")
         find_path(SCOTCH_scotch.h_DIRS
@@ -116,12 +112,6 @@ else()
 endif()
 mark_as_advanced(SCOTCH_scotch.h_DIRS)
 
-# Print status if not found
-# -------------------------
-if (NOT SCOTCH_scotch.h_DIRS AND NOT SCOTCH_FIND_QUIETLY)
-    Print_Find_Header_Status(scotch scotch.h)
-endif ()
-
 # If found, add path to cmake variable
 # ------------------------------------
 if (SCOTCH_scotch.h_DIRS)
@@ -164,7 +154,7 @@ if(SCOTCH_LIBDIR)
         set(SCOTCH_${scotch_lib}_LIBRARY "SCOTCH_${scotch_lib}_LIBRARY-NOTFOUND")
         find_library(SCOTCH_${scotch_lib}_LIBRARY
             NAMES ${scotch_lib}
-            HINTS ${SCOTCH_LIBDIR}) 
+            HINTS ${SCOTCH_LIBDIR})
     endforeach()
 else()
     if(SCOTCH_DIR)
@@ -180,19 +170,11 @@ else()
             set(SCOTCH_${scotch_lib}_LIBRARY "SCOTCH_${scotch_lib}_LIBRARY-NOTFOUND")
             find_library(SCOTCH_${scotch_lib}_LIBRARY
                 NAMES ${scotch_lib}
-                HINTS ${_lib_env})  
+                HINTS ${_lib_env})
         endforeach()
     endif()
 endif()
 
-# Print status if not found
-# -------------------------
-foreach(scotch_lib ${SCOTCH_libs_to_find})
-    if (NOT SCOTCH_${scotch_lib}_LIBRARY AND NOT SCOTCH_FIND_QUIETLY)
-        Print_Find_Library_Status(scotch ${scotch_lib})
-    endif ()
-endforeach()
-
 set(SCOTCH_LIBRARIES "")
 set(SCOTCH_LIBRARY_DIRS "")
 # If found, add path to cmake variable
@@ -210,7 +192,7 @@ foreach(scotch_lib ${SCOTCH_libs_to_find})
             message(STATUS "Looking for scotch -- lib ${scotch_lib} not found")
         endif()
     endif ()
-    
+
     mark_as_advanced(SCOTCH_${scotch_lib}_LIBRARY)
 
 endforeach()
diff --git a/cmake_modules/morse/find/FindSTARPU.cmake b/cmake_modules/morse/find/FindSTARPU.cmake
index 3368491be..e7d2eee6d 100644
--- a/cmake_modules/morse/find/FindSTARPU.cmake
+++ b/cmake_modules/morse/find/FindSTARPU.cmake
@@ -26,7 +26,7 @@
 #  STARPU_VERSION_STRING         - A human-readable string containing the version of the package found
 #  STARPU_VERSION_MAJOR          - The major version of the package found
 #  STARPU_VERSION_MINOR          - The minor version of the package found
-# The user can give specific paths where to find the libraries adding cmake 
+# The user can give specific paths where to find the libraries adding cmake
 # options at configure (ex: cmake path/to/project -DSTARPU=path/to/starpu):
 #  STARPU_DIR                    - Where to find the base directory of starpu
 #  STARPU_INCDIR                 - Where to find the header files
@@ -51,10 +51,6 @@
 #  License text for the above reference.)
 
 
-# Some macros to print status when search for headers and libs
-# PrintFindStatus.cmake is in cmake_modules/morse/find directory of starpumorse
-include(PrintFindStatus)
-
 # STARPU may depend on other packages (HWLOC, MPI, CUDA, ...)
 # try to find them if specified as COMPONENTS during the call
 set(STARPU_LOOK_FOR_MPI FALSE)
@@ -108,11 +104,11 @@ if(PKG_CONFIG_EXECUTABLE)
     if (NOT STARPU_FIND_QUIETLY)
         if (STARPU_SHM_FOUND AND STARPU_SHM_LIBRARIES)
             message(STATUS "Looking for STARPU - found using PkgConfig")
-            if(NOT STARPU_SHM_INCLUDE_DIRS)
-                message("${Magenta}STARPU_SHM_INCLUDE_DIRS is empty using PkgConfig."
-                    "Perhaps the path to starpu headers is already present in your"
-                    "C(PLUS)_INCLUDE_PATH environment variable.${ColourReset}")
-            endif()
+            #if(NOT STARPU_SHM_INCLUDE_DIRS)
+            #    message("${Magenta}STARPU_SHM_INCLUDE_DIRS is empty using PkgConfig."
+            #        "Perhaps the path to starpu headers is already present in your"
+            #        "C(PLUS)_INCLUDE_PATH environment variable.${ColourReset}")
+            #endif()
         else()
             message("${Magenta}Looking for STARPU - not found using PkgConfig."
                 "Perhaps you should add the directory containing libstarpu.pc"
@@ -132,7 +128,7 @@ if(PKG_CONFIG_EXECUTABLE)
     if (STARPU_FIND_VERSION_EXACT STREQUAL 1)
         if( NOT (STARPU_FIND_VERSION_MAJOR STREQUAL STARPU_VERSION_MAJOR) OR
             NOT (STARPU_FIND_VERSION_MINOR STREQUAL STARPU_VERSION_MINOR) )
-            if(NOT STARPU_FIND_QUIETLY)
+            if(STARPU_FIND_REQUIRED AND NOT STARPU_FIND_QUIETLY)
                 message(FATAL_ERROR
                         "STARPU version found is ${STARPU_VERSION_STRING}"
                         "when required is ${STARPU_FIND_VERSION}")
@@ -142,7 +138,7 @@ if(PKG_CONFIG_EXECUTABLE)
         # if the version found is older than the required then error
         if( (STARPU_FIND_VERSION_MAJOR STRGREATER STARPU_VERSION_MAJOR) OR
             (STARPU_FIND_VERSION_MINOR STRGREATER STARPU_VERSION_MINOR) )
-            if(NOT STARPU_FIND_QUIETLY)
+            if(STARPU_FIND_REQUIRED AND NOT STARPU_FIND_QUIETLY)
                 message(FATAL_ERROR
                         "STARPU version found is ${STARPU_VERSION_STRING}"
                         "when required is ${STARPU_FIND_VERSION} or newer")
@@ -153,11 +149,13 @@ if(PKG_CONFIG_EXECUTABLE)
 endif(PKG_CONFIG_EXECUTABLE)
 
 
-if( NOT STARPU_SHM_FOUND OR NOT STARPU_SHM_LIBRARIES OR (STARPU_LOOK_FOR_MPI AND (NOT STARPU_MPI_FOUND OR NOT STARPU_MPI_LIBRARIES)) )
+if( (NOT STARPU_SHM_FOUND) OR (NOT STARPU_SHM_LIBRARIES) OR
+    ( STARPU_LOOK_FOR_MPI AND (NOT STARPU_MPI_FOUND OR NOT STARPU_MPI_LIBRARIES) )
+  )
 
     # Looking for include
     # -------------------
-    
+
     # Add system include paths to search include
     # ------------------------------------------
     unset(_inc_env)
@@ -176,10 +174,10 @@ if( NOT STARPU_SHM_FOUND OR NOT STARPU_SHM_LIBRARIES OR (STARPU_LOOK_FOR_MPI AND
     list(APPEND _inc_env "${CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES}")
     list(APPEND _inc_env "${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}")
     list(REMOVE_DUPLICATES _inc_env)
-    
+
     # Try to find the version of StarPU in starpu_config.h file
     set(STARPU_hdrs_to_find "starpu_config.h")
-    
+
     # call cmake macro to find the header path
     if(STARPU_INCDIR)
         foreach(starpu_hdr ${STARPU_hdrs_to_find})
@@ -207,21 +205,14 @@ if( NOT STARPU_SHM_FOUND OR NOT STARPU_SHM_LIBRARIES OR (STARPU_LOOK_FOR_MPI AND
         endif()
     endif()
     mark_as_advanced(STARPU_starpu_config.h_INCLUDE_DIRS)
-    
-    # Print status if not found
-    # -------------------------
-    if (NOT STARPU_starpu_config.h_INCLUDE_DIRS AND NOT STARPU_FIND_QUIETLY)
-        Print_Find_Header_Status(starpu starpu_config.h)
-    endif ()
-    
-    
+
     ###
     #
     # GET_VERSION: Get the version of the software by parsing a file
     #
     ###
     MACRO(GET_VERSION _PACKAGE _filepath)
-    
+
         #message(STATUS "Looking for ${_PACKAGE} version in the file ${_filepath}")
         file(READ "${_filepath}" _file)
         string(REGEX REPLACE
@@ -234,9 +225,9 @@ if( NOT STARPU_SHM_FOUND OR NOT STARPU_SHM_LIBRARIES OR (STARPU_LOOK_FOR_MPI AND
             "${${_PACKAGE}_VERSION_MAJOR}.${${_PACKAGE}_VERSION_MINOR}")
         #message(STATUS "${_PACKAGE}_VERSION_MAJOR = -${${_PACKAGE}_VERSION_MAJOR}-")
         #message(STATUS "${_PACKAGE}_VERSION_MINOR = -${${_PACKAGE}_VERSION_MINOR}-")
-    
+
     ENDMACRO(GET_VERSION)
-    
+
     # Find the version of StarPU in starpu_config.h file
     # remark: the version is defined in this file since the STARPU 1.0 version
     if (STARPU_starpu_config.h_INCLUDE_DIRS)
@@ -245,7 +236,7 @@ if( NOT STARPU_SHM_FOUND OR NOT STARPU_SHM_LIBRARIES OR (STARPU_LOOK_FOR_MPI AND
             if (STARPU_FIND_VERSION_EXACT STREQUAL 1)
                 if( NOT (STARPU_FIND_VERSION_MAJOR STREQUAL STARPU_VERSION_MAJOR) OR
                     NOT (STARPU_FIND_VERSION_MINOR STREQUAL STARPU_VERSION_MINOR) )
-                    if(NOT STARPU_FIND_QUIETLY)
+                    if(STARPU_FIND_REQUIRED AND NOT STARPU_FIND_QUIETLY)
                         message(FATAL_ERROR
                                 "STARPU version found is ${STARPU_VERSION_STRING} "
                                 "when required is ${STARPU_FIND_VERSION}")
@@ -255,36 +246,47 @@ if( NOT STARPU_SHM_FOUND OR NOT STARPU_SHM_LIBRARIES OR (STARPU_LOOK_FOR_MPI AND
                 # if the version found is older than the required then error
                 if( (STARPU_FIND_VERSION_MAJOR STRGREATER STARPU_VERSION_MAJOR) OR
                     (STARPU_FIND_VERSION_MINOR STRGREATER STARPU_VERSION_MINOR) )
-                    if(NOT STARPU_FIND_QUIETLY)
+                    if(STARPU_FIND_REQUIRED AND NOT STARPU_FIND_QUIETLY)
                         message(FATAL_ERROR
                                 "STARPU version found is ${STARPU_VERSION_STRING} "
                                 "when required is ${STARPU_FIND_VERSION} or newer")
                     endif()
                 endif()
             endif()
+        else()
+            if(STARPU_FIND_REQUIRED AND NOT STARPU_FIND_QUIETLY)
+                message(FATAL_ERROR
+                        "STARPU version has not been found using starpu_config.h"
+                        "located in ${STARPU_starpu_config.h_INCLUDE_DIRS}")
+            endif()
+        endif()
+    else()
+        if(STARPU_FIND_REQUIRED AND NOT STARPU_FIND_QUIETLY)
+            message(FATAL_ERROR
+                    "starpu_config.h has not been found while required to get StarPU version")
         endif()
     endif()
-    
-    
+
+
     # Try to find the starpu headers in the given paths
     # -------------------------------------------------
-    
+
     # create list of headers to find
-    set(STARPU_hdrs_to_find "starpu.h;starpu_profiling.h")
+    list(APPEND STARPU_hdrs_to_find "starpu.h;starpu_profiling.h")
     if(STARPU_LOOK_FOR_MPI)
         list(APPEND STARPU_hdrs_to_find "starpu_mpi.h")
     endif()
     if(STARPU_LOOK_FOR_CUDA)
         list(APPEND STARPU_hdrs_to_find "starpu_cuda.h;starpu_scheduler.h")
     endif()
-    
+
     # call cmake macro to find the header path
     if(STARPU_INCDIR)
         foreach(starpu_hdr ${STARPU_hdrs_to_find})
             set(STARPU_${starpu_hdr}_INCLUDE_DIRS "STARPU_${starpu_hdr}_INCLUDE_DIRS-NOTFOUND")
             find_path(STARPU_${starpu_hdr}_INCLUDE_DIRS
                       NAMES ${starpu_hdr}
-                      HINTS ${STARPU_INCDIR})                
+                      HINTS ${STARPU_INCDIR})
         endforeach()
     else()
         if(STARPU_DIR)
@@ -304,20 +306,12 @@ if( NOT STARPU_SHM_FOUND OR NOT STARPU_SHM_LIBRARIES OR (STARPU_LOOK_FOR_MPI AND
             endforeach()
         endif()
     endif()
-    
-    # Print status if not found
-    # -------------------------
-    foreach(starpu_hdr ${STARPU_hdrs_to_find})
-        if (NOT STARPU_${starpu_hdr}_INCLUDE_DIRS AND NOT STARPU_FIND_QUIETLY)
-            Print_Find_Header_Status(starpu ${starpu_hdr})
-        endif ()
-    endforeach()
-    
+
     # If found, add path to cmake variable
     # ------------------------------------
     set(STARPU_INCLUDE_DIRS "")
     foreach(starpu_hdr ${STARPU_hdrs_to_find})
-    
+
         if (STARPU_${starpu_hdr}_INCLUDE_DIRS)
             # set cmake variables using the pkg-config naming convention
             list(APPEND STARPU_INCLUDE_DIRS "${STARPU_${starpu_hdr}_INCLUDE_DIRS}" )
@@ -340,131 +334,84 @@ if( NOT STARPU_SHM_FOUND OR NOT STARPU_SHM_LIBRARIES OR (STARPU_LOOK_FOR_MPI AND
             endif()
         endif ()
         mark_as_advanced(STARPU_${starpu_hdr}_INCLUDE_DIRS)
-    
+
     endforeach(starpu_hdr ${STARPU_hdrs_to_find})
-    
+
     if (STARPU_INCLUDE_DIRS)
         list(REMOVE_DUPLICATES STARPU_INCLUDE_DIRS)
     endif ()
-    
-    
-    # Looking for lib
-    # ---------------
-    
-    set(STARPU_SHM_LIBRARIES "")
-    set(STARPU_MPI_LIBRARIES "")
-    set(STARPU_LIBRARY_DIRS "")
-    
-    # Add system library paths to search lib
-    # --------------------------------------
-    unset(_lib_env)
-    if(WIN32)
-        string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
-    else()
-        if(APPLE)
-            string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
+
+    if (STARPU_starpu_config.h_INCLUDE_DIRS)
+        # Looking for lib
+        # ---------------
+
+        set(STARPU_SHM_LIBRARIES "")
+        set(STARPU_MPI_LIBRARIES "")
+        set(STARPU_LIBRARY_DIRS "")
+
+        # Add system library paths to search lib
+        # --------------------------------------
+        unset(_lib_env)
+        if(WIN32)
+            string(REPLACE ":" ";" _lib_env "$ENV{LIB}")
         else()
-            string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
+            if(APPLE)
+                string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}")
+            else()
+                string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}")
+            endif()
+            list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}")
+            list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
         endif()
-        list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}")
-        list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
-    endif()
-    list(REMOVE_DUPLICATES _lib_env)
-    
-    # Try to find the starpu libs in the given paths
-    # ----------------------------------------------
-    
-    # create list of libs to find
-    set(STARPU_libs_to_find     "starpu-${STARPU_VERSION_STRING}")
-    set(STARPU_SHM_libs_to_find "starpu-${STARPU_VERSION_STRING}")
-    if (STARPU_LOOK_FOR_MPI)
-        list(APPEND STARPU_libs_to_find "starpumpi-${STARPU_VERSION_STRING}")
-        set(STARPU_MPI_libs_to_find "${STARPU_libs_to_find}")
-    endif()
-    
-    # call cmake macro to find the lib path
-    if(STARPU_LIBDIR)
-        foreach(starpu_lib ${STARPU_libs_to_find})
-            set(STARPU_${starpu_lib}_LIBRARY "STARPU_${starpu_lib}_LIBRARY-NOTFOUND")
-            find_library(STARPU_${starpu_lib}_LIBRARY
-                         NAMES ${starpu_lib}
-                         HINTS ${STARPU_LIBDIR})
-        endforeach()
-    else()
-        if(STARPU_DIR)
+        list(REMOVE_DUPLICATES _lib_env)
+
+        # Try to find the starpu libs in the given paths
+        # ----------------------------------------------
+
+        # create list of libs to find
+        set(STARPU_libs_to_find     "starpu-${STARPU_VERSION_STRING}")
+        set(STARPU_SHM_libs_to_find "starpu-${STARPU_VERSION_STRING}")
+        if (STARPU_LOOK_FOR_MPI)
+            list(APPEND STARPU_libs_to_find "starpumpi-${STARPU_VERSION_STRING}")
+            set(STARPU_MPI_libs_to_find "${STARPU_libs_to_find}")
+        endif()
+
+        # call cmake macro to find the lib path
+        if(STARPU_LIBDIR)
             foreach(starpu_lib ${STARPU_libs_to_find})
                 set(STARPU_${starpu_lib}_LIBRARY "STARPU_${starpu_lib}_LIBRARY-NOTFOUND")
                 find_library(STARPU_${starpu_lib}_LIBRARY
                              NAMES ${starpu_lib}
-                             HINTS ${STARPU_DIR}
-                             PATH_SUFFIXES lib lib32 lib64)
+                             HINTS ${STARPU_LIBDIR})
             endforeach()
         else()
-            foreach(starpu_lib ${STARPU_libs_to_find})
-                set(STARPU_${starpu_lib}_LIBRARY "STARPU_${starpu_lib}_LIBRARY-NOTFOUND")
-                find_library(STARPU_${starpu_lib}_LIBRARY
-                             NAMES ${starpu_lib}
-                             HINTS ${_lib_env})
-            endforeach()
-        endif()
-    endif()
-    
-    # Print status if not found
-    # -------------------------
-    foreach(starpu_lib ${STARPU_libs_to_find})
-        if (NOT STARPU_${starpu_lib}_LIBRARY AND NOT STARPU_FIND_QUIETLY)
-            Print_Find_Library_Status(starpu ${starpu_lib})
-        endif ()
-    endforeach()
-    
-    # If found, add path to cmake variable
-    # ------------------------------------
-    foreach(starpu_lib ${STARPU_libs_to_find})
-    
-        if (STARPU_${starpu_lib}_LIBRARY)
-        
-            get_filename_component(${starpu_lib}_lib_path ${STARPU_${starpu_lib}_LIBRARY} PATH)
-            # set cmake variables (respects naming convention)
-            
-            foreach(starpu_shm_lib ${STARPU_SHM_libs_to_find})
-                if(starpu_shm_lib STREQUAL starpu_lib)
-                    if (STARPU_SHM_LIBRARIES)
-                        list(APPEND STARPU_SHM_LIBRARIES "${STARPU_${starpu_lib}_LIBRARY}")
-                    else()
-                        set(STARPU_SHM_LIBRARIES "${STARPU_${starpu_lib}_LIBRARY}")
-                    endif()
-                endif()
-            endforeach()
-            if (STARPU_LOOK_FOR_MPI)
-                foreach(starpu_mpi_lib ${STARPU_MPI_libs_to_find})
-                    if(starpu_mpi_lib STREQUAL starpu_lib)
-                        if (STARPU_MPI_LIBRARIES)
-                            list(APPEND STARPU_MPI_LIBRARIES "${STARPU_${starpu_lib}_LIBRARY}")
-                        else()
-                            set(STARPU_MPI_LIBRARIES "${STARPU_${starpu_lib}_LIBRARY}")
-                        endif()
-                    endif()
+            if(STARPU_DIR)
+                foreach(starpu_lib ${STARPU_libs_to_find})
+                    set(STARPU_${starpu_lib}_LIBRARY "STARPU_${starpu_lib}_LIBRARY-NOTFOUND")
+                    find_library(STARPU_${starpu_lib}_LIBRARY
+                                 NAMES ${starpu_lib}
+                                 HINTS ${STARPU_DIR}
+                                 PATH_SUFFIXES lib lib32 lib64)
                 endforeach()
-            endif ()
-            if (STARPU_LIBRARY_DIRS)
-                list(APPEND STARPU_LIBRARY_DIRS "${${starpu_lib}_lib_path}")
             else()
-                set(STARPU_LIBRARY_DIRS "${${starpu_lib}_lib_path}")
-            endif()
-            
-        else (STARPU_${starpu_lib}_LIBRARY)
-    
-            if(NOT STARPU_FIND_QUIETLY)
-                message(STATUS "Looking for starpu -- lib ${starpu_lib} not found")
+                foreach(starpu_lib ${STARPU_libs_to_find})
+                    set(STARPU_${starpu_lib}_LIBRARY "STARPU_${starpu_lib}_LIBRARY-NOTFOUND")
+                    find_library(STARPU_${starpu_lib}_LIBRARY
+                                 NAMES ${starpu_lib}
+                                 HINTS ${_lib_env})
+                endforeach()
             endif()
-            if(starpu_lib STREQUAL "starpumpi-${STARPU_VERSION_STRING}" AND
-               NOT ${STARPU_FIND_REQUIRED_MPI} STREQUAL 1)
-                # if MPI optional, not a problem: no NOTFOUND in list of MPI LIBRARIES
-                if(NOT STARPU_FIND_QUIETLY)
-                    message(STATUS "Looking for starpu -- lib ${starpu_lib} not required")
-                endif()
-            else()
-                # for any other lib, add NOTFOUND in the proper list of LIBRARIES
+        endif()
+
+        # If found, add path to cmake variable
+        # ------------------------------------
+        foreach(starpu_lib ${STARPU_libs_to_find})
+
+            if (STARPU_${starpu_lib}_LIBRARY)
+
+                get_filename_component(${starpu_lib}_lib_path ${STARPU_${starpu_lib}_LIBRARY} PATH)
+                # set cmake variables (respects naming convention)
+
                 foreach(starpu_shm_lib ${STARPU_SHM_libs_to_find})
                     if(starpu_shm_lib STREQUAL starpu_lib)
                         if (STARPU_SHM_LIBRARIES)
@@ -485,28 +432,75 @@ if( NOT STARPU_SHM_FOUND OR NOT STARPU_SHM_LIBRARIES OR (STARPU_LOOK_FOR_MPI AND
                         endif()
                     endforeach()
                 endif ()
+                if (STARPU_LIBRARY_DIRS)
+                    list(APPEND STARPU_LIBRARY_DIRS "${${starpu_lib}_lib_path}")
+                else()
+                    set(STARPU_LIBRARY_DIRS "${${starpu_lib}_lib_path}")
+                endif()
+
+            else (STARPU_${starpu_lib}_LIBRARY)
+
+                if(NOT STARPU_FIND_QUIETLY)
+                    message(STATUS "Looking for starpu -- lib ${starpu_lib} not found")
+                endif()
+                if(starpu_lib STREQUAL "starpumpi-${STARPU_VERSION_STRING}" AND
+                   NOT ${STARPU_FIND_REQUIRED_MPI} STREQUAL 1)
+                    # if MPI optional, not a problem: no NOTFOUND in list of MPI LIBRARIES
+                    if(NOT STARPU_FIND_QUIETLY)
+                        message(STATUS "Looking for starpu -- lib ${starpu_lib} not required")
+                    endif()
+                else()
+                    # for any other lib, add NOTFOUND in the proper list of LIBRARIES
+                    foreach(starpu_shm_lib ${STARPU_SHM_libs_to_find})
+                        if(starpu_shm_lib STREQUAL starpu_lib)
+                            if (STARPU_SHM_LIBRARIES)
+                                list(APPEND STARPU_SHM_LIBRARIES "${STARPU_${starpu_lib}_LIBRARY}")
+                            else()
+                                set(STARPU_SHM_LIBRARIES "${STARPU_${starpu_lib}_LIBRARY}")
+                            endif()
+                        endif()
+                    endforeach()
+                    if (STARPU_LOOK_FOR_MPI)
+                        foreach(starpu_mpi_lib ${STARPU_MPI_libs_to_find})
+                            if(starpu_mpi_lib STREQUAL starpu_lib)
+                                if (STARPU_MPI_LIBRARIES)
+                                    list(APPEND STARPU_MPI_LIBRARIES "${STARPU_${starpu_lib}_LIBRARY}")
+                                else()
+                                    set(STARPU_MPI_LIBRARIES "${STARPU_${starpu_lib}_LIBRARY}")
+                                endif()
+                            endif()
+                        endforeach()
+                    endif ()
+                endif()
+
+            endif (STARPU_${starpu_lib}_LIBRARY)
+
+            mark_as_advanced(STARPU_${starpu_lib}_LIBRARY)
+
+        endforeach(starpu_lib ${STARPU_libs_to_find})
+
+        if (STARPU_LIBRARY_DIRS)
+            list(REMOVE_DUPLICATES STARPU_SHM_LIBRARIES)
+            list(REMOVE_DUPLICATES STARPU_MPI_LIBRARIES)
+            list(REMOVE_DUPLICATES STARPU_LIBRARY_DIRS)
+        endif ()
+
+        if (STARPU_SHM_LIBRARIES AND STARPU_LIBRARY_DIRS AND STARPU_INCLUDE_DIRS)
+            set(STARPU_SHM_FOUND TRUE)
+            if(STARPU_MPI_LIBRARIES)
+                set(STARPU_MPI_FOUND TRUE)
             endif()
-            
-        endif (STARPU_${starpu_lib}_LIBRARY)
-        
-        mark_as_advanced(STARPU_${starpu_lib}_LIBRARY)
-        
-    endforeach(starpu_lib ${STARPU_libs_to_find})
-    
-    if (STARPU_LIBRARY_DIRS)
-        list(REMOVE_DUPLICATES STARPU_SHM_LIBRARIES)
-        list(REMOVE_DUPLICATES STARPU_MPI_LIBRARIES)
-        list(REMOVE_DUPLICATES STARPU_LIBRARY_DIRS)
-    endif ()
-    
-    if (STARPU_SHM_LIBRARIES AND STARPU_LIBRARY_DIRS AND STARPU_INCLUDE_DIRS)
-        set(STARPU_SHM_FOUND TRUE)
-        if(STARPU_MPI_LIBRARIES)
-            set(STARPU_MPI_FOUND TRUE)
         endif()
-    endif()
 
-endif( NOT STARPU_SHM_FOUND OR NOT STARPU_SHM_LIBRARIES OR (STARPU_LOOK_FOR_MPI AND (NOT STARPU_MPI_FOUND OR NOT STARPU_MPI_LIBRARIES)) )
+    else(STARPU_starpu_config.h_INCLUDE_DIRS)
+        if(NOT STARPU_FIND_QUIETLY)
+            message(STATUS "The version of StarPU is not known so that we do not search libraries")
+        endif()
+    endif(STARPU_starpu_config.h_INCLUDE_DIRS)
+
+endif( (NOT STARPU_SHM_FOUND) OR (NOT STARPU_SHM_LIBRARIES) OR
+       ( STARPU_LOOK_FOR_MPI AND (NOT STARPU_MPI_FOUND OR NOT STARPU_MPI_LIBRARIES) )
+     )
 
 
 # check that STARPU has been found
@@ -519,7 +513,7 @@ if(NOT STARPU_FIND_QUIETLY)
             message(STATUS "The mpi version of StarPU has been found so that we manage"
                            "two lists of libs, one sequential and one parallel (see"
                            "STARPU_SHM_LIBRARIES and STARPU_MPI_LIBRARIES).")
-        endif()        
+        endif()
         message(STATUS "StarPU shared memory libraries stored in STARPU_SHM_LIBRARIES")
     endif()
 endif()
diff --git a/cmake_modules/morse/find/FindTMG.cmake b/cmake_modules/morse/find/FindTMG.cmake
index 2d861464c..430056179 100644
--- a/cmake_modules/morse/find/FindTMG.cmake
+++ b/cmake_modules/morse/find/FindTMG.cmake
@@ -13,14 +13,14 @@
 #  find_package(TMG
 #               [REQUIRED]             # Fail with error if tmg is not found
 #               [COMPONENTS <libs>...] # required dependencies
-#              )  
-# This module finds headers and tmg library. 
+#              )
+# This module finds headers and tmg library.
 # Results are reported in variables:
 #  TMG_FOUND           - True if headers and requested libraries were found
 #  TMG_INCLUDE_DIRS    - tmg include directories
 #  TMG_LIBRARY_DIRS    - Link directories for tmg libraries
 #  TMG_LIBRARIES       - tmg component libraries to be linked
-# The user can give specific paths where to find the libraries adding cmake 
+# The user can give specific paths where to find the libraries adding cmake
 # options at configure (ex: cmake path/to/project -DTMG=path/to/tmg):
 #  TMG_DIR             - Where to find the base directory of tmg
 #  TMG_INCDIR          - Where to find the header files
@@ -44,10 +44,6 @@
 #  License text for the above reference.)
 
 
-# Some macros to print status when search for headers and libs
-# PrintFindStatus.cmake is in cmake_modules/morse/find directory
-include(PrintFindStatus)
-
 # used to test a TMG function after
 get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
 if (NOT _LANGUAGES_ MATCHES Fortran)
@@ -82,11 +78,11 @@ if (LAPACK_FOUND)
     check_function_exists(dlarnv TMG_WORKS)
     if (TMG_WORKS)
         unset(TMG_WORKS CACHE)
-        check_function_exists(dlagsy TMG_WORKS)    
+        check_function_exists(dlagsy TMG_WORKS)
         mark_as_advanced(TMG_WORKS)
         set(CMAKE_REQUIRED_LIBRARIES)
     endif()
-    
+
     if(TMG_WORKS)
         if(NOT TMG_FIND_QUIETLY)
             message(STATUS "Looking for tmg: test with lapack succeeds")
@@ -97,13 +93,13 @@ if (LAPACK_FOUND)
         if(LAPACK_INCLUDE_DIRS)
             set(TMG_INCLUDE_DIRS "${LAPACK_INCLUDE_DIRS}")
         endif()
-    else()    
+    else()
 
         if(NOT TMG_FIND_QUIETLY)
             message(STATUS "Looking for tmg : test with lapack fails")
             message(STATUS "Looking for tmg : try to find it elsewhere")
         endif()
-        # test fails: try to find TMG lib exterior to LAPACK  
+        # test fails: try to find TMG lib exterior to LAPACK
 
         # Looking for lib tmg
         # -------------------
@@ -175,7 +171,7 @@ else()
         message(STATUS "TMG requires LAPACK but LAPACK has not been found."
             "Please look for LAPACK first.")
     endif()
-    
+
 endif()
 
 
diff --git a/cmake_modules/morse/find/PrintFindStatus.cmake b/cmake_modules/morse/find/PrintFindStatus.cmake
index 12670ca1d..686f9575e 100644
--- a/cmake_modules/morse/find/PrintFindStatus.cmake
+++ b/cmake_modules/morse/find/PrintFindStatus.cmake
@@ -65,14 +65,14 @@ macro(Print_Find_Header_Status _libname _header_to_find)
     string(TOLOWER ${_libname} libname)
 
     # print status
-    #message(" ")    
+    #message(" ")
     if(${LIBNAME}_INCDIR)
         message("${Blue}${LIBNAME}_INCDIR is defined but ${_header_to_find}"
                 "has not been found in ${${LIBNAME}_INCDIR}${ColourReset}")
     else()
         if(${LIBNAME}_DIR)
             message("${Blue}${LIBNAME}_DIR is defined but"
-                    "${_header_to_find} has not been found in" 
+                    "${_header_to_find} has not been found in"
                     "${${LIBNAME}_DIR}/include${ColourReset}")
         else()
             message("${Blue}${_header_to_find} not found."
@@ -83,7 +83,7 @@ macro(Print_Find_Header_Status _libname _header_to_find)
                     ", CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES)${ColourReset}")
             if(_inc_env)
                 message("${Blue}${_header_to_find} has not been found in"
-                        "${_inc_env}${ColourReset}")        
+                        "${_inc_env}${ColourReset}")
             endif()
         endif()
     endif()
@@ -92,7 +92,7 @@ macro(Print_Find_Header_Status _libname _header_to_find)
             "- Option 2: Provide the directory where to find the headers with cmake option: -D${LIBNAME}_INCDIR=your/path/to/${libname}/include/\n"
             "- Option 3: Update your environment variable (INCLUDE or CPATH)\n"
             "- Option 4: If your library provides a PkgConfig file, make sure pkg-config finds your library${ColourReset}")
-    #message(" ")
+        #message(" ")
 
 endmacro()
 
@@ -185,7 +185,7 @@ macro(Print_Find_Library_Blas_CheckFunc_Status _name)
     message("${Red}Libs have been found but check of symbol ${_name} failed "
             "with following libraries ${ARGN}${ColourReset}")
     message("${BoldRed}Please open your error file CMakeFiles/CMakeError.log"
-            "to figure out why it fails${ColourReset}")            
+            "to figure out why it fails${ColourReset}")
     #message(" ")
 
 endmacro()
@@ -204,7 +204,7 @@ macro(Print_Find_Pkgconfig_Status _libname _pc_to_find)
             "${ARGN}${ColourReset}")
     message("${BoldMagenta}If you really want to use the pkg-config file of"
             "${libname}, please update your PKG_CONFIG_PATH with the path"
-            "where ${_pc_to_find} states${ColourReset}")     
+            "where ${_pc_to_find} states${ColourReset}")
     #message(" ")
 
 endmacro()
-- 
GitLab