I am using cppzmq as dependency in my project via FetchContent, and I tried setting the CPPZMQ_BUILD_TESTS option to OFF in the following ways:
set(CPPZMQ_BUILD_TESTS OFF) # before and after FetchContent_MakeAvailable(cppzmq)
set_target_properties(cppzmq PROPERTIES CPPZMQ_BUILD_TESTS OFF)
All seems well, and the build succeeds. However when I try to run my project's tests using ctest, a seemingly bogus test suite is discovered by ctest and fails to run because it cannot be found.
The following tests FAILED:
1 - unit_tests_NOT_BUILT-b12d07c (Not Run)
It seems that despite my configuration, some cmake files related to the cppzmq tests are being created even though the suite itself isn't being built.
My current workaround (which I'm sure is sub-optimal) is to specify the following in my CMakeLists.txt:
Am I missing something in the cmake configuration that would avoid this problem? Or is it possible a small change to this project's CMakeLists.txt would remedy the issue?
I am using cppzmq as dependency in my project via FetchContent, and I tried setting the
CPPZMQ_BUILD_TESTS
option toOFF
in the following ways:All seems well, and the build succeeds. However when I try to run my project's tests using
ctest
, a seemingly bogus test suite is discovered byctest
and fails to run because it cannot be found.It seems that despite my configuration, some cmake files related to the cppzmq tests are being created even though the suite itself isn't being built.
My current workaround (which I'm sure is sub-optimal) is to specify the following in my
CMakeLists.txt
:Am I missing something in the cmake configuration that would avoid this problem? Or is it possible a small change to this project's
CMakeLists.txt
would remedy the issue?