fix(src/CMakeLists.txt): add -lpthread only if MULTI_THREAD is ON
This commit is contained in:
parent
7bae895c23
commit
c7f1e3737f
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ endif()
|
|||
|
||||
if(STATIC)
|
||||
message(STATUS "Creating a static executable")
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
if (MULTI_THREAD AND ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(LEAN_EXTRA_LINKER_FLAGS "${LEAN_EXTRA_LINKER_FLAGS} -Wl,--whole-archive -lpthread -Wl,--no-whole-archive")
|
||||
endif()
|
||||
set(LEAN_EXTRA_LINKER_FLAGS "${LEAN_EXTRA_LINKER_FLAGS} -static")
|
||||
|
|
Loading…
Reference in a new issue