We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4a49d0 commit 33e4c13Copy full SHA for 33e4c13
CMakeLists.txt
@@ -97,6 +97,19 @@ install(FILES "${PKG_CONFIG_FILE_NAME}"
97
COMPONENT "sdk"
98
)
99
100
+option(WITH_TESTS ON "Build tests")
101
+
102
+if(WITH_TESTS)
103
+ find_package(Catch2)
104
+ include(Catch)
105
106
+ add_executable(tests "${CMAKE_CURRENT_SOURCE_DIR}/test.cpp")
107
+ target_link_libraries(tests PRIVATE ${PROJECT_NAME} Catch2::Catch2)
108
109
+ catch_discover_tests(tests)
110
+ enable_testing()
111
+endif()
112
113
114
include(CPack)
115
test.cpp
@@ -7,7 +7,7 @@
7
*
8
*/
9
#include "anyoption.h"
10
-#include "catch.hpp"
+#include <catch2/catch.hpp>
11
12
#include <fstream>
13
#include <stdarg.h>
0 commit comments