Use SYSTEM flag for bundled format if supported

This prevents us ever seeing any warnings related to fmt's code  when
compiling SOCI.
This commit is contained in:
Robert Adam
2026-06-14 15:41:58 +02:00
parent 6e47345208
commit 7451da0747

View File

@@ -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.