File tree Expand file tree Collapse file tree 9 files changed +23
-34
lines changed Expand file tree Collapse file tree 9 files changed +23
-34
lines changed Original file line number Diff line number Diff line change 20
20
gandziej
21
21
adish
22
22
LeonidCSIT
23
+ LocutusOfBorg
23
24
24
25
AutoDesk Inc.
25
26
Cyrille Fauvel (cyrillef)
Original file line number Diff line number Diff line change @@ -165,7 +165,20 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries)
165
165
166
166
# These settings can be used by the test targets
167
167
set (Casablanca_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /include )
168
- set (Casablanca_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} /include ${Boost_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} /libs/websocketpp )
168
+
169
+ find_path (WEBSOCKETPP_CONFIG websocketpp-config.cmake
170
+ HINTS /usr/lib/cmake/websocketpp )
171
+ find_path (WEBSOCKETPP_CONFIG_VERSION websocketpp-configVersion.cmake
172
+ HINTS /usr/lib/cmake/websocketpp )
173
+ if (WEBSOCKETPP_CONFIG AND WEBSOCKETPP_CONFIG_VERSION )
174
+ include (${WEBSOCKETPP_CONFIG} /websocketpp-config.cmake )
175
+ include (${WEBSOCKETPP_CONFIG} /websocketpp-configVersion.cmake )
176
+ message ("-- Found websocketpp version " ${PACKAGE_VERSION} " on system" )
177
+ set (Casablanca_INCLUDE_DIRS ${Casablanca_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${WEBSOCKETPP_INCLUDE_DIR} )
178
+ else (WEBSOCKETPP_CONFIG AND WEBSOCKETPP_CONFIG_VERSION )
179
+ set (Casablanca_INCLUDE_DIRS ${Casablanca_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} /libs/websocketpp )
180
+ message ("-- websocketpp not found, using the embedded version" )
181
+ endif (WEBSOCKETPP_CONFIG AND WEBSOCKETPP_CONFIG_VERSION )
169
182
170
183
set (Casablanca_LIBRARY ${LIB} cpprest )
171
184
set (Casablanca_LIBRARIES ${Casablanca_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} )
Original file line number Diff line number Diff line change 30
30
#include < iostream>
31
31
#include < sstream>
32
32
#include " cpprest/details/cpprest_compat.h"
33
- #include " cpprest/details/basic_types.h"
34
33
35
34
#ifndef _WIN32
36
35
# define __STDC_LIMIT_MACROS
Original file line number Diff line number Diff line change 55
55
// No SAL on non Windows platforms
56
56
#include "cpprest/details/nosal.h"
57
57
58
- #if defined(__APPLE__ ) // Settings specific to Apple
59
- #define __cdecl
58
+ #if not defined __cdecl
59
+ #if defined cdecl
60
+ #define __cdecl __attribute__ ((cdecl))
60
61
#else
61
-
62
- // Settings specific to Linux and Android
63
-
64
- // Ignore cdecl on ANDROID ARM and 64bit
65
- #if defined(__ANDROID__ ) && defined(__arm__ ) || defined(__LP64__ )
66
62
#define __cdecl
67
- #else
68
- #define __cdecl __attribute__ ((cdecl))
69
63
#endif
70
64
71
65
#if defined(__ANDROID__ )
Original file line number Diff line number Diff line change 35
35
#endif
36
36
37
37
#include < string>
38
- #include < pplx/pplxinterface.h>
38
+ #include " pplx/pplxinterface.h"
39
39
40
40
#pragma pack(push,_CRT_PACKING)
41
41
// All header files are required to be protected from the macro new
Original file line number Diff line number Diff line change 46
46
#include < atomic>
47
47
#endif
48
48
49
- #if (defined(ANDROID) || defined(__ANDROID__))
50
- // This prevents users from requiring -Wno-attributes when using gcc-4.8 with the android NDK.
51
- #define _pplx_cdecl
52
- #else
53
49
#define _pplx_cdecl __cdecl
54
- #endif
55
50
56
51
namespace pplx
57
52
{
Original file line number Diff line number Diff line change 1
- include_directories (../include pch ${Boost_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} )
1
+ include_directories (pch ${OPENSSL_INCLUDE_DIR} )
2
2
3
3
set (SOURCES_COMMON
4
4
http/client/http_client_msg.cpp
Original file line number Diff line number Diff line change @@ -102,12 +102,7 @@ std::vector<unsigned char> _from_base64(const utility::string_t& input)
102
102
103
103
for (auto iter = input.begin (); iter != input.end (); ++iter,--size)
104
104
{
105
- const auto ch = *iter;
106
- if ( ch < 0 )
107
- {
108
- throw std::runtime_error (" invalid character found in base64 string" );
109
- }
110
- const size_t ch_sz = static_cast <size_t >(ch);
105
+ const size_t ch_sz = static_cast <size_t >(*iter);
111
106
if ( ch_sz >= _base64_dectbl.size () || _base64_dectbl[ch_sz] == 255 )
112
107
{
113
108
throw std::runtime_error (" invalid character found in base64 string" );
@@ -122,12 +117,7 @@ std::vector<unsigned char> _from_base64(const utility::string_t& input)
122
117
}
123
118
if ( size == 2 )
124
119
{
125
- const auto ch2 = *(iter+1 );
126
- if ( ch2 < 0 )
127
- {
128
- throw std::runtime_error (" invalid padding character found in base64 string" );
129
- }
130
- const size_t ch2_sz = static_cast <size_t >(ch2);
120
+ const size_t ch2_sz = static_cast <size_t >(*(iter+1 ));
131
121
if ( ch2_sz >= _base64_dectbl.size () || _base64_dectbl[ch2_sz] != 254 )
132
122
{
133
123
throw std::runtime_error (" invalid padding character found in base64 string" );
Original file line number Diff line number Diff line change 1
- include_directories (${Casablanca_INCLUDE_DIR}
2
- ../UnitTestpp
3
- ${Boost_INCLUDE_DIR}
4
- )
1
+ include_directories (${Casablanca_INCLUDE_DIRS} )
5
2
6
3
set (TR_SOURCES
7
4
test_runner.cpp
You can’t perform that action at this time.
0 commit comments