From 49412ce0f78b851d6ebc96ef3b3eec46e7918f3a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 3 Jan 2022 18:01:33 -0500 Subject: [PATCH] implement workaround windows from https://github.com/fmtlib/fmt/issues/2691 this also reverts commit c5a7f4c3ac36e6593078d5e85860341336c0847d and thus results in consistent crt behavior on windows --- cmake/CMakeLists.txt | 2 +- src/fmt/chrono.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 60c7269b1fd..408528f6dd8 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -629,7 +629,7 @@ endif() # and after everything else that is compiled locally ###################################################################### if(CMAKE_SYSTEM_NAME STREQUAL "Windows") - target_link_libraries(lammps PRIVATE "wsock32;psapi;ucrt") + target_link_libraries(lammps PRIVATE "wsock32;psapi") endif() ###################################################### diff --git a/src/fmt/chrono.h b/src/fmt/chrono.h index 31fee070afd..908999ab5f5 100644 --- a/src/fmt/chrono.h +++ b/src/fmt/chrono.h @@ -1082,7 +1082,7 @@ template class tm_writer { } template ::value)> void format_utc_offset_impl(const T& tm) { -#if defined(_WIN32) +#if defined(_WIN32) && defined(_UCRT) # if FMT_USE_TZSET tzset_once(); # endif