cmake: enable ASM and fix thread with usersettings

* Assembly files were not being compiled.
* With When `-DWOLFSSL_USER_SETTINGS` `HAVE_PTHREAD` was not
  propagating to `config.h`
This commit is contained in:
elms
2022-01-19 13:29:09 -08:00
parent 4c05d35452
commit c6fdb34daa

View File

@ -28,7 +28,7 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
You must delete them, or cmake will refuse to work.") You must delete them, or cmake will refuse to work.")
endif() endif()
project(wolfssl VERSION 5.1.2 LANGUAGES C) project(wolfssl VERSION 5.1.2 LANGUAGES C ASM)
# shared library versioning # shared library versioning
# increment if interfaces have been added, removed or changed # increment if interfaces have been added, removed or changed
@ -221,6 +221,7 @@ add_option("WOLFSSL_SINGLE_THREADED" ${WOLFSSL_SINGLE_THREADED_HELP_STRING} "no"
if(NOT WOLFSSL_SINGLE_THREADED) if(NOT WOLFSSL_SINGLE_THREADED)
if(CMAKE_USE_PTHREADS_INIT) if(CMAKE_USE_PTHREADS_INIT)
list(APPEND WOLFSSL_LINK_LIBS Threads::Threads) list(APPEND WOLFSSL_LINK_LIBS Threads::Threads)
set(HAVE_PTHREAD 1)
list(APPEND WOLFSSL_DEFINITIONS list(APPEND WOLFSSL_DEFINITIONS
"-DHAVE_PTHREAD" "-DHAVE_PTHREAD"
"-D_POSIX_THREADS") "-D_POSIX_THREADS")