-
Notifications
You must be signed in to change notification settings - Fork 757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown CMake command "catch_discover_tests". #334
Comments
I am facing the same issue since couple days and with no real solution until now. Were you able to solve it ? |
Maybe something like
would help? |
The easy solution is to use -DCPPZMQ_BUILD_TESTS=OFF on cmake. Like that:
Worked fine for me. |
Same issue here. |
I fixed it by applying these changes: --- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -9,11 +9,14 @@
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
+find_package(Threads)
+find_package(Catch2 REQUIRED)
+
include(CTest)
+include(Catch)
include(cmake/catch.cmake)
include(${CATCH_MODULE_PATH}/Catch.cmake)
-find_package(Threads)
add_executable(
unit_tests
@@ -38,6 +41,7 @@
target_link_libraries(
unit_tests
PRIVATE cppzmq
+ PRIVATE Catch2::Catch2
PRIVATE ${CMAKE_THREAD_LIBS_INIT}
)
based upon https://github.com/catchorg/Catch2/blob/devel/docs/cmake-integration.md#usage |
@TBK Can you provide a PR with these changes? If that works on both the Unix/Travis and Windows/Appveyor CI, we can integrate that into master. |
-- Detected CPPZMQ Version - 4.3.1
-- cppzmq v4.3.1
CMake Error at tests/CMakeLists.txt:47 (catch_discover_tests):
Unknown CMake command "catch_discover_tests".
where I ran 'cmake ..', this error shows. The following issue says libzmq3-dev should make it. But what is libzmq3-dev? How can I install it?
#294
The text was updated successfully, but these errors were encountered: