Allow build to support XCode 10.2

This commit is contained in:
Mike Ellery
2019-02-22 15:37:00 -08:00
committed by Nik Bougalis
parent 1e1e8c2547
commit de1d102535
2 changed files with 17 additions and 4 deletions

View File

@@ -366,7 +366,6 @@ add_library (opts INTERFACE)
add_library (Ripple::opts ALIAS opts)
target_compile_definitions (opts
INTERFACE
BOOST_ASIO_HAS_STD_ARRAY
BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS
$<$<BOOL:${boost_show_deprecated}>:
BOOST_ASIO_NO_DEPRECATED
@@ -567,6 +566,15 @@ target_link_libraries (ripple_boost
Boost::system
Boost::thread)
# workaround for xcode 10.2 and boost < 1.69
# once we require Boost 1.69 or higher, this can be removed
# see: https://github.com/boostorg/asio/commit/43874d5
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0.1.10010043 AND
Boost_VERSION LESS 106900)
target_compile_definitions (opts INTERFACE BOOST_ASIO_HAS_STD_STRING_VIEW)
endif ()
#[===================================================================[
NIH dep: openssl
#]===================================================================]

View File

@@ -98,7 +98,9 @@ struct Buffer_test : beast::unit_test::suite
x = b0;
BEAST_EXPECT (x == b0);
BEAST_EXPECT (sane (x));
#if defined(__clang__) && !defined(__APPLE__) && (__clang_major__ >= 7)
#if defined(__clang__) && \
(!defined(__APPLE__) && (__clang_major__ >= 7)) || \
(defined(__APPLE__) && (__apple_build_version__ >= 10010043))
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wself-assign-overloaded"
#endif
@@ -109,7 +111,10 @@ struct Buffer_test : beast::unit_test::suite
y = y;
BEAST_EXPECT (y == b3);
BEAST_EXPECT (sane (y));
#if defined(__clang__) && !defined(__APPLE__) && (__clang_major__ >= 7)
#if defined(__clang__) && \
(!defined(__APPLE__) && (__clang_major__ >= 7)) || \
(defined(__APPLE__) && (__apple_build_version__ >= 10010043))
#pragma clang diagnostic pop
#endif
}
@@ -117,7 +122,7 @@ struct Buffer_test : beast::unit_test::suite
// Check move constructor & move assignments:
{
testcase ("Move Construction / Assignment");
static_assert(std::is_nothrow_move_constructible<Buffer>::value, "");
static_assert(std::is_nothrow_move_assignable<Buffer>::value, "");