diff options
author | Ronan Collobert <ronan@collobert.com> | 2015-04-14 21:54:51 +0300 |
---|---|---|
committer | Ronan Collobert <ronan@collobert.com> | 2015-04-14 21:54:51 +0300 |
commit | e7a987ad3e7c4c6161bb4952415ed65a4f575b1b (patch) | |
tree | f34ec4812dbc13fcdf65bbe16374a951023e98ca /luajit-2.1 | |
parent | cafad2e668764467d7846719ee964172c4e74b0b (diff) |
link with pthread (if found)threads
workaround long standing pthread problem:
https://sourceware.org/bugzilla/show_bug.cgi?id=18192
Diffstat (limited to 'luajit-2.1')
-rw-r--r-- | luajit-2.1/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/luajit-2.1/CMakeLists.txt b/luajit-2.1/CMakeLists.txt index 29ebc67..240017f 100644 --- a/luajit-2.1/CMakeLists.txt +++ b/luajit-2.1/CMakeLists.txt @@ -165,6 +165,12 @@ if ( LUA_USE_LIBM ) list ( APPEND LIBS m ) endif () +SET(CMAKE_THREAD_PREFER_PTHREAD TRUE) +FIND_PACKAGE(Threads) +IF(THREADS_FOUND) + LIST(APPEND LIBS ${CMAKE_THREAD_LIBS_INIT}) +ENDIF() + ## SOURCES INSTALL(FILES src/luaconf.h src/lua.h src/lauxlib.h src/lualib.h src/lua.hpp src/luajit.h |