diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a8e7523e5..5938a5fc8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,3 +1,5 @@ +option(LINK_WITH_PTHREAD "Explicitly link mbed TLS library to pthread." OFF) + set(libs mbedtls ) @@ -10,6 +12,10 @@ if(ENABLE_ZLIB_SUPPORT) set(libs ${libs} ${ZLIB_LIBRARIES}) endif(ENABLE_ZLIB_SUPPORT) +if(LINK_WITH_PTHREAD) + set(libs ${libs} pthread) +endif(LINK_WITH_PTHREAD) + find_package(Perl) if(NOT PERL_FOUND) message(FATAL_ERROR "Cannot build test suites without Perl")