CMakeLists.txt: detect and use -pthread compiler flag

The cmake thread detection just ain't enough to always work
release-v0.5.1
moneromooo-monero 6 years ago committed by wowario
parent 32745e0696
commit 7553fdcbb3
No known key found for this signature in database
GPG Key ID: 24DCBE762DE9C111

@ -428,6 +428,8 @@ if (UNIX AND NOT APPLE)
# 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)
add_c_flag_if_supported(-pthread CMAKE_C_FLAGS)
add_cxx_flag_if_supported(-pthread CMAKE_CXX_FLAGS)
endif()
# Handle OpenSSL, used for sha256sum on binary updates and light wallet ssl http

Loading…
Cancel
Save