Skip to content

Commit

Permalink
Some fixes to build with clang 3_8.
Browse files Browse the repository at this point in the history
Ignore the -Winfinite-recursion warning. This has been fixed in the next
boost versions.
  • Loading branch information
kavyako committed Oct 5, 2016
1 parent 2902b29 commit d133746
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 27 deletions.
1 change: 1 addition & 0 deletions Release/include/cpprest/details/http_server_asio.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wconversion"
#pragma clang diagnostic ignored "-Winfinite-recursion"
#endif
#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
Expand Down
1 change: 1 addition & 0 deletions Release/include/pplx/threadpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wconversion"
#pragma clang diagnostic ignored "-Wunreachable-code"
#pragma clang diagnostic ignored "-Winfinite-recursion"
#endif
#include "boost/asio.hpp"
#if defined(__clang__)
Expand Down
1 change: 1 addition & 0 deletions Release/src/http/client/http_client_asio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-local-typedef"
#pragma clang diagnostic ignored "-Winfinite-recursion"
#endif
#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
Expand Down
1 change: 1 addition & 0 deletions Release/src/pch/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-local-typedef"
#pragma clang diagnostic ignored "-Winfinite-recursion"
#endif

#include "cpprest/details/cpprest_compat.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
Expand All @@ -26,28 +26,32 @@
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<ApplicationType>Android</ApplicationType>
<ApplicationTypeRevision>1.0</ApplicationTypeRevision>
<ApplicationTypeRevision>2.0</ApplicationTypeRevision>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<UseOfStl>gnustl_static</UseOfStl>
<PlatformToolset>Clang_3_8</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<UseOfStl>gnustl_static</UseOfStl>
<PlatformToolset>Clang_3_8</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<UseOfStl>gnustl_static</UseOfStl>
<PlatformToolset>Clang_3_8</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<UseOfStl>gnustl_static</UseOfStl>
<PlatformToolset>Clang_3_8</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
Expand Down Expand Up @@ -253,28 +257,28 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(PackagesRoot)\openssl-android.1.0.2.0\build\native\openssl-android.targets" Condition="Exists('$(PackagesRoot)\openssl-android.1.0.2.0\build\native\openssl-android.targets')" />
<Import Project="$(PackagesRoot)\openssl-android.1.0.2.1\build\native\openssl-android.targets" Condition="Exists('$(PackagesRoot)\openssl-android.1.0.2.0\build\native\openssl-android.targets')" />
<Import Project="$(PackagesRoot)\boost.1.55.0.16\build\native\boost.targets" Condition="Exists('$(PackagesRoot)\boost.1.55.0.16\build\native\boost.targets')" />
<Import Project="$(PackagesRoot)\boost_atomic-android.1.55.0.1\build\native\boost_atomic-android.targets" Condition="Exists('$(PackagesRoot)\boost_atomic-android.1.55.0.1\build\native\boost_atomic-android.targets')" />
<Import Project="$(PackagesRoot)\boost_thread-android.1.55.0.1\build\native\boost_thread-android.targets" Condition="Exists('$(PackagesRoot)\boost_thread-android.1.55.0.1\build\native\boost_thread-android.targets')" />
<Import Project="$(PackagesRoot)\boost_system-android.1.55.0.1\build\native\boost_system-android.targets" Condition="Exists('$(PackagesRoot)\boost_system-android.1.55.0.1\build\native\boost_system-android.targets')" />
<Import Project="$(PackagesRoot)\boost_random-android.1.55.0.1\build\native\boost_random-android.targets" Condition="Exists('$(PackagesRoot)\boost_random-android.1.55.0.1\build\native\boost_random-android.targets')" />
<Import Project="$(PackagesRoot)\boost_filesystem-android.1.55.0.1\build\native\boost_filesystem-android.targets" Condition="Exists('$(PackagesRoot)\boost_filesystem-android.1.55.0.1\build\native\boost_filesystem-android.targets')" />
<Import Project="$(PackagesRoot)\boost_date_time-android.1.55.0.1\build\native\boost_date_time-android.targets" Condition="Exists('$(PackagesRoot)\boost_date_time-android.1.55.0.1\build\native\boost_date_time-android.targets')" />
<Import Project="$(PackagesRoot)\boost_chrono-android.1.55.0.1\build\native\boost_chrono-android.targets" Condition="Exists('$(PackagesRoot)\boost_chrono-android.1.55.0.1\build\native\boost_chrono-android.targets')" />
<Import Project="$(PackagesRoot)\boost_atomic-android.1.55.0.2\build\native\boost_atomic-android.targets" Condition="Exists('$(PackagesRoot)\boost_atomic-android.1.55.0.2\build\native\boost_atomic-android.targets')" />
<Import Project="$(PackagesRoot)\boost_thread-android.1.55.0.2\build\native\boost_thread-android.targets" Condition="Exists('$(PackagesRoot)\boost_thread-android.1.55.0.2\build\native\boost_thread-android.targets')" />
<Import Project="$(PackagesRoot)\boost_system-android.1.55.0.2\build\native\boost_system-android.targets" Condition="Exists('$(PackagesRoot)\boost_system-android.1.55.0.2\build\native\boost_system-android.targets')" />
<Import Project="$(PackagesRoot)\boost_random-android.1.55.0.2\build\native\boost_random-android.targets" Condition="Exists('$(PackagesRoot)\boost_random-android.1.55.0.2\build\native\boost_random-android.targets')" />
<Import Project="$(PackagesRoot)\boost_filesystem-android.1.55.0.2\build\native\boost_filesystem-android.targets" Condition="Exists('$(PackagesRoot)\boost_filesystem-android.1.55.0.2\build\native\boost_filesystem-android.targets')" />
<Import Project="$(PackagesRoot)\boost_date_time-android.1.55.0.2\build\native\boost_date_time-android.targets" Condition="Exists('$(PackagesRoot)\boost_date_time-android.1.55.0.2\build\native\boost_date_time-android.targets')" />
<Import Project="$(PackagesRoot)\boost_chrono-android.1.55.0.2\build\native\boost_chrono-android.targets" Condition="Exists('$(PackagesRoot)\boost_chrono-android.1.55.0.2\build\native\boost_chrono-android.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(PackagesRoot)\openssl-android.1.0.2.0\build\native\openssl-android.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesRoot)\openssl-android.1.0.2.0\build\native\openssl-android.targets'))" />
<Error Condition="!Exists('$(PackagesRoot)\openssl-android.1.0.2.1\build\native\openssl-android.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesRoot)\openssl-android.1.0.2.0\build\native\openssl-android.targets'))" />
<Error Condition="!Exists('$(PackagesRoot)\boost.1.55.0.16\build\native\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesRoot)\boost.1.55.0.16\build\native\boost.targets'))" />
<Error Condition="!Exists('$(PackagesRoot)\boost_atomic-android.1.55.0.1\build\native\boost_atomic-android.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesRoot)\boost_atomic-android.1.55.0.1\build\native\boost_atomic-android.targets'))" />
<Error Condition="!Exists('$(PackagesRoot)\boost_thread-android.1.55.0.1\build\native\boost_thread-android.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesRoot)\boost_thread-android.1.55.0.1\build\native\boost_thread-android.targets'))" />
<Error Condition="!Exists('$(PackagesRoot)\boost_system-android.1.55.0.1\build\native\boost_system-android.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesRoot)\boost_system-android.1.55.0.1\build\native\boost_system-android.targets'))" />
<Error Condition="!Exists('$(PackagesRoot)\boost_random-android.1.55.0.1\build\native\boost_random-android.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesRoot)\boost_random-android.1.55.0.1\build\native\boost_random-android.targets'))" />
<Error Condition="!Exists('$(PackagesRoot)\boost_filesystem-android.1.55.0.1\build\native\boost_filesystem-android.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesRoot)\boost_filesystem-android.1.55.0.1\build\native\boost_filesystem-android.targets'))" />
<Error Condition="!Exists('$(PackagesRoot)\boost_date_time-android.1.55.0.1\build\native\boost_date_time-android.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesRoot)\boost_date_time-android.1.55.0.1\build\native\boost_date_time-android.targets'))" />
<Error Condition="!Exists('$(PackagesRoot)\boost_chrono-android.1.55.0.1\build\native\boost_chrono-android.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesRoot)\boost_chrono-android.1.55.0.1\build\native\boost_chrono-android.targets'))" />
<Error Condition="!Exists('$(PackagesRoot)\boost_atomic-android.1.55.0.2\build\native\boost_atomic-android.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesRoot)\boost_atomic-android.1.55.0.2\build\native\boost_atomic-android.targets'))" />
<Error Condition="!Exists('$(PackagesRoot)\boost_thread-android.1.55.0.2\build\native\boost_thread-android.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesRoot)\boost_thread-android.1.55.0.2\build\native\boost_thread-android.targets'))" />
<Error Condition="!Exists('$(PackagesRoot)\boost_system-android.1.55.0.2\build\native\boost_system-android.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesRoot)\boost_system-android.1.55.0.2\build\native\boost_system-android.targets'))" />
<Error Condition="!Exists('$(PackagesRoot)\boost_random-android.1.55.0.2\build\native\boost_random-android.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesRoot)\boost_random-android.1.55.0.2\build\native\boost_random-android.targets'))" />
<Error Condition="!Exists('$(PackagesRoot)\boost_filesystem-android.1.55.0.2\build\native\boost_filesystem-android.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesRoot)\boost_filesystem-android.1.55.0.2\build\native\boost_filesystem-android.targets'))" />
<Error Condition="!Exists('$(PackagesRoot)\boost_date_time-android.1.55.0.2\build\native\boost_date_time-android.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesRoot)\boost_date_time-android.1.55.0.2\build\native\boost_date_time-android.targets'))" />
<Error Condition="!Exists('$(PackagesRoot)\boost_chrono-android.1.55.0.2\build\native\boost_chrono-android.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(PackagesRoot)\boost_chrono-android.1.55.0.2\build\native\boost_chrono-android.targets'))" />
</Target>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="boost" version="1.55.0.16" targetFramework="native" />
<package id="boost_atomic-android" version="1.55.0.1" targetFramework="native" />
<package id="boost_chrono-android" version="1.55.0.1" targetFramework="native" />
<package id="boost_date_time-android" version="1.55.0.1" targetFramework="native" />
<package id="boost_filesystem-android" version="1.55.0.1" targetFramework="native" />
<package id="boost_random-android" version="1.55.0.1" targetFramework="native" />
<package id="boost_system-android" version="1.55.0.1" targetFramework="native" />
<package id="boost_thread-android" version="1.55.0.1" targetFramework="native" />
<package id="openssl-android" version="1.0.2.0" targetFramework="native" />
<package id="boost_atomic-android" version="1.55.0.2" targetFramework="native" />
<package id="boost_chrono-android" version="1.55.0.2" targetFramework="native" />
<package id="boost_date_time-android" version="1.55.0.2" targetFramework="native" />
<package id="boost_filesystem-android" version="1.55.0.2" targetFramework="native" />
<package id="boost_random-android" version="1.55.0.2" targetFramework="native" />
<package id="boost_system-android" version="1.55.0.2" targetFramework="native" />
<package id="boost_thread-android" version="1.55.0.2" targetFramework="native" />
<package id="openssl-android" version="1.0.2.1" targetFramework="native" />
</packages>
7 changes: 7 additions & 0 deletions Release/tests/functional/http/client/authentication_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,15 @@
#endif

#if !defined(_WIN32)
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winfinite-recursion"
#endif
#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
#endif

using namespace web;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,18 @@
#endif
#endif /* _WIN32 */

#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winfinite-recursion"
#endif

#include <websocketpp/config/asio_no_tls.hpp>
#include <websocketpp/server.hpp>

#if defined(__clang__)
#pragma clang diagnostic pop
#endif

#ifdef _WIN32
#pragma warning( pop )
#endif
Expand Down

0 comments on commit d133746

Please sign in to comment.