Enforce libzmq3-dev in CMake
Created by: williamfgc
I installed libzmq-dev (which by default is v1) on Ubuntu and CMake will take it as a valid dependency. Later on compilation fails (see below). Minimum should be libzmq3-dev.
/home/wfg/workspace/ADIOS2/source/adios2/toolkit/transport/wan/WANZmq.cpp: In constructor ‘adios2::transport::WANZmq::WANZmq(std::__cxx11::string, std::__cxx11::string, MPI_Comm, std::__cxx11::string, bool)’: /home/wfg/workspace/ADIOS2/source/adios2/toolkit/transport/wan/WANZmq.cpp:27:29: error: ‘zmq_ctx_new’ was not declared in this scope m_Context = zmq_ctx_new(); ^ /home/wfg/workspace/ADIOS2/source/adios2/toolkit/transport/wan/WANZmq.cpp: In destructor ‘virtual adios2::transport::WANZmq::~WANZmq()’: /home/wfg/workspace/ADIOS2/source/adios2/toolkit/transport/wan/WANZmq.cpp:47:34: error: ‘zmq_ctx_destroy’ was not declared in this scope zmq_ctx_destroy(m_Context); ^ /home/wfg/workspace/ADIOS2/source/adios2/toolkit/transport/wan/WANZmq.cpp: In member function ‘virtual void adios2::transport::WANZmq::Write(const char*, std::size_t, std::size_t)’: /home/wfg/workspace/ADIOS2/source/adios2/toolkit/transport/wan/WANZmq.cpp:195:58: error: cannot convert ‘const char*’ to ‘zmq_msg_t*’ for argument ‘2’ to ‘int zmq_send(void*, zmq_msg_t*, int)’ const int status = zmq_send(m_Socket, buffer, size, 0); ^ /home/wfg/workspace/ADIOS2/source/adios2/toolkit/transport/wan/WANZmq.cpp:196:34: error: cannot convert ‘char*’ to ‘zmq_msg_t*’ for argument ‘2’ to ‘int zmq_recv(void*, zmq_msg_t*, int)’ zmq_recv(m_Socket, ret, 10, 0); ^ /home/wfg/workspace/ADIOS2/source/adios2/toolkit/transport/wan/WANZmq.cpp: In member function ‘virtual void adios2::transport::WANZmq::Read(char*, std::size_t, std::size_t)’: /home/wfg/workspace/ADIOS2/source/adios2/toolkit/transport/wan/WANZmq.cpp:211:39: error: cannot convert ‘char*’ to ‘zmq_msg_t*’ for argument ‘2’ to ‘int zmq_recv(void*, zmq_msg_t*, int)’ zmq_recv(m_Socket, buffer, size, 0); ^ /home/wfg/workspace/ADIOS2/source/adios2/toolkit/transport/wan/WANZmq.cpp: In member function ‘virtual void adios2::transport::WANZmq::IWrite(const char*, std::size_t, adios2::Transport::Status&, std::size_t)’: /home/wfg/workspace/ADIOS2/source/adios2/toolkit/transport/wan/WANZmq.cpp:221:55: error: ‘ZMQ_DONTWAIT’ was not declared in this scope const int stat = zmq_send(m_Socket, buffer, size, ZMQ_DONTWAIT); ^ /home/wfg/workspace/ADIOS2/source/adios2/toolkit/transport/wan/WANZmq.cpp: In member function ‘virtual void adios2::transport::WANZmq::IRead(char*, std::size_t, adios2::Transport::Status&, std::size_t)’: /home/wfg/workspace/ADIOS2/source/adios2/toolkit/transport/wan/WANZmq.cpp:234:50: error: ‘ZMQ_DONTWAIT’ was not declared in this scope int bytes = zmq_recv(m_Socket, buffer, size, ZMQ_DONTWAIT); ^ /home/wfg/workspace/ADIOS2/source/adios2/toolkit/transport/wan/WANZmq.cpp:235:35: error: cannot convert ‘const char*’ to ‘zmq_msg_t*’ for argument ‘2’ to ‘int zmq_send(void*, zmq_msg_t*, int)’ zmq_send(m_Socket, "OK", 10, 0);