mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 07:31:03 +08:00
Checks for pthread setname and setaffinity API are compilation checks, not execution checks.
This commit is contained in:
parent
797c7f09f8
commit
e0296d9cdd
@ -730,7 +730,12 @@ if(NOT ANDROID)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
if(NOT CMAKE_CROSSCOMPILING AND NOT MSVC)
|
if (NOT MSVC)
|
||||||
|
# Compilation checks
|
||||||
|
zmq_check_pthread_setname()
|
||||||
|
zmq_check_pthread_setaffinity()
|
||||||
|
# Execution checks
|
||||||
|
if(NOT CMAKE_CROSSCOMPILING)
|
||||||
zmq_check_sock_cloexec()
|
zmq_check_sock_cloexec()
|
||||||
zmq_check_o_cloexec()
|
zmq_check_o_cloexec()
|
||||||
zmq_check_so_bindtodevice()
|
zmq_check_so_bindtodevice()
|
||||||
@ -741,10 +746,9 @@ if(NOT CMAKE_CROSSCOMPILING AND NOT MSVC)
|
|||||||
zmq_check_tcp_keepintvl()
|
zmq_check_tcp_keepintvl()
|
||||||
zmq_check_tcp_keepalive()
|
zmq_check_tcp_keepalive()
|
||||||
zmq_check_tcp_tipc()
|
zmq_check_tcp_tipc()
|
||||||
zmq_check_pthread_setname()
|
|
||||||
zmq_check_pthread_setaffinity()
|
|
||||||
zmq_check_getrandom()
|
zmq_check_getrandom()
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux"
|
if(CMAKE_SYSTEM_NAME MATCHES "Linux"
|
||||||
OR CMAKE_SYSTEM_NAME MATCHES "GNU/kFreeBSD"
|
OR CMAKE_SYSTEM_NAME MATCHES "GNU/kFreeBSD"
|
||||||
|
@ -212,7 +212,7 @@ macro(zmq_check_pthread_setname)
|
|||||||
message(STATUS "Checking pthread_setname signature")
|
message(STATUS "Checking pthread_setname signature")
|
||||||
set(SAVE_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
set(SAVE_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||||
set(CMAKE_REQUIRED_FLAGS "-D_GNU_SOURCE -Werror -pthread")
|
set(CMAKE_REQUIRED_FLAGS "-D_GNU_SOURCE -Werror -pthread")
|
||||||
check_c_source_runs(
|
check_c_source_compiles(
|
||||||
"
|
"
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
@ -223,7 +223,7 @@ int main(int argc, char *argv [])
|
|||||||
}
|
}
|
||||||
"
|
"
|
||||||
ZMQ_HAVE_PTHREAD_SETNAME_1)
|
ZMQ_HAVE_PTHREAD_SETNAME_1)
|
||||||
check_c_source_runs(
|
check_c_source_compiles(
|
||||||
"
|
"
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
@ -234,7 +234,7 @@ int main(int argc, char *argv [])
|
|||||||
}
|
}
|
||||||
"
|
"
|
||||||
ZMQ_HAVE_PTHREAD_SETNAME_2)
|
ZMQ_HAVE_PTHREAD_SETNAME_2)
|
||||||
check_c_source_runs(
|
check_c_source_compiles(
|
||||||
"
|
"
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
@ -245,7 +245,7 @@ int main(int argc, char *argv [])
|
|||||||
}
|
}
|
||||||
"
|
"
|
||||||
ZMQ_HAVE_PTHREAD_SETNAME_3)
|
ZMQ_HAVE_PTHREAD_SETNAME_3)
|
||||||
check_c_source_runs(
|
check_c_source_compiles(
|
||||||
"
|
"
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ macro(zmq_check_pthread_setaffinity)
|
|||||||
message(STATUS "Checking pthread_setaffinity signature")
|
message(STATUS "Checking pthread_setaffinity signature")
|
||||||
set(SAVE_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
set(SAVE_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||||
set(CMAKE_REQUIRED_FLAGS "-D_GNU_SOURCE -Werror -pthread")
|
set(CMAKE_REQUIRED_FLAGS "-D_GNU_SOURCE -Werror -pthread")
|
||||||
check_c_source_runs(
|
check_c_source_compiles(
|
||||||
"
|
"
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user