From 21a32fc57d66f6679a2ab3a0d302700de899753d Mon Sep 17 00:00:00 2001 From: Benjamin Buchfink Date: Fri, 10 Mar 2023 09:34:38 +0100 Subject: [PATCH] Fix msvc issues. --- CMakeLists.txt | 2 +- src/ChangeLog | 1 + src/util/log_stream.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6de25744..8a1b4563 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,7 +111,7 @@ endfunction(set_cxx_standard) check_cxx_compiler_flag("-std=gnu++14" HAS_GNUPP14) check_cxx_compiler_flag("-std=gnu++17" HAS_GNUPP17) -if(HAS_GNUPP17) +if(HAS_GNUPP17 OR ${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC) set_cxx_standard(17 "-std=gnu++17") elseif (HAS_GNUPP14) set_cxx_standard(14 "-std=gnu++14") diff --git a/src/ChangeLog b/src/ChangeLog index 15c34a9e..2093cf6f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -12,6 +12,7 @@ - Fixed a bug that caused the last codon of the -2 reading frame to be translated incorrectly. - Reduced the memory use of the clustering workflow. +- Updated the bundled NCBI toolkit to the latest version. [2.1.4] - Leading spaces are now trimmed and tabulator characters escaped as `\t` diff --git a/src/util/log_stream.h b/src/util/log_stream.h index 3dd59bd5..ce46954a 100644 --- a/src/util/log_stream.h +++ b/src/util/log_stream.h @@ -79,7 +79,7 @@ struct task_timer {} ~task_timer() { -#if __cplusplus >= 201703L +#if __cplusplus >= 201703L || defined(_MSC_VER) if (!std::uncaught_exceptions()) #else if (!std::uncaught_exception())