I am trying to add zmq as a third party library with FetchContent.
However, I am uninterested on the warnings meant for devs.
As I have taken the tag for a verified release, it should be working without any errors or warnings ideally.
I do not want to have -Wno-dev for my whole CMake project configuration- only for my 3rd party libraries.
I have not found a way to do it inside the CMakeLists.txt.
My code for FetchContent is:
FetchContent_Declare(
libzmq
GIT_REPOSITORY https://github.com/zeromq/libzmq.git
GIT_TAG v4.3.4
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(libzmq)
I also didn't find a version that have no warnings since v4.2.2
I have tested with BUILD_COMMAND or CONFIGURE_COMMAND but I found no solution through reading the documentation of CMake nor FetchContent
I think you might be out of luck. From the FetchContent docs:
Notice how configure and build options are not on that list (Ex.
CMAKE_ARGS,CONFIGURE_COMMAND).I looked through the list of CMake variables for one with "dev" and "warn" (usually when looking for directory-scoped overrides for these kinds of things, that's what you should do), and didn't find what you're looking for. There was
CMAKE_WARN_DEPRECATED, but that's not the same (it's for the-Wno-deprecated/-Wdeprecatedflags).