aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-10-13 18:11:09 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-10-13 18:12:09 +0000
commit938476c9a59e04c245fac7707c6baf2183964e60 (patch)
tree8eb117068c7a9708b4a63d53c807875be8da94b5 /CMakeLists.txt
parentMerge pull request #4543 (diff)
downloadmonero-938476c9a59e04c245fac7707c6baf2183964e60.tar.xz
CMakeLists.txt: detect and use -pthread compiler flag
The cmake thread detection just ain't enough to always work
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1bffd29b6..d96dd649e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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