Add an option to disable GZIP.
This commit is contained in:
+10
-8
@@ -10,24 +10,26 @@ set(UT_SRCS
|
||||
set(UT_TARGET_NAME webcc_unittest)
|
||||
|
||||
# Common libraries to link.
|
||||
set(TEST_LIBS webcc ${Boost_LIBRARIES} "${CMAKE_THREAD_LIBS_INIT}")
|
||||
set(UT_LIBS webcc ${Boost_LIBRARIES} "${CMAKE_THREAD_LIBS_INIT}")
|
||||
|
||||
if(WEBCC_ENABLE_SSL)
|
||||
set(TEST_LIBS ${TEST_LIBS} ${OPENSSL_LIBRARIES})
|
||||
set(UT_LIBS ${UT_LIBS} ${OPENSSL_LIBRARIES} crypt32)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(TEST_LIBS ${TEST_LIBS} zlibstatic crypt32)
|
||||
else()
|
||||
set(TEST_LIBS ${TEST_LIBS} ${ZLIB_LIBRARIES})
|
||||
if(WEBCC_ENABLE_GZIP)
|
||||
if(WIN32)
|
||||
set(UT_LIBS ${UT_LIBS} zlibstatic)
|
||||
else()
|
||||
set(UT_LIBS ${UT_LIBS} ${ZLIB_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
# Add `-ldl` for Linux to avoid "undefined reference to `dlopen'".
|
||||
set(TEST_LIBS ${TEST_LIBS} ${CMAKE_DL_LIBS})
|
||||
set(UT_LIBS ${UT_LIBS} ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
|
||||
add_executable(${UT_TARGET_NAME} ${UT_SRCS})
|
||||
target_link_libraries(${UT_TARGET_NAME} webcc gtest ${TEST_LIBS})
|
||||
target_link_libraries(${UT_TARGET_NAME} webcc gtest ${UT_LIBS})
|
||||
|
||||
add_test(${UT_TARGET_NAME} ${UT_TARGET_NAME})
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <iostream>
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
#if 0
|
||||
|
||||
// HTTP GET request parser test fixture.
|
||||
class GetRequestParserTest : public testing::Test {
|
||||
protected:
|
||||
@@ -145,7 +145,6 @@ TEST_F(PostRequestParserTest, ParseByteWise) {
|
||||
|
||||
CheckResult();
|
||||
}
|
||||
#endif
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user