File tree Expand file tree Collapse file tree 3 files changed +25
-9
lines changed Expand file tree Collapse file tree 3 files changed +25
-9
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,15 @@ if(POLICY CMP0042)
4
4
cmake_policy (SET CMP0042 NEW ) # use MACOSX_RPATH
5
5
endif ()
6
6
if (UNIX )
7
- project (cpprest C CXX )
7
+ project (cpprestsdk C CXX )
8
8
else ()
9
- project (cpprest CXX )
9
+ project (cpprestsdk CXX )
10
10
endif ()
11
11
12
+ set (CPPREST_VERSION_MAJOR 2 )
13
+ set (CPPREST_VERSION_MINOR 10 )
14
+ set (CPPREST_VERSION_REVISION 1 )
15
+
12
16
enable_testing ()
13
17
14
18
set (WERROR ON CACHE BOOL "Treat Warnings as Errors." )
@@ -32,6 +36,22 @@ else()
32
36
set (BUILD_SAMPLES ON CACHE BOOL "Build sample applications." )
33
37
endif ()
34
38
39
+ if (WIN32 )
40
+ set (CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Default filename postfix for libraries under configuration DEBUG" )
41
+ else ()
42
+ set (CMAKE_DEBUG_POSTFIX "" CACHE STRING "Default filename postfix for libraries under configuration DEBUG" )
43
+ endif ()
44
+
45
+ if (WIN32 )
46
+ set (TOOLSET )
47
+ if (CMAKE_VS_PLATFORM_TOOLSET )
48
+ string (REGEX REPLACE "^v" "" TOOLSET "${CMAKE_VS_PLATFORM_TOOLSET} " )
49
+ endif ()
50
+ set (CPPREST_ABI_TAG "${TOOLSET} _${CPPREST_VERSION_MAJOR} _${CPPREST_VERSION_MINOR} " CACHE STRING "Postfix tag for the cpprest abi" )
51
+ else ()
52
+ set (CPPREST_ABI_TAG "" CACHE STRING "Postfix tag for the cpprest abi" )
53
+ endif ()
54
+
35
55
if (ANDROID )
36
56
set (Boost_USE_STATIC_LIBS ON CACHE BOOL "Link against boost statically." )
37
57
else ()
Original file line number Diff line number Diff line change @@ -67,9 +67,10 @@ class threadpool
67
67
boost::asio::io_service& service () { return m_service; }
68
68
69
69
protected:
70
- threadpool (size_t num_threads) : m_service(num_threads) {}
70
+ threadpool (size_t num_threads) : m_service(static_cast < int >( num_threads) ) {}
71
71
72
72
boost::asio::io_service m_service;
73
73
};
74
74
75
75
}
76
+
Original file line number Diff line number Diff line change 1
1
cmake_policy (SET CMP0022 NEW )
2
2
3
- set (CPPREST_VERSION_MAJOR 2 )
4
- set (CPPREST_VERSION_MINOR 10 )
5
- set (CPPREST_VERSION_REVISION 1 )
6
-
7
3
file (GLOB HEADERS_CPPREST "../include/cpprest/*.h" "../include/cpprest/*.hpp" "../include/cpprest/*.dat" )
8
4
file (GLOB HEADERS_PPLX "../include/pplx/*.h" "../include/pplx/*.hpp" )
9
5
file (GLOB HEADERS_DETAILS "../include/cpprest/details/*.h" "../include/cpprest/details/*.hpp" "../include/cpprest/details/*.dat" "../include/pplx/*.hpp" "../include/pplx/*.dat" )
@@ -214,9 +210,8 @@ elseif(WINDOWS_STORE)
214
210
endif ()
215
211
endif ()
216
212
213
+ set_target_properties (cpprest PROPERTIES OUTPUT_NAME "cpprest${CPPREST_ABI_TAG} " )
217
214
if (WIN32 )
218
- set_target_properties (cpprest PROPERTIES
219
- OUTPUT_NAME "cpprest_${CPPREST_VERSION_MAJOR} _${CPPREST_VERSION_MINOR} " )
220
215
elseif (ANDROID )
221
216
# Do not use SOVERSION on android. It is completely unsupported (and causes problems).
222
217
# Perhaps revisit in the future? (NDK r9d, 8/7/14)
You can’t perform that action at this time.
0 commit comments