From 8a6da61b9e57d9591c0cde737395de461d866b78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEenan=20Zuki=C4=87?= Date: Tue, 2 Apr 2024 11:19:36 -0400 Subject: [PATCH] Prefer CheckSymbolExists over CheckFunctionExists This is a legacy cmake function anyway. It appears that recent Visual Studio compiler fails the test now. Should fix https://github.com/InsightSoftwareConsortium/ITK/issues/4552 --- Source/Common/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Common/CMakeLists.txt b/Source/Common/CMakeLists.txt index d635692e6..c937ea5a4 100644 --- a/Source/Common/CMakeLists.txt +++ b/Source/Common/CMakeLists.txt @@ -49,7 +49,7 @@ unset(CMAKE_REQUIRED_INCLUDES) unset(CMAKE_REQUIRED_LIBRARIES) #include(CheckSymbolExists) -CHECK_FUNCTION_EXISTS(gettimeofday GDCM_HAVE_GETTIMEOFDAY) +CHECK_SYMBOL_EXISTS(gettimeofday "sys/time.h" GDCM_HAVE_GETTIMEOFDAY) # json-c API changed: if(GDCM_USE_SYSTEM_JSON) set(CMAKE_REQUIRED_INCLUDES ${JSON_INCLUDE_DIRS})