Refactor common PThreads CMake code

Move the flags and find of Threads to root CMakeLists.txt, rather
than duplicate these everywhere. Make explicit linking of library with
PThreads use the same mechanism.

Signed-off-by: Paul Elliott <[email protected]>
This commit is contained in:
Paul Elliott
2024-01-24 18:05:53 +00:00
parent ed3ba3cc8e
commit 7fd162ec26
15 changed files with 6 additions and 52 deletions
-4
View File
@@ -1,7 +1,3 @@
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads)
set(libs
${mbedcrypto_target}
)