summaryrefslogtreecommitdiff
blob: 7493132674399b1d2344d49122bb8d0a826d7513 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 4ecb79d8980fcf7cd0ff25c8c21bf473156fdb19 Mon Sep 17 00:00:00 2001
From: David Seifert <soap@gentoo.org>
Date: Tue, 15 Feb 2022 11:24:54 +0100
Subject: [PATCH] Build uhd_test library as static when
 `-DBUILD_SHARED_LIBS=ON`

* A uhd_test.so lacks the necessary symbols for testing
  due to default visibility set to hidden.
---
 tests/common/CMakeLists.txt | 3 +-
 1 file changed, 1 insertion(+), 2 deletion(-)

diff --git a/tests/common/CMakeLists.txt b/tests/common/CMakeLists.txt
index ac0e1b4492..36c9f9b076 100644
--- a/tests/common/CMakeLists.txt
+++ b/tests/common/CMakeLists.txt
@@ -8,7 +8,8 @@
 # Build uhd_test static lib
 ########################################################################
 include_directories("${CMAKE_SOURCE_DIR}/lib/include")
-add_library(uhd_test ${CMAKE_CURRENT_SOURCE_DIR}/mock_ctrl_iface_impl.cpp
+add_library(uhd_test STATIC
+                     ${CMAKE_CURRENT_SOURCE_DIR}/mock_ctrl_iface_impl.cpp
                      ${CMAKE_CURRENT_SOURCE_DIR}/mock_zero_copy.cpp
                      ${CMAKE_SOURCE_DIR}/lib/rfnoc/graph_impl.cpp
                      ${CMAKE_SOURCE_DIR}/lib/rfnoc/async_msg_handler.cpp