From e00d31c7d2bdad32512a6e8b6ff1ae9e81276537 Mon Sep 17 00:00:00 2001 From: Justin Davis Date: Sat, 3 Jan 2026 08:02:02 -0500 Subject: [PATCH] always use an interface lib --- CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bf48e6aecc..572144a670e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -572,11 +572,7 @@ if(FLATBUFFERS_BUILD_TESTS) # Add a library so there is a single target that the generated samples can # link too. - if(MSVC OR ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.20.0") - add_library(flatsample INTERFACE) - else() - add_library(flatsample STATIC) - endif() + add_library(flatsample INTERFACE) # Since flatsample has no sources, we have to explicitly set the linker lang. set_target_properties(flatsample PROPERTIES LINKER_LANGUAGE CXX)