unittest on appveyor
This commit is contained in:
		@@ -10,7 +10,9 @@ set (CMAKE_CXX_STANDARD 11)
 | 
			
		||||
set (CXX_STANDARD_REQUIRED ON)
 | 
			
		||||
set (CMAKE_CXX_EXTENSIONS OFF)
 | 
			
		||||
 | 
			
		||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wshorten-64-to-32")
 | 
			
		||||
if (NOT WIN32)
 | 
			
		||||
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
set( IXWEBSOCKET_SOURCES
 | 
			
		||||
    ixwebsocket/IXEventFd.cpp
 | 
			
		||||
@@ -23,6 +25,7 @@ set( IXWEBSOCKET_SOURCES
 | 
			
		||||
    ixwebsocket/IXWebSocketTransport.cpp
 | 
			
		||||
    ixwebsocket/IXWebSocketHandshake.cpp
 | 
			
		||||
    ixwebsocket/IXWebSocketPerMessageDeflate.cpp
 | 
			
		||||
    ixwebsocket/IXWebSocketPerMessageDeflateCodec.cpp
 | 
			
		||||
    ixwebsocket/IXWebSocketPerMessageDeflateOptions.cpp
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@@ -40,6 +43,7 @@ set( IXWEBSOCKET_HEADERS
 | 
			
		||||
    ixwebsocket/IXWebSocketSendInfo.h
 | 
			
		||||
    ixwebsocket/IXWebSocketErrorInfo.h
 | 
			
		||||
    ixwebsocket/IXWebSocketPerMessageDeflate.h
 | 
			
		||||
    ixwebsocket/IXWebSocketPerMessageDeflateCodec.h
 | 
			
		||||
    ixwebsocket/IXWebSocketPerMessageDeflateOptions.h
 | 
			
		||||
    ixwebsocket/IXWebSocketHttpHeaders.h
 | 
			
		||||
)
 | 
			
		||||
@@ -47,6 +51,8 @@ set( IXWEBSOCKET_HEADERS
 | 
			
		||||
# Platform specific code
 | 
			
		||||
if (APPLE)
 | 
			
		||||
    list( APPEND IXWEBSOCKET_SOURCES ixwebsocket/apple/IXSetThreadName_apple.cpp)
 | 
			
		||||
elseif (WIN32)
 | 
			
		||||
    list( APPEND IXWEBSOCKET_SOURCES ixwebsocket/windows/IXSetThreadName_windows.cpp)
 | 
			
		||||
else()
 | 
			
		||||
    list( APPEND IXWEBSOCKET_SOURCES ixwebsocket/linux/IXSetThreadName_linux.cpp)
 | 
			
		||||
endif()
 | 
			
		||||
@@ -72,7 +78,33 @@ add_library( ixwebsocket STATIC
 | 
			
		||||
    ${IXWEBSOCKET_HEADERS}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
target_link_libraries(ixwebsocket "z")
 | 
			
		||||
# gcc/Linux needs -pthread
 | 
			
		||||
find_package(Threads)
 | 
			
		||||
 | 
			
		||||
if(UNIX AND NOT APPLE)
 | 
			
		||||
  find_package(OpenSSL REQUIRED)
 | 
			
		||||
  add_definitions(${OPENSSL_DEFINITIONS})
 | 
			
		||||
  message(STATUS "OpenSSL: " ${OPENSSL_VERSION})
 | 
			
		||||
  include_directories(${OPENSSL_INCLUDE_DIR})
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if (WIN32)
 | 
			
		||||
  get_filename_component(libz_path
 | 
			
		||||
    ${PROJECT_SOURCE_DIR}/third_party/ZLIB-Windows/zlib-1.2.11_deploy_v140/release_dynamic/x64/lib/zlib.lib
 | 
			
		||||
    ABSOLUTE)
 | 
			
		||||
  add_library(libz STATIC IMPORTED)
 | 
			
		||||
  set_target_properties(libz PROPERTIES IMPORTED_LOCATION
 | 
			
		||||
    ${libz_path})
 | 
			
		||||
 | 
			
		||||
  include_directories(${PROJECT_SOURCE_DIR}/third_party/ZLIB-Windows/zlib-1.2.11_deploy_v140/include)
 | 
			
		||||
 | 
			
		||||
  target_link_libraries(ixwebsocket libz wsock32 ws2_32)
 | 
			
		||||
  add_definitions(-D_CRT_SECURE_NO_WARNINGS)
 | 
			
		||||
  
 | 
			
		||||
else()
 | 
			
		||||
  target_link_libraries(ixwebsocket 
 | 
			
		||||
    z ${OPENSSL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
set( IXWEBSOCKET_INCLUDE_DIRS
 | 
			
		||||
    .
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user