This repository has been archived by the owner on Mar 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enabling building and running tests on Linux
- Loading branch information
Showing
20 changed files
with
184 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
cmake_minimum_required (VERSION 2.8.11) | ||
project (signalrclient) | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC -L -lcpprest") | ||
|
||
set(CPPREST_INCLUDE_DIR "" CACHE FILEPATH "Path to casablanca include dir") | ||
|
||
include_directories ( | ||
include | ||
"${CPPREST_INCLUDE_DIR}") | ||
|
||
find_library(CPPREST_SO NAMES "cpprest" PATHS ${CPPREST_LIB_DIR} REQUIRED) | ||
|
||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) | ||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) | ||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) | ||
|
||
add_subdirectory(src/signalrclient) | ||
add_subdirectory(test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
|
||
set (SOURCES | ||
callback_manager.cpp | ||
connection.cpp | ||
connection_impl.cpp | ||
default_websocket_client.cpp | ||
http_sender.cpp | ||
hub_connection.cpp | ||
hub_connection_impl.cpp | ||
hub_proxy.cpp | ||
internal_hub_proxy.cpp | ||
logger.cpp | ||
request_sender.cpp | ||
stdafx.cpp | ||
trace_log_writer.cpp | ||
transport.cpp | ||
transport_factory.cpp | ||
url_builder.cpp | ||
web_request.cpp | ||
web_request_factory.cpp | ||
websocket_transport.cpp | ||
) | ||
|
||
add_library (signalrclient SHARED ${SOURCES}) | ||
|
||
target_link_libraries(signalrclient ${CPPREST_SO}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
#pragma once | ||
|
||
#if defined (__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 9)) | ||
|
||
#include <memory> | ||
|
||
namespace std | ||
{ | ||
template<typename T, typename... Args> | ||
std::unique_ptr<T> make_unique(Args&&... args) | ||
{ | ||
return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
|
||
#include "stdafx.h" | ||
#include "web_request_factory.h" | ||
#include "make_unique.h" | ||
|
||
namespace signalr | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
add_subdirectory (gtest-1.7.0) | ||
enable_testing() | ||
include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR}) | ||
|
||
add_subdirectory (signalrclienttests) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
|
||
set (SOURCES | ||
callback_manager_tests.cpp | ||
case_insensitive_comparison_utils_tests.cpp | ||
connection_impl_tests.cpp | ||
http_sender_tests.cpp | ||
hub_connection_impl_tests.cpp | ||
hub_exception_tests.cpp | ||
internal_hub_proxy_tests.cpp | ||
logger_tests.cpp | ||
memory_log_writer.cpp | ||
request_sender_tests.cpp | ||
signalrclienttests.cpp | ||
stdafx.cpp | ||
test_transport_factory.cpp | ||
test_utils.cpp | ||
test_web_request_factory.cpp | ||
test_websocket_client.cpp | ||
url_builder_tests.cpp | ||
web_request_stub.cpp | ||
web_request_tests.cpp | ||
websocket_transport_tests.cpp | ||
) | ||
|
||
include_directories( | ||
../../src/signalrclient) | ||
|
||
add_executable (signalrclienttests ${SOURCES}) | ||
target_link_libraries(signalrclienttests gtest gtest_main signalrclient ${CPPREST_SO}) | ||
add_test(signalrclienttests signalrclienttests) |
Oops, something went wrong.