瀏覽代碼

COMP: Make FindDCMTK more verbose

It will display the following text:

-- Trying to find DCMTK expecting DCMTKConfig.cmake
-- Trying to find DCMTK expecting DCMTKConfig.cmake - failed
-- Trying to find DCMTK relying on FindDCMTK.cmake
-- Trying to find DCMTK relying on FindDCMTK.cmake - ok
Jean-Christophe Fillion-Robin 12 年之前
父節點
當前提交
2ac36d10ec
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      Utilities/CMake/FindDCMTK.cmake

+ 8 - 0
Utilities/CMake/FindDCMTK.cmake

@@ -38,13 +38,19 @@ set(_SAVED_DCMTK_DIR ${DCMTK_DIR})
 
 #
 # First, try to use NO_MODULE
+message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake")
 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")
   return()
+else()
+  message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake - failed")
 endif()
 
+message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake")
+
 # Restore the value reset by the previous call to 'find_package(DCMTK QUIET NO_MODULE)'
 set(DCMTK_DIR ${_SAVED_DCMTK_DIR} CACHE PATH "The directory containing a CMake configuration file for DCMTK." FORCE) 
 
@@ -223,3 +229,5 @@ find_package_handle_standard_args(DCMTK
   REQUIRED_VARS ${DCMTK_INCLUDE_DIR_NAMES} DCMTK_LIBRARIES
   FAIL_MESSAGE "Please set DCMTK_DIR and re-run configure")
 
+message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake - ok")
+