Commit 0dce2233 authored by Simon Giesecke's avatar Simon Giesecke

Problem: no check if noexcept is supported by compiler

Solution: add compile check
parent 93194e7c
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment