mirror of
https://github.com/neovim/neovim
synced 2025-07-16 09:11:51 +00:00
use CMake's built in pthread detection
CMake ships with a standard FindThreads module which can be used to a) test for a threading library and b) confirm that it is pthread. It also allows the hard-coding of the threading library name to be removed from ``src/CMakeLists.txt``. Make it an error not to have a pthread library installed and indicate to CMake that we strongly prefer pthread to any other platform threading library.
This commit is contained in:
@ -14,7 +14,7 @@ file( GLOB IO_SOURCES io/*.c )
|
||||
|
||||
add_executable (vim ${NEOVIM_SOURCES} ${IO_SOURCES})
|
||||
|
||||
target_link_libraries (vim m uv pthread)
|
||||
target_link_libraries (vim m uv ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
include(CheckLibraryExists)
|
||||
check_library_exists(termcap tgetent "" HAVE_LIBTERMCAP)
|
||||
|
Reference in New Issue
Block a user