zeromq / cppzmq

Header-only C++ binding for libzmq
http://www.zeromq.org
MIT License
1.93k stars 757 forks source link

ENABLE_DRAFTS being overridden by the presence of a .git directory #580

Closed rikercd closed 1 year ago

rikercd commented 1 year ago
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
    OPTION (ENABLE_DRAFTS "Build and install draft classes and methods" ON)
else ()
    OPTION (ENABLE_DRAFTS "Build and install draft classes and methods" OFF)
endif ()

This block of CMake is problematic for those who want to use industry standard package management schemes like conan. Conan-center added the ability to enable drafts in the cppzmq package in this PR, however the above block of CMake breaks that functionality, making it impossible to get a draft build of cppzmq (and by extension libzmq) without building and installing manually from source, which is problematic in a number of ways in the modern software development landscape.

One potential solution is for this block to be changed such that ENABLE_DRAFTS is only configured in this way if it is not already turned on, or for this to simply be removed all together.

rikercd commented 1 year ago

Addressing this issue in cppzmq won't really do anything unless it is also addressed in libzmq. I opened an issue there as well.