Skip to content

Commit 715d2ce

Browse files
committed
Enables automatic test discovery with GoogleTest
Uses `gtest_discover_tests` to automatically find and run tests, simplifying test maintenance and improving discoverability.
1 parent 4ef3708 commit 715d2ce

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ find_package(CURL REQUIRED)
2929
add_executable(httplib-test test.cc include_httplib.cc $<$<BOOL:${WIN32}>:include_windows_h.cc>)
3030
target_compile_options(httplib-test PRIVATE "$<$<CXX_COMPILER_ID:MSVC>:/utf-8;/bigobj>")
3131
target_link_libraries(httplib-test PRIVATE httplib GTest::gtest_main CURL::libcurl)
32+
include(GoogleTest)
3233
gtest_discover_tests(httplib-test)
3334

3435
file(

0 commit comments

Comments
 (0)