mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-11-26 20:48:24 +00:00
Leave include_httplib.cc out of the compiled CMake test build
include_httplib.cc now instantiates detail::process_server_socket(), which the split header does not declare, so the compiled CMake build failed to compile it. The file only means something for the header-only build anyway, and the Makefile's split targets already leave it out.
This commit is contained in:
1 parent
bba6042bba
commit
f181182a9d
1 file changed
+5
-1
+5
-1
@@ -26,7 +26,11 @@ endif()
|
|||||||
|
|
||||||
find_package(CURL REQUIRED)
|
find_package(CURL REQUIRED)
|
||||||
|
|
||||||
add_executable(httplib-test test.cc include_httplib.cc $<$<BOOL:${WIN32}>: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
|
||||||
|
$<$<NOT:$<BOOL:${HTTPLIB_IS_COMPILED}>>:include_httplib.cc>
|
||||||
|
$<$<BOOL:${WIN32}>:include_windows_h.cc>)
|
||||||
target_compile_options(httplib-test PRIVATE "$<$<CXX_COMPILER_ID:MSVC>:/utf-8;/bigobj>")
|
target_compile_options(httplib-test PRIVATE "$<$<CXX_COMPILER_ID:MSVC>:/utf-8;/bigobj>")
|
||||||
target_link_libraries(httplib-test PRIVATE httplib GTest::gtest_main CURL::libcurl)
|
target_link_libraries(httplib-test PRIVATE httplib GTest::gtest_main CURL::libcurl)
|
||||||
gtest_discover_tests(httplib-test)
|
gtest_discover_tests(httplib-test)
|
||||||
|
|||||||
Reference in new issue
Block a user