From 1bee95a3ff6fcb58befbd390a8bb1ca0574c0f23 Mon Sep 17 00:00:00 2001 From: FeignClaims Date: Sun, 5 May 2024 17:00:49 +0800 Subject: [PATCH] Distinguish library test config types based on sources --- src/Tests.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Tests.cmake b/src/Tests.cmake index f24a3a58..b19693f4 100644 --- a/src/Tests.cmake +++ b/src/Tests.cmake @@ -31,8 +31,13 @@ function(_configure_target target_name type) add_executable(${target_name}) set(scope PRIVATE) elseif(${type} STREQUAL "test_config") - add_library(${target_name} INTERFACE) - set(scope INTERFACE) + if(args_SOURCES) + add_library(${target_name} STATIC) + set(scope PUBLIC) + else() + add_library(${target_name} INTERFACE) + set(scope INTERFACE) + endif() endif() target_sources(${target_name}