mirror of
https://github.com/monero-project/monero.git
synced 2024-12-23 12:09:54 +00:00
Use g++ flag "-pthread" instead of "-lpthread", where preferred
CMake supports this through THREADS_PREFER_PTHREAD_FLAG. Remove inclusion of pthread library in EXTRA_LIBRARIES, as the individual CMakeLists.txt files which need pthread already require it with CMAKE_THREAD_LIBS_INIT.
This commit is contained in:
parent
c9e5fece32
commit
bbb936df0f
1 changed files with 2 additions and 1 deletions
|
@ -230,6 +230,7 @@ add_definitions("-DBLOCKCHAIN_DB=${BLOCKCHAIN_DB}")
|
||||||
|
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE)
|
||||||
# Note that at the time of this writing the -Wstrict-prototypes flag added below will make this fail
|
# Note that at the time of this writing the -Wstrict-prototypes flag added below will make this fail
|
||||||
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
find_package(Threads)
|
find_package(Threads)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -410,7 +411,7 @@ elseif(APPLE OR FREEBSD)
|
||||||
set(EXTRA_LIBRARIES "")
|
set(EXTRA_LIBRARIES "")
|
||||||
elseif(NOT MSVC)
|
elseif(NOT MSVC)
|
||||||
find_library(RT rt)
|
find_library(RT rt)
|
||||||
set(EXTRA_LIBRARIES ${RT} ${PTHREAD} ${DL})
|
set(EXTRA_LIBRARIES ${RT} ${DL})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(version.cmake)
|
include(version.cmake)
|
||||||
|
|
Loading…
Reference in a new issue