From 61524047aa36976b5c209e65b95feef32c586b0b Mon Sep 17 00:00:00 2001 From: David Garske Date: Mon, 3 Jun 2024 15:28:16 -0700 Subject: [PATCH] Merge pull request #7611 from lealem47/gh7609 cmake: Define SINGLE_THREADED macro when option enabled --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e561d9f96..9dc74ddceb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -284,6 +284,8 @@ if(NOT WOLFSSL_SINGLE_THREADED) "-DHAVE_PTHREAD" "-D_POSIX_THREADS") endif() +else() + list(APPEND WOLFSSL_DEFINITIONS "-DSINGLE_THREADED") endif() # DTLS-SRTP @@ -2437,7 +2439,7 @@ if(WOLFSSL_EXAMPLES) PROPERTY RUNTIME_OUTPUT_DIRECTORY ${WOLFSSL_OUTPUT_BASE}/examples/echoserver) - if(NOT WIN32) + if(NOT WIN32 AND NOT WOLFSSL_SINGLE_THREADED) # Build TLS benchmark example add_executable(tls_bench ${CMAKE_CURRENT_SOURCE_DIR}/examples/benchmark/tls_bench.c)