On Tue, Sep 09, 2014 at 11:48:53AM -0400, Brad King wrote:
> On 09/09/2014 11:35 AM, Roger Leigh wrote:
> > I have attached a minor fix to the FindIce module added a couple of
> > weeks back.
> 
> Applied, thanks:
> 
>  FindIce: Remove unneeded search path modification
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d5047ca1
> 
> While reviewing I noticed that there are some message(STATUS) calls
> not protected by if(Ice_DEBUG) or checks of Ice_FIND_QUIETLY.  The
> latter is needed to honor the QUIET option of find_package.  Please
> revise in a follow-up patch.

I have attached a patch to do this.


Thanks,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800
>From 50b40ca739ea9f7646ed2e9cef9a7023df000586 Mon Sep 17 00:00:00 2001
From: Roger Leigh <rle...@codelibre.net>
Date: Tue, 9 Sep 2014 18:48:28 +0000
Subject: [PATCH 2/2] FindIce: Respect Ice_FIND_QUIETLY when printing messages

---
 Modules/FindIce.cmake | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/Modules/FindIce.cmake b/Modules/FindIce.cmake
index 50bc60e..60a4107 100644
--- a/Modules/FindIce.cmake
+++ b/Modules/FindIce.cmake
@@ -240,7 +240,9 @@ function(_Ice_FIND)
     set(Ice_VERSION "${Ice_VERSION_SLICE2CPP_FULL}" PARENT_SCOPE)
   endif()
 
-  message(STATUS "Ice version: ${Ice_VERSION_SLICE2CPP_FULL}")
+  if(NOT Ice_FIND_QUIETLY)
+    message(STATUS "Ice version: ${Ice_VERSION_SLICE2CPP_FULL}")
+  endif()
 
   # Find include directory
   find_path(Ice_INCLUDE_DIR
@@ -305,17 +307,19 @@ function(_Ice_FIND)
   set(_Ice_REQUIRED_LIBS_FOUND "${Ice_REQUIRED_LIBS_FOUND}" PARENT_SCOPE)
   set(Ice_LIBRARY "${Ice_LIBRARY}" PARENT_SCOPE)
 
-  if(Ice_LIBS_FOUND)
-    message(STATUS "Found the following Ice libraries:")
-    foreach(found ${Ice_LIBS_FOUND})
-      message(STATUS "  ${found}")
-    endforeach()
-  endif()
-  if(Ice_LIBS_NOTFOUND)
-    message(STATUS "The following Ice libraries were not found:")
-    foreach(notfound ${Ice_LIBS_NOTFOUND})
-      message(STATUS "  ${notfound}")
-    endforeach()
+  if(NOT Ice_FIND_QUIETLY)
+    if(Ice_LIBS_FOUND)
+      message(STATUS "Found the following Ice libraries:")
+      foreach(found ${Ice_LIBS_FOUND})
+        message(STATUS "  ${found}")
+      endforeach()
+    endif()
+    if(Ice_LIBS_NOTFOUND)
+      message(STATUS "The following Ice libraries were not found:")
+      foreach(notfound ${Ice_LIBS_NOTFOUND})
+        message(STATUS "  ${notfound}")
+      endforeach()
+    endif()
   endif()
 
   if(Ice_DEBUG)
-- 
1.9.4.msysgit.0

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to