mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 10:33:52 +01:00
Problem: no check if noexcept is supported by compiler
Solution: add compile check
This commit is contained in:
parent
93194e7c53
commit
0dce223341
@ -415,6 +415,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "SunOS" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
zmq_check_noexcept ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT CMAKE_CROSSCOMPILING AND NOT MSVC)
|
||||
|
@ -293,3 +293,21 @@ int main (int argc, char *argv [])
|
||||
"
|
||||
ZMQ_HAVE_GETRANDOM)
|
||||
endmacro()
|
||||
|
||||
macro(zmq_check_noexcept)
|
||||
message(STATUS "Checking whether noexcept is supported")
|
||||
check_cxx_source_compiles(
|
||||
"
|
||||
struct X
|
||||
{
|
||||
X(int i) noexcept {}
|
||||
};
|
||||
|
||||
int main(int argc, char *argv [])
|
||||
{
|
||||
X x(5);
|
||||
return 0;
|
||||
}
|
||||
"
|
||||
ZMQ_HAVE_NOEXCEPT)
|
||||
endmacro()
|
||||
|
@ -19,6 +19,8 @@
|
||||
#cmakedefine HAVE_MKDTEMP
|
||||
#cmakedefine ZMQ_HAVE_UIO
|
||||
|
||||
#cmakedefine ZMQ_HAVE_NOEXCEPT
|
||||
|
||||
#cmakedefine ZMQ_HAVE_EVENTFD
|
||||
#cmakedefine ZMQ_HAVE_EVENTFD_CLOEXEC
|
||||
#cmakedefine ZMQ_HAVE_IFADDRS
|
||||
|
Loading…
Reference in New Issue
Block a user