summaryrefslogtreecommitdiffstats
path: root/Modules/FindDCMTK.cmake
diff options
context:
space:
mode:
authorMatt McCormick <matt.mccormick@kitware.com>2016-01-11 21:46:12 (GMT)
committerMatt McCormick <matt.mccormick@kitware.com>2016-01-11 21:51:36 (GMT)
commitd50cbbb03d53da6b990402a482a56b3163807dcb (patch)
tree2e0da1764f534016b62bd442cb55bfc1e51264cd /Modules/FindDCMTK.cmake
parent31b4700ed640bee962f9db9ce25fa84261a944d2 (diff)
downloadCMake-d50cbbb03d53da6b990402a482a56b3163807dcb.zip
CMake-d50cbbb03d53da6b990402a482a56b3163807dcb.tar.gz
CMake-d50cbbb03d53da6b990402a482a56b3163807dcb.tar.bz2
FindDCMTK: Obey QUIET option for find_package.
Diffstat (limited to 'Modules/FindDCMTK.cmake')
-rw-r--r--Modules/FindDCMTK.cmake22
1 files changed, 17 insertions, 5 deletions
diff --git a/Modules/FindDCMTK.cmake b/Modules/FindDCMTK.cmake
index 5693972..89e9c4f 100644
--- a/Modules/FindDCMTK.cmake
+++ b/Modules/FindDCMTK.cmake
@@ -135,18 +135,27 @@ set(_SAVED_DCMTK_DIR ${DCMTK_DIR})
#
# Step1: Attempt to find a version of DCMTK providing a DCMTKConfig.cmake file.
#
-message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake")
+if(NOT DCMTK_FIND_QUIETLY)
+ message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake")
+endif()
find_package(DCMTK QUIET NO_MODULE)
if(DCMTK_FOUND
AND NOT "x" STREQUAL "x${DCMTK_LIBRARIES}"
AND NOT "x" STREQUAL "x${DCMTK_INCLUDE_DIRS}")
- message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake - ok")
+
+ if(NOT DCMTK_FIND_QUIETLY)
+ message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake - ok")
+ endif()
return()
else()
- message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake - failed")
+ if(NOT DCMTK_FIND_QUIETLY)
+ message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake - failed")
+ endif()
endif()
-message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake")
+if(NOT DCMTK_FIND_QUIETLY)
+ message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake")
+endif()
# Restore the value reset by the previous call to 'find_package(DCMTK QUIET NO_MODULE)'
set(DCMTK_DIR ${_SAVED_DCMTK_DIR} CACHE PATH ${_dcmtk_dir_description} FORCE)
@@ -340,6 +349,7 @@ if(DCMTK_FOUND AND UNIX AND NOT APPLE)
set(CMAKE_REQUIRED_DEFINITIONS )
set(CMAKE_REQUIRED_INCLUDES ${DCMTK_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${DCMTK_LIBRARIES})
+ set(CMAKE_REQUIRED_QUIET ${DCMTK_FIND_QUIETLY})
check_cxx_source_compiles("#include <dcmtk/config/osconfig.h>\n#include <dcmtk/ofstd/ofstream.h>\nint main(int,char*[]){return 0;}"
DCMTK_HAVE_CONFIG_H_OPTIONAL
)
@@ -348,4 +358,6 @@ if(DCMTK_FOUND AND UNIX AND NOT APPLE)
endif()
endif()
-message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake - ok")
+if(NOT DCMTK_FIND_QUIETLY)
+ message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake - ok")
+endif()