diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b2d6636e..d6ca7f64 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -26,7 +26,11 @@ endif() find_package(CURL REQUIRED) -add_executable(httplib-test test.cc include_httplib.cc $<$:include_windows_h.cc>) +# include_httplib.cc checks the header-only build, as the Makefile's split +# targets leave it out too. +add_executable(httplib-test test.cc + $<$>:include_httplib.cc> + $<$:include_windows_h.cc>) target_compile_options(httplib-test PRIVATE "$<$:/utf-8;/bigobj>") target_link_libraries(httplib-test PRIVATE httplib GTest::gtest_main CURL::libcurl) gtest_discover_tests(httplib-test)