mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Changes to support VS2015
This commit is contained in:
committed by
Vinnie Falco
parent
258c93f8d8
commit
8f3bb286f2
@@ -50,7 +50,9 @@
|
||||
|
||||
// Disables beast's std::equal safe iterator overloads
|
||||
#ifndef BEAST_NO_CXX14_EQUAL
|
||||
# ifdef _MSC_VER
|
||||
# if defined(_MSC_VER) && _MSC_VER >= 1900
|
||||
# define BEAST_NO_CXX14_EQUAL 1
|
||||
# elif defined(_MSC_VER)
|
||||
# define BEAST_NO_CXX14_EQUAL 0
|
||||
# elif defined(__clang__) && defined(_LIBCPP_VERSION) && __cplusplus >= 201402
|
||||
# define BEAST_NO_CXX14_EQUAL 1
|
||||
@@ -61,7 +63,9 @@
|
||||
|
||||
// Disables beast's std::integer_sequence
|
||||
#ifndef BEAST_NO_CXX14_INTEGER_SEQUENCE
|
||||
# ifdef _MSC_VER
|
||||
# if defined(_MSC_VER) && _MSC_VER >= 1900
|
||||
# define BEAST_NO_CXX14_INTEGER_SEQUENCE 1
|
||||
# elif defined(_MSC_VER)
|
||||
# define BEAST_NO_CXX14_INTEGER_SEQUENCE 0
|
||||
# elif defined(__clang__) && defined(_LIBCPP_VERSION) && __cplusplus >= 201402
|
||||
# define BEAST_NO_CXX14_INTEGER_SEQUENCE 1
|
||||
@@ -72,7 +76,9 @@
|
||||
|
||||
// Disables beast's std::make_reverse_iterator
|
||||
#ifndef BEAST_NO_CXX14_MAKE_REVERSE_ITERATOR
|
||||
# ifdef _MSC_VER
|
||||
# if defined(_MSC_VER) && _MSC_VER >= 1900
|
||||
# define BEAST_NO_CXX14_MAKE_REVERSE_ITERATOR 1
|
||||
# elif defined(_MSC_VER)
|
||||
# define BEAST_NO_CXX14_MAKE_REVERSE_ITERATOR 0
|
||||
# elif defined(__clang__) && defined(_LIBCPP_VERSION) && __cplusplus >= 201402
|
||||
# define BEAST_NO_CXX14_MAKE_REVERSE_ITERATOR 1
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
|
||||
#include <beast/module/core/native/BasicNativeHeaders.h>
|
||||
#include <beast/module/core/core.h>
|
||||
|
||||
@@ -46,7 +47,10 @@
|
||||
#include <ws2tcpip.h>
|
||||
|
||||
#if ! BEAST_MINGW
|
||||
#pragma warning ( push )
|
||||
#pragma warning ( disable: 4091 )
|
||||
#include <Dbghelp.h>
|
||||
#pragma warning ( pop )
|
||||
|
||||
#if ! BEAST_DONT_AUTOLINK_TO_WIN32_LIBRARIES
|
||||
#pragma comment (lib, "DbgHelp.lib")
|
||||
|
||||
@@ -106,7 +106,10 @@
|
||||
#include <mapi.h>
|
||||
#include <float.h>
|
||||
#include <process.h>
|
||||
#pragma warning ( push )
|
||||
#pragma warning ( disable: 4091 )
|
||||
#include <shlobj.h>
|
||||
#pragma warning ( pop )
|
||||
#include <shlwapi.h>
|
||||
#include <mmsystem.h>
|
||||
|
||||
|
||||
@@ -25,10 +25,12 @@
|
||||
#define BEAST_UTILITY_NOEXCEPT_H_INCLUDED
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# ifdef noexcept
|
||||
# undef noexcept
|
||||
# if _MSC_VER < 1900
|
||||
# ifdef noexcept
|
||||
# undef noexcept
|
||||
# endif
|
||||
# define noexcept throw()
|
||||
# endif
|
||||
# define noexcept throw()
|
||||
# if _MSC_VER > 1600 && ! _ALLOW_KEYWORD_MACROS
|
||||
# define _ALLOW_KEYWORD_MACROS 1 // (to stop VC2012 complaining)
|
||||
# endif
|
||||
|
||||
@@ -158,7 +158,7 @@ static_initializer_test::test (cxx11_tag)
|
||||
t(counts);
|
||||
});
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
// Visual Studio 2013 and earlier can exhibit both double
|
||||
// construction, and access before construction when function
|
||||
// local statics are initialized concurrently.
|
||||
|
||||
@@ -30,19 +30,19 @@ import SCons.Util
|
||||
|
||||
UnicodeByteMarker = '\xEF\xBB\xBF'
|
||||
|
||||
V12DSPHeader = """\
|
||||
V14DSPHeader = """\
|
||||
<?xml version="1.0" encoding="%(encoding)s"?>\r
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
|
||||
"""
|
||||
|
||||
V12DSPProjectConfiguration = """\
|
||||
V14DSPProjectConfiguration = """\
|
||||
<ProjectConfiguration Include="%(variant)s|%(platform)s">\r
|
||||
<Configuration>%(variant)s</Configuration>\r
|
||||
<Platform>%(platform)s</Platform>\r
|
||||
</ProjectConfiguration>\r
|
||||
"""
|
||||
|
||||
V12DSPGlobals = """\
|
||||
V14DSPGlobals = """\
|
||||
<PropertyGroup Label="Globals">\r
|
||||
<ProjectGuid>%(project_guid)s</ProjectGuid>\r
|
||||
<Keyword>Win32Proj</Keyword>\r
|
||||
@@ -51,11 +51,11 @@ V12DSPGlobals = """\
|
||||
</PropertyGroup>\r
|
||||
"""
|
||||
|
||||
V12DSPPropertyGroup = """\
|
||||
V14DSPPropertyGroup = """\
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'" Label="Configuration">\r
|
||||
<CharacterSet>MultiByte</CharacterSet>\r
|
||||
<ConfigurationType>Application</ConfigurationType>\r
|
||||
<PlatformToolset>v120</PlatformToolset>\r
|
||||
<PlatformToolset>v140</PlatformToolset>\r
|
||||
<LinkIncremental>False</LinkIncremental>\r
|
||||
<UseDebugLibraries>%(use_debug_libs)s</UseDebugLibraries>\r
|
||||
<UseOfMfc>False</UseOfMfc>\r
|
||||
@@ -65,17 +65,17 @@ V12DSPPropertyGroup = """\
|
||||
</PropertyGroup>\r
|
||||
"""
|
||||
|
||||
V12DSPImportGroup= """\
|
||||
V14DSPImportGroup= """\
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'" Label="PropertySheets">\r
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
|
||||
</ImportGroup>\r
|
||||
"""
|
||||
|
||||
V12DSPItemDefinitionGroup= """\
|
||||
V14DSPItemDefinitionGroup= """\
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">\r
|
||||
"""
|
||||
|
||||
V12CustomBuildProtoc= """\
|
||||
V14CustomBuildProtoc= """\
|
||||
<FileType>Document</FileType>\r
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='%(name)s'">protoc --cpp_out=%(cpp_out)s --proto_path=%%(RelativeDir) %%(Identity)</Command>\r
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='%(name)s'">%(base_out)s.pb.h;%(base_out)s.pb.cc</Outputs>\r
|
||||
@@ -83,7 +83,7 @@ V12CustomBuildProtoc= """\
|
||||
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='%(name)s'">false</LinkObjects>\r
|
||||
"""
|
||||
|
||||
V12DSPFiltersHeader = (
|
||||
V14DSPFiltersHeader = (
|
||||
'''<?xml version="1.0" encoding="utf-8"?>\r
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
|
||||
''')
|
||||
@@ -663,13 +663,13 @@ class _ProjectGenerator(object):
|
||||
|
||||
f = self.project_file
|
||||
f.write(UnicodeByteMarker)
|
||||
f.write(V12DSPHeader % locals())
|
||||
f.write(V12DSPGlobals % locals())
|
||||
f.write(V14DSPHeader % locals())
|
||||
f.write(V14DSPGlobals % locals())
|
||||
f.write(' <ItemGroup Label="ProjectConfigurations">\r\n')
|
||||
for config in self.configs:
|
||||
variant = config.variant
|
||||
platform = config.platform
|
||||
f.write(V12DSPProjectConfiguration % locals())
|
||||
f.write(V14DSPProjectConfiguration % locals())
|
||||
f.write(' </ItemGroup>\r\n')
|
||||
|
||||
f.write(' <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r\n')
|
||||
@@ -681,20 +681,20 @@ class _ProjectGenerator(object):
|
||||
config.target[0].get_abspath()), self.project_dir)
|
||||
out_dir = winpath(variant_dir) + ntpath.sep
|
||||
int_dir = winpath(ntpath.join(variant_dir, 'src')) + ntpath.sep
|
||||
f.write(V12DSPPropertyGroup % locals())
|
||||
f.write(V14DSPPropertyGroup % locals())
|
||||
|
||||
f.write(' <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r\n')
|
||||
f.write(' <ImportGroup Label="ExtensionSettings" />\r\n')
|
||||
for config in self.configs:
|
||||
variant = config.variant
|
||||
platform = config.platform
|
||||
f.write(V12DSPImportGroup % locals())
|
||||
f.write(V14DSPImportGroup % locals())
|
||||
|
||||
f.write(' <PropertyGroup Label="UserMacros" />\r\n')
|
||||
for config in self.configs:
|
||||
variant = config.variant
|
||||
platform = config.platform
|
||||
f.write(V12DSPItemDefinitionGroup % locals())
|
||||
f.write(V14DSPItemDefinitionGroup % locals())
|
||||
# Cl options
|
||||
f.write(' <ClCompile>\r\n')
|
||||
f.write(
|
||||
@@ -759,7 +759,7 @@ class _ProjectGenerator(object):
|
||||
out_parts = out_dir.split(os.sep)
|
||||
out_parts.append(os.path.splitext(os.path.basename(item.path()))[0])
|
||||
base_out = ntpath.join(*out_parts)
|
||||
props += V12CustomBuildProtoc % locals()
|
||||
props += V14CustomBuildProtoc % locals()
|
||||
|
||||
f.write(' <%(tag)s Include="%(path)s">\r\n' % locals())
|
||||
f.write(props)
|
||||
@@ -783,7 +783,7 @@ class _ProjectGenerator(object):
|
||||
|
||||
f = self.filters_file
|
||||
f.write(UnicodeByteMarker)
|
||||
f.write(V12DSPFiltersHeader)
|
||||
f.write(V14DSPFiltersHeader)
|
||||
|
||||
f.write(' <ItemGroup>\r\n')
|
||||
groups = set()
|
||||
|
||||
Reference in New Issue
Block a user