blob: eecbc1468287234ede7031422cf2270780606256 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 21e9a4bb214648ffd43c66b535fbf096bfcc9f4f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 24 Jun 2018 00:04:37 -0700
4Subject: [PATCH] Unittest: Link librt and libm using -l option
5
6cmake'ry forces full path to .so files when found using
7find_package and since we have proper sysrooted toolchain
8-lm and -lrt is all we need
9
10Upstream-Status: Inappropriate [Cross compile specific]
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 unittest/CMakeLists.txt | 10 ++--------
15 1 file changed, 2 insertions(+), 8 deletions(-)
16
17diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt
18index c4cdf229..e1b63caf 100644
19--- a/unittest/CMakeLists.txt
20+++ b/unittest/CMakeLists.txt
21@@ -57,14 +57,8 @@ elseif (WIN32)
22 else()
23 set(CHECK_LIBRARIES "${CHECK_INSTALL_DIR}/lib/libcheck.a")
24 endif()
25-find_package(LibM)
26-if (LIBM_FOUND)
27- set(CHECK_LIBRARIES "${CHECK_LIBRARIES};LIBM::LIBM")
28-endif()
29-find_package(LibRt)
30-if (LIBRT_FOUND)
31- set(CHECK_LIBRARIES "${CHECK_LIBRARIES};LIBRT::LIBRT")
32-endif()
33+set(CHECK_LIBRARIES "${CHECK_LIBRARIES};-lm")
34+set(CHECK_LIBRARIES "${CHECK_LIBRARIES};-lrt")
35
36 # Build the C unit tests
37 add_library(shared-c-unit-tests STATIC shared.c)
38--
392.18.0
40