From 7451da07475b9889d9cd358c064986957fca8f8b Mon Sep 17 00:00:00 2001 From: Robert Adam Date: Sun, 14 Jun 2026 15:41:58 +0200 Subject: [PATCH] Use SYSTEM flag for bundled format if supported This prevents us ever seeing any warnings related to fmt's code when compiling SOCI. --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a18be5d..01f317fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,7 +149,10 @@ if(soci_use_bundled_fmt) endif() set(FMT_INSTALL ${SOCI_INSTALL}) - add_subdirectory(3rdparty/fmt) + if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.25) + set(SYSTEM_FLAG "SYSTEM") + endif() + add_subdirectory(3rdparty/fmt ${SYSTEM_FLAG}) endif() # Helper function appending prefix and suffix to the library name.