From c38762185c8fe66d1e2016e3ddcb3c062642d587 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Tue, 24 Mar 2026 12:22:20 -0700 Subject: [PATCH] StaConfig.hh pass HAVE_CXX_STD_FORMAT Signed-off-by: James Cherry --- include/sta/Format.hh | 5 +---- util/StaConfig.hh.cmake | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/sta/Format.hh b/include/sta/Format.hh index 1745f482..88555a1e 100644 --- a/include/sta/Format.hh +++ b/include/sta/Format.hh @@ -35,10 +35,7 @@ #include #endif -// std::format is not supported in GCC 11 (e.g. Ubuntu 22.04). -// Use fmt library as fallback when __cpp_lib_format is not defined. - -#if defined(__cpp_lib_format) && __cpp_lib_format >= 201907L +#if HAVE_CXX_STD_FORMAT #include namespace sta { diff --git a/util/StaConfig.hh.cmake b/util/StaConfig.hh.cmake index 2efd9720..daf90b36 100644 --- a/util/StaConfig.hh.cmake +++ b/util/StaConfig.hh.cmake @@ -6,4 +6,6 @@ #cmakedefine ZLIB_FOUND +#cmakedefine01 HAVE_CXX_STD_FORMAT + #define TCL_READLINE ${TCL_READLINE}