Explicitly link tests with pthreads
Required to use pthreads within tests.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 0869aaa..68bc57f 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,5 +1,8 @@
+find_package(Threads)
+
set(libs
${mbedtls_target}
+ ${CMAKE_THREAD_LIBS_INIT}
)
# Set the project root directory if it's not already defined, as may happen if
diff --git a/tests/Makefile b/tests/Makefile
index 2249a55..bcc3b93 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -57,6 +57,7 @@
DLEXT ?= so
EXEXT=
SHARED_SUFFIX=
+LOCAL_LDFLAGS += -lpthread
endif
ifdef WINDOWS