summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-04-03 13:38:03 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-04-03 13:38:09 (GMT)
commita01caf81a69ba53d04abee97c7aa277d4762ac27 (patch)
treee1e75de95f9457b2bff57eb7596d0750e6cdd31d /Modules
parentcad7385ab6e76b344406214aa103bee505939156 (diff)
parent5c948aa50d31640b7409228a63bf4a393d4caeeb (diff)
downloadCMake-a01caf81a69ba53d04abee97c7aa277d4762ac27.zip
CMake-a01caf81a69ba53d04abee97c7aa277d4762ac27.tar.gz
CMake-a01caf81a69ba53d04abee97c7aa277d4762ac27.tar.bz2
Merge topic 'FindDCMTK-includes'
5c948aa50d FindDCMTK: use CheckIncludeFiles instead of open coding it Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1911
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindDCMTK.cmake10
1 files changed, 2 insertions, 8 deletions
diff --git a/Modules/FindDCMTK.cmake b/Modules/FindDCMTK.cmake
index f348d3a..cc07e26 100644
--- a/Modules/FindDCMTK.cmake
+++ b/Modules/FindDCMTK.cmake
@@ -309,20 +309,14 @@ find_package_handle_standard_args(DCMTK
# Workaround bug in packaging of DCMTK 3.6.0 on Debian.
# See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637687
if(DCMTK_FOUND AND UNIX AND NOT APPLE)
- include(CheckCXXSourceCompiles)
+ include(${CMAKE_CURRENT_LIST_DIR}/CheckIncludeFiles.cmake)
set(CMAKE_REQUIRED_FLAGS )
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
- )
+ check_include_files("dcmtk/config/osconfig.h;dcmtk/ofstd/ofstream.h" DCMTK_HAVE_CONFIG_H_OPTIONAL LANGUAGE CXX)
if(NOT DCMTK_HAVE_CONFIG_H_OPTIONAL)
set(DCMTK_DEFINITIONS "HAVE_CONFIG_H")
endif()
endif()
-
-if(NOT DCMTK_FIND_QUIETLY)
- message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake - ok")
-endif()