Skip to content

Commit 7a8b5e9

Browse files
committed
Adding websocket winrt tests for 120 toolset.
1 parent eae66c1 commit 7a8b5e9

File tree

4 files changed

+444
-4
lines changed

4 files changed

+444
-4
lines changed
Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|ARM">
5+
<Configuration>Debug</Configuration>
6+
<Platform>ARM</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Debug|Win32">
9+
<Configuration>Debug</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|ARM">
17+
<Configuration>Release</Configuration>
18+
<Platform>ARM</Platform>
19+
</ProjectConfiguration>
20+
<ProjectConfiguration Include="Release|Win32">
21+
<Configuration>Release</Configuration>
22+
<Platform>Win32</Platform>
23+
</ProjectConfiguration>
24+
<ProjectConfiguration Include="Release|x64">
25+
<Configuration>Release</Configuration>
26+
<Platform>x64</Platform>
27+
</ProjectConfiguration>
28+
</ItemGroup>
29+
<PropertyGroup Label="Globals">
30+
<ProjectGuid>{8E3772EF-7807-40DA-8932-F37DB0C1CB44}</ProjectGuid>
31+
<SccProjectName>SAK</SccProjectName>
32+
<SccAuxPath>SAK</SccAuxPath>
33+
<SccLocalPath>SAK</SccLocalPath>
34+
<SccProvider>SAK</SccProvider>
35+
<DefaultLanguage>en-US</DefaultLanguage>
36+
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
37+
<WindowsAppContainer>true</WindowsAppContainer>
38+
<VCTargetsPath Condition="'$(VCTargetsPath12)' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''">$(VCTargetsPath12)</VCTargetsPath>
39+
</PropertyGroup>
40+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
41+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
42+
<ConfigurationType>DynamicLibrary</ConfigurationType>
43+
<UseDebugLibraries>true</UseDebugLibraries>
44+
<CharacterSet>Unicode</CharacterSet>
45+
<PlatformToolset>v120</PlatformToolset>
46+
</PropertyGroup>
47+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
48+
<ConfigurationType>DynamicLibrary</ConfigurationType>
49+
<UseDebugLibraries>true</UseDebugLibraries>
50+
<CharacterSet>Unicode</CharacterSet>
51+
<PlatformToolset>v120</PlatformToolset>
52+
</PropertyGroup>
53+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
54+
<ConfigurationType>DynamicLibrary</ConfigurationType>
55+
<UseDebugLibraries>true</UseDebugLibraries>
56+
<CharacterSet>Unicode</CharacterSet>
57+
<PlatformToolset>v120</PlatformToolset>
58+
</PropertyGroup>
59+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
60+
<ConfigurationType>DynamicLibrary</ConfigurationType>
61+
<UseDebugLibraries>false</UseDebugLibraries>
62+
<WholeProgramOptimization>true</WholeProgramOptimization>
63+
<CharacterSet>Unicode</CharacterSet>
64+
<PlatformToolset>v120</PlatformToolset>
65+
</PropertyGroup>
66+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
67+
<ConfigurationType>DynamicLibrary</ConfigurationType>
68+
<UseDebugLibraries>false</UseDebugLibraries>
69+
<WholeProgramOptimization>true</WholeProgramOptimization>
70+
<CharacterSet>Unicode</CharacterSet>
71+
<PlatformToolset>v120</PlatformToolset>
72+
</PropertyGroup>
73+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
74+
<ConfigurationType>DynamicLibrary</ConfigurationType>
75+
<UseDebugLibraries>false</UseDebugLibraries>
76+
<WholeProgramOptimization>true</WholeProgramOptimization>
77+
<CharacterSet>Unicode</CharacterSet>
78+
<PlatformToolset>v120</PlatformToolset>
79+
</PropertyGroup>
80+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
81+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.root))\Build\Release.Tests.Settings" />
82+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
83+
<ClCompile>
84+
<PrecompiledHeader>Use</PrecompiledHeader>
85+
<Optimization>Disabled</Optimization>
86+
<PreprocessorDefinitions>WINAPI_FAMILY=WINAPI_PARTITION_APP;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
87+
<AdditionalIncludeDirectories>$(CasablancaIncludeDir);$(CommonTestIncludeDir);..\..\utilities;</AdditionalIncludeDirectories>
88+
<AdditionalUsingDirectories>$(WindowsSDKDir)\References\CommonConfiguration\Neutral;$(VSInstallDir)\vc\vcpackages;$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
89+
<CompileAsWinRT>true</CompileAsWinRT>
90+
<MinimalRebuild>false</MinimalRebuild>
91+
<AdditionalOptions>-Zm200 %(AdditionalOptions)</AdditionalOptions>
92+
</ClCompile>
93+
<Link>
94+
<SubSystem>Windows</SubSystem>
95+
<GenerateDebugInformation>true</GenerateDebugInformation>
96+
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
97+
</Link>
98+
</ItemDefinitionGroup>
99+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
100+
<ClCompile>
101+
<PrecompiledHeader>Use</PrecompiledHeader>
102+
<Optimization>Disabled</Optimization>
103+
<PreprocessorDefinitions>WINAPI_FAMILY=WINAPI_PARTITION_APP;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
104+
<AdditionalIncludeDirectories>$(CasablancaIncludeDir);$(CommonTestIncludeDir);..\..\utilities</AdditionalIncludeDirectories>
105+
<AdditionalUsingDirectories>$(WindowsSDKDir)\References\CommonConfiguration\Neutral;$(VSInstallDir)\vc\vcpackages;$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
106+
<CompileAsWinRT>true</CompileAsWinRT>
107+
<MinimalRebuild>false</MinimalRebuild>
108+
<AdditionalOptions>-Zm200 %(AdditionalOptions)</AdditionalOptions>
109+
</ClCompile>
110+
<Link>
111+
<SubSystem>Windows</SubSystem>
112+
<GenerateDebugInformation>true</GenerateDebugInformation>
113+
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
114+
</Link>
115+
</ItemDefinitionGroup>
116+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
117+
<ClCompile>
118+
<PrecompiledHeader>Use</PrecompiledHeader>
119+
<Optimization>Disabled</Optimization>
120+
<PreprocessorDefinitions>WINAPI_FAMILY=WINAPI_PARTITION_APP;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
121+
<AdditionalIncludeDirectories>$(CasablancaIncludeDir);$(CommonTestIncludeDir);..\..\utilities;</AdditionalIncludeDirectories>
122+
<AdditionalUsingDirectories>$(WindowsSDKDir)\References\CommonConfiguration\Neutral;$(VSInstallDir)\vc\vcpackages;$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
123+
<CompileAsWinRT>true</CompileAsWinRT>
124+
<MinimalRebuild>false</MinimalRebuild>
125+
<AdditionalOptions>-Zm200 %(AdditionalOptions)</AdditionalOptions>
126+
</ClCompile>
127+
<Link>
128+
<SubSystem>Windows</SubSystem>
129+
<GenerateDebugInformation>true</GenerateDebugInformation>
130+
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
131+
</Link>
132+
</ItemDefinitionGroup>
133+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
134+
<ClCompile>
135+
<PrecompiledHeader>Use</PrecompiledHeader>
136+
<Optimization>MaxSpeed</Optimization>
137+
<FunctionLevelLinking>true</FunctionLevelLinking>
138+
<IntrinsicFunctions>true</IntrinsicFunctions>
139+
<PreprocessorDefinitions>WINAPI_FAMILY=WINAPI_PARTITION_APP;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
140+
<AdditionalIncludeDirectories>$(CasablancaIncludeDir);$(CommonTestIncludeDir);..\..\utilities</AdditionalIncludeDirectories>
141+
<AdditionalUsingDirectories>$(WindowsSDKDir)\References\CommonConfiguration\Neutral;$(VSInstallDir)\vc\vcpackages;$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
142+
<CompileAsWinRT>true</CompileAsWinRT>
143+
<MinimalRebuild>false</MinimalRebuild>
144+
<AdditionalOptions>-Zm200 %(AdditionalOptions)</AdditionalOptions>
145+
</ClCompile>
146+
<Link>
147+
<SubSystem>Windows</SubSystem>
148+
<GenerateDebugInformation>true</GenerateDebugInformation>
149+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
150+
<OptimizeReferences>true</OptimizeReferences>
151+
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
152+
</Link>
153+
</ItemDefinitionGroup>
154+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
155+
<ClCompile>
156+
<PrecompiledHeader>Use</PrecompiledHeader>
157+
<Optimization>MaxSpeed</Optimization>
158+
<FunctionLevelLinking>true</FunctionLevelLinking>
159+
<IntrinsicFunctions>true</IntrinsicFunctions>
160+
<PreprocessorDefinitions>WINAPI_FAMILY=WINAPI_PARTITION_APP;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
161+
<AdditionalIncludeDirectories>$(CasablancaIncludeDir);$(CommonTestIncludeDir);..\..\utilities</AdditionalIncludeDirectories>
162+
<AdditionalUsingDirectories>$(WindowsSDKDir)\References\CommonConfiguration\Neutral;$(VSInstallDir)\vc\vcpackages;$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
163+
<CompileAsWinRT>true</CompileAsWinRT>
164+
<MinimalRebuild>false</MinimalRebuild>
165+
<AdditionalOptions>-Zm200 %(AdditionalOptions)</AdditionalOptions>
166+
</ClCompile>
167+
<Link>
168+
<SubSystem>Windows</SubSystem>
169+
<GenerateDebugInformation>true</GenerateDebugInformation>
170+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
171+
<OptimizeReferences>true</OptimizeReferences>
172+
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
173+
</Link>
174+
</ItemDefinitionGroup>
175+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
176+
<ClCompile>
177+
<PrecompiledHeader>Use</PrecompiledHeader>
178+
<Optimization>MaxSpeed</Optimization>
179+
<FunctionLevelLinking>true</FunctionLevelLinking>
180+
<IntrinsicFunctions>true</IntrinsicFunctions>
181+
<PreprocessorDefinitions>WINAPI_FAMILY=WINAPI_PARTITION_APP;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
182+
<AdditionalIncludeDirectories>$(CasablancaIncludeDir);$(CommonTestIncludeDir);..\..\utilities</AdditionalIncludeDirectories>
183+
<AdditionalUsingDirectories>$(WindowsSDKDir)\References\CommonConfiguration\Neutral;$(VSInstallDir)\vc\vcpackages;$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
184+
<CompileAsWinRT>true</CompileAsWinRT>
185+
<MinimalRebuild>false</MinimalRebuild>
186+
<AdditionalOptions>-Zm200 %(AdditionalOptions)</AdditionalOptions>
187+
</ClCompile>
188+
<Link>
189+
<SubSystem>Windows</SubSystem>
190+
<GenerateDebugInformation>true</GenerateDebugInformation>
191+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
192+
<OptimizeReferences>true</OptimizeReferences>
193+
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
194+
</Link>
195+
</ItemDefinitionGroup>
196+
<ItemGroup>
197+
<ProjectReference Include="$(TestRoot)\Common\utilities\vs12.winrt\CommonUtilities120.winrt.vcxproj">
198+
<Project>{ea2d69a1-55c8-4c15-805e-de7e85872484}</Project>
199+
</ProjectReference>
200+
<ProjectReference Include="$(TestRoot)\Common\UnitTestpp\vs12.winrt\UnitTestpp120.winrt.vcxproj">
201+
<Project>{B341AA9C-F38B-4D59-B6B7-8F22491090B7}</Project>
202+
</ProjectReference>
203+
<ProjectReference Include="$(CasablancaSrcDir)\build\vs12.winrt\casablanca120.winrt.vcxproj">
204+
<Project>{198ED804-2655-4D92-8104-C220E3EA9452}</Project>
205+
</ProjectReference>
206+
<ProjectReference Include="..\..\utilities\vs12.winrt\websockets_test_utilities120.winrt.vcxproj">
207+
<Project>{D422311C-1C3A-4083-A564-6474EA60FFC7}</Project>
208+
</ProjectReference>
209+
</ItemGroup>
210+
<ItemGroup>
211+
<ClInclude Include="..\stdafx.h" />
212+
<ClInclude Include="..\websocket_client_tests.h" />
213+
</ItemGroup>
214+
<ItemGroup>
215+
<ClCompile Include="..\authentication_tests.cpp" />
216+
<ClCompile Include="..\client_construction.cpp" />
217+
<ClCompile Include="..\close_tests.cpp" />
218+
<ClCompile Include="..\error_tests.cpp" />
219+
<ClCompile Include="..\receive_msg_tests.cpp" />
220+
<ClCompile Include="..\send_msg_tests.cpp" />
221+
<ClCompile Include="..\proxy_tests.cpp" />
222+
<ClCompile Include="..\stdafx.cpp">
223+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
224+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
225+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader>
226+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader>
227+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
228+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
229+
</ClCompile>
230+
</ItemGroup>
231+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
232+
<ImportGroup Label="ExtensionTargets">
233+
</ImportGroup>
234+
235+
<Target Name="StripAppContainer" AfterTargets="Build">
236+
<CallTarget Targets="StripAppContainerOnProjectDll" />
237+
<Copy SourceFiles="$(OutDir)\$(TargetName).dll" DestinationFolder="$(OutDir)\.." />
238+
<Copy SourceFiles="$(OutDir)\$(TargetName).pdb" DestinationFolder="$(OutDir)\.." />
239+
</Target>
240+
</Project>

Release/tests/functional/websockets/utilities/stdafx.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,20 @@
2424

2525
#pragma once
2626

27-
#if defined(_WIN32) && _MSC_VER < 1800
28-
// pplxtasks.h includes Windows.h on VS2012 only WinRT, which is terrible.
29-
// Need to include before to avoid winsock issues with websocketpp.
27+
#if defined(_WIN32)
28+
// Include first to avoid any issues with Windows.h.
3029
#define NOMINMAX
3130
#include <winsock2.h>
3231
#endif
3332

33+
#if defined(_WIN32)
34+
// Trick Boost.Asio into thinking CE, otherwise _beginthreadex will be used which is banned
35+
// for the Windows Runtime. Then CreateThread will be used instead.
36+
#if defined(__cplusplus_winrt)
37+
#define UNDER_CE 1
38+
#endif
39+
#endif
40+
3441
#include "cpprest/uri.h"
3542
#include "cpprest/asyncrt_utils.h"
3643
#include "cpprest/streams.h"

Release/tests/functional/websockets/utilities/test_websocket_server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#ifdef _WIN32
3333
#pragma warning( disable : 4503 )
3434
#pragma warning( push )
35-
#pragma warning( disable : 4100 4127 4996 4512 4701 4267 )
35+
#pragma warning( disable : 4100 4127 4996 4512 4701 4267 4067 )
3636
#if defined(_MSC_VER) && (_MSC_VER >= 1800)
3737
#define _WEBSOCKETPP_CPP11_STL_
3838
#define _WEBSOCKETPP_INITIALIZER_LISTS_

0 commit comments

Comments
 (0)