mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-31 06:35:03 +01:00
Poco.Foundation now links with pthreads on Unix platforms
Some of the libraries relies on functions from Poco.Foundation that are implemented using pthreads and were leading to link errors.
This commit is contained in:
parent
6e5111d2ba
commit
b245307780
@ -111,14 +111,14 @@ endif(ANDROID)
|
||||
# TODO: Why is this here?
|
||||
add_definitions( -DPCRE_STATIC)
|
||||
|
||||
# For SetAffinity
|
||||
# For POSIX threads on Unix
|
||||
if(UNIX AND NOT APPLE)
|
||||
# We still need pthreads on Unix
|
||||
set(SYSLIBS ${SYSLIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||
INCLUDE (CheckFunctionExists)
|
||||
INCLUDE (CheckCXXSourceCompiles)
|
||||
INCLUDE (CheckLibraryExists)
|
||||
CHECK_LIBRARY_EXISTS(pthread pthread_setaffinity_np "pthread.h" HAVE_PTHREAD_SETAFFINITY_NP)
|
||||
#set(CMAKE_EXTRA_INCLUDE_FILES pthread.h)
|
||||
#CHECK_FUNCTION_EXISTS(pthread_setaffinity_np HAVE_PTHREAD_SETAFFINITY_NP)
|
||||
if(NOT HAVE_PTHREAD_SETAFFINITY_NP)
|
||||
message(STATUS "Platform has not PTHREAD_SETAFFINITY_NP")
|
||||
else(HAVE_PTHREAD_SETAFFINITY_NP)
|
||||
|
@ -10,7 +10,7 @@ set_target_properties( "${POCO_EXENAME}"
|
||||
OUTPUT_NAME cpspc
|
||||
)
|
||||
|
||||
target_link_libraries( "${POCO_EXENAME}" ${CMAKE_THREAD_LIBS_INIT} Net Util XML JSON Foundation)
|
||||
target_link_libraries( "${POCO_EXENAME}" Net Util XML JSON Foundation)
|
||||
|
||||
install(
|
||||
TARGETS "${POCO_EXENAME}" EXPORT "${POCO_EXENAME}Targets"
|
||||
|
@ -10,7 +10,7 @@ set_target_properties( "${POCO_EXENAME}"
|
||||
OUTPUT_NAME f2cpsp
|
||||
)
|
||||
|
||||
target_link_libraries( "${POCO_EXENAME}" ${CMAKE_THREAD_LIBS_INIT} Net Util XML JSON Foundation)
|
||||
target_link_libraries( "${POCO_EXENAME}" Net Util XML JSON Foundation)
|
||||
|
||||
install(
|
||||
TARGETS "${POCO_EXENAME}" EXPORT "${POCO_EXENAME}Targets"
|
||||
|
Loading…
x
Reference in New Issue
Block a user