mirror of
https://git.suyu.dev/suyu/ext-boost.git
synced 2026-01-08 23:48:11 +01:00
externals: Update boost to 1.72 and add Boost Context
This commit is contained in:
parent
5e8300b76a
commit
77abe07b3b
618 changed files with 96299 additions and 14263 deletions
158
libs/regex/build/Jamfile.v2
Normal file
158
libs/regex/build/Jamfile.v2
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
# copyright John Maddock 2003
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt.
|
||||
|
||||
import modules ;
|
||||
import testing ;
|
||||
import errors ;
|
||||
|
||||
project : requirements
|
||||
# default to all warnings on:
|
||||
<warnings>all
|
||||
;
|
||||
|
||||
local disable-icu = [ MATCH (--disable-icu) : [ modules.peek : ARGV ] ] ;
|
||||
|
||||
rule path_options ( properties * )
|
||||
{
|
||||
local result ;
|
||||
if <address-model>64 in $(properties) && <toolset>msvc in $(properties)
|
||||
{
|
||||
result = <search>$(ICU_PATH)/bin64 <search>$(ICU_PATH)/lib64 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = <search>$(ICU_PATH)/bin <search>$(ICU_PATH)/lib ;
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
#
|
||||
# ICU configuration:
|
||||
#
|
||||
if ! $(disable-icu)
|
||||
{
|
||||
if [ modules.peek : ICU_LINK ]
|
||||
{
|
||||
errors.user-error : "The ICU_LINK option is no longer supported by the Boost.Regex build - please refer to the documentation for equivalent options" ;
|
||||
}
|
||||
|
||||
if [ modules.peek : ICU_PATH ]
|
||||
{
|
||||
ICU_PATH = [ modules.peek : ICU_PATH ] ;
|
||||
}
|
||||
if [ modules.peek : ICU_ICUUC_NAME ]
|
||||
{
|
||||
ICU_ICUUC_NAME = [ modules.peek : ICU_ICUUC_NAME ] ;
|
||||
}
|
||||
if [ modules.peek : ICU_ICUDT_NAME ]
|
||||
{
|
||||
ICU_ICUDT_NAME = [ modules.peek : ICU_ICUDT_NAME ] ;
|
||||
}
|
||||
if [ modules.peek : ICU_ICUIN_NAME ]
|
||||
{
|
||||
ICU_ICUIN_NAME = [ modules.peek : ICU_ICUIN_NAME ] ;
|
||||
}
|
||||
|
||||
if $(ICU_ICUUC_NAME)
|
||||
{
|
||||
lib icuuc : : <name>$(ICU_ICUUC_NAME) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
lib icuuc : : <runtime-link>shared <conditional>@path_options ;
|
||||
lib icuuc : : <toolset>msvc <variant>debug <name>icuucd <runtime-link>shared <conditional>@path_options ;
|
||||
lib icuuc : : <toolset>intel <target-os>windows <variant>debug <name>icuucd <runtime-link>shared <conditional>@path_options ;
|
||||
lib icuuc : : <name>sicuuc <runtime-link>static <conditional>@path_options ;
|
||||
lib icuuc : : <toolset>msvc <variant>debug <name>sicuucd <runtime-link>static <conditional>@path_options ;
|
||||
lib icuuc : : <toolset>intel <target-os>windows <variant>debug <name>sicuucd <runtime-link>static <conditional>@path_options ;
|
||||
lib icuuc : : <name>this_is_an_invalid_library_name ;
|
||||
}
|
||||
if $(ICU_ICUDT_NAME)
|
||||
{
|
||||
lib icudt : : <name>$(ICU_ICUDT_NAME) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
lib icudt : : <name>icudata <runtime-link>shared <conditional>@path_options ;
|
||||
lib icudt : : <name>icudt <toolset>msvc <runtime-link>shared <conditional>@path_options ;
|
||||
lib icudt : : <name>icudt <toolset>intel <target-os>windows <runtime-link>shared <conditional>@path_options ;
|
||||
lib icudt : : <name>sicudata <runtime-link>static <conditional>@path_options ;
|
||||
lib icudt : : <name>sicudt <toolset>msvc <runtime-link>static <conditional>@path_options ;
|
||||
lib icudt : : <name>sicudt <toolset>intel <target-os>windows <runtime-link>static <conditional>@path_options ;
|
||||
lib icudt : : <name>this_is_an_invalid_library_name ;
|
||||
}
|
||||
if $(ICU_ICUIN_NAME)
|
||||
{
|
||||
lib icuin : : <name>$(ICU_ICUIN_NAME) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
lib icuin : : <name>icui18n <runtime-link>shared <conditional>@path_options ;
|
||||
lib icuin : : <toolset>msvc <variant>debug <name>icuind <runtime-link>shared <conditional>@path_options ;
|
||||
lib icuin : : <toolset>msvc <name>icuin <runtime-link>shared <conditional>@path_options ;
|
||||
lib icuin : : <toolset>intel <target-os>windows <variant>debug <name>icuind <runtime-link>shared <conditional>@path_options ;
|
||||
lib icuin : : <toolset>intel <target-os>windows <name>icuin <runtime-link>shared <conditional>@path_options ;
|
||||
lib icuin : : <name>sicui18n <runtime-link>static <conditional>@path_options ;
|
||||
lib icuin : : <toolset>msvc <variant>debug <name>sicuind <runtime-link>static <conditional>@path_options ;
|
||||
lib icuin : : <toolset>msvc <name>sicuin <runtime-link>static <conditional>@path_options ;
|
||||
lib icuin : : <toolset>intel <target-os>windows <variant>debug <name>sicuind <runtime-link>static <conditional>@path_options ;
|
||||
lib icuin : : <toolset>intel <target-os>windows <name>sicuin <runtime-link>static <conditional>@path_options ;
|
||||
lib icuin : : <name>this_is_an_invalid_library_name ;
|
||||
}
|
||||
|
||||
ICU_OPTS =
|
||||
<include>$(ICU_PATH)/include
|
||||
<runtime-link>shared:<library>icuuc/<link>shared
|
||||
<runtime-link>shared:<library>icudt/<link>shared
|
||||
<runtime-link>shared:<library>icuin/<link>shared
|
||||
<runtime-link>static:<library>icuuc
|
||||
<runtime-link>static:<library>icudt
|
||||
<runtime-link>static:<library>icuin
|
||||
<define>BOOST_HAS_ICU=1
|
||||
<runtime-link>static:<define>U_STATIC_IMPLEMENTATION=1
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
unit-test has_icu : has_icu_test.cpp : $(ICU_OPTS) ;
|
||||
explicit has_icu ;
|
||||
|
||||
alias icu_options : : : : [ check-target-builds has_icu : $(ICU_OPTS) : ] ;
|
||||
|
||||
SOURCES =
|
||||
c_regex_traits.cpp
|
||||
cpp_regex_traits.cpp
|
||||
cregex.cpp
|
||||
fileiter.cpp
|
||||
icu.cpp
|
||||
instances.cpp
|
||||
posix_api.cpp
|
||||
regex.cpp
|
||||
regex_debug.cpp
|
||||
regex_raw_buffer.cpp
|
||||
regex_traits_defaults.cpp
|
||||
static_mutex.cpp
|
||||
w32_regex_traits.cpp
|
||||
wc_regex_traits.cpp
|
||||
wide_posix_api.cpp
|
||||
winstances.cpp
|
||||
usinstances.cpp ;
|
||||
|
||||
|
||||
lib boost_regex : ../src/$(SOURCES) icu_options
|
||||
:
|
||||
<link>shared:<define>BOOST_REGEX_DYN_LINK=1
|
||||
<toolset>gcc-cygwin:<link>static
|
||||
;
|
||||
|
||||
boost-install boost_regex ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
52
libs/regex/build/has_icu_test.cpp
Normal file
52
libs/regex/build/has_icu_test.cpp
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (c) 2010
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
#include <unicode/uversion.h>
|
||||
#include <unicode/utypes.h>
|
||||
#include <unicode/uchar.h>
|
||||
#include <unicode/coll.h>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
#if defined(_MSC_VER) && !defined(_DLL)
|
||||
//#error "Mixing ICU with a static runtime doesn't work"
|
||||
#endif
|
||||
|
||||
void print_error(UErrorCode err, const char* func)
|
||||
{
|
||||
std::cerr << "Error from function " << func << " with error: " << ::u_errorName(err) << std::endl;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
// To detect possible binary mismatches between the installed ICU build, and whatever
|
||||
// C++ std lib's we're using, we need to:
|
||||
// * Make sure we call ICU C++ API's
|
||||
// * Make sure we call std lib C++ API's as well (cout).
|
||||
// * Be sure this program is run, not just built.
|
||||
UErrorCode err = U_ZERO_ERROR;
|
||||
UChar32 c = ::u_charFromName(U_UNICODE_CHAR_NAME, "GREEK SMALL LETTER ALPHA", &err);
|
||||
std::cout << (int)c << std::endl;
|
||||
if(err > 0)
|
||||
{
|
||||
print_error(err, "u_charFromName");
|
||||
return err;
|
||||
}
|
||||
U_NAMESPACE_QUALIFIER Locale l;
|
||||
boost::scoped_ptr<U_NAMESPACE_QUALIFIER Collator> p_col(U_NAMESPACE_QUALIFIER Collator::createInstance(l, err));
|
||||
if(err > 0)
|
||||
{
|
||||
print_error(err, "Collator::createInstance");
|
||||
return err;
|
||||
}
|
||||
return err > 0 ? err : 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue