From b1054b4ef3269fa16724cd3a73adffa557721518 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 9 Mar 2024 18:25:40 +0000 Subject: [PATCH] msvc: don't declare `HAVE_TIMEZONE` for older MSVC (#3956) It was introduced in MSVC 15 (Visual Studio 2017). --- config/cmake/ConfigureChecks.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 37f306e1526..59755334d20 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -78,7 +78,9 @@ if (WINDOWS) endif () if (NOT UNIX AND NOT CYGWIN) set (${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO 1) - set (${HDF_PREFIX}_HAVE_TIMEZONE 1) + if (MSVC_VERSION GREATER_EQUAL 1900) + set (${HDF_PREFIX}_HAVE_TIMEZONE 1) + endif () set (${HDF_PREFIX}_HAVE_GETTIMEOFDAY 1) set (${HDF_PREFIX}_HAVE_LIBWS2_32 1) set (${HDF_PREFIX}_HAVE_LIBWSOCK32 1)