zeromq / libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
https://www.zeromq.org
Mozilla Public License 2.0
9.45k stars 2.34k forks source link

halt build if CURVE requested but not found #4663

Closed minrk closed 4 months ago

minrk commented 4 months ago

Problem: It's frustrating to attempt to build libzmq with curve, only to find out after build has completed that it wasn't found and the request was ignored.

Solution: respect user input and fail if their choice cannot be satisfied instead of ignoring it.

now builds where requested configuration is not found fail rather than proceeding without requested features

changes:

Previously, to enable curve, you needed the redundant config:

-DENABLE_CURVE=ON -DWITH_LIBSODIUM=ON

Whereas the following would not attempt to enable CURVE:

-DENABLE_CURVE=ON

and the required configuration would also proceed to build without CURVE, ignoring user request with a message.

Since ENABLE_CURVE and WITH_LIBSODIUM really represent the same thing now (there is no CURVE without sodium), we could also deprecate one or default it to True. But this is the smallest change.