diff --git a/Builds/CMake/CMakeFuncs.cmake b/Builds/CMake/CMakeFuncs.cmake index 2dd0a3590..966b8b688 100644 --- a/Builds/CMake/CMakeFuncs.cmake +++ b/Builds/CMake/CMakeFuncs.cmake @@ -660,7 +660,6 @@ macro(setup_build_boilerplate) endif() if (APPLE) - add_definitions(-DBEAST_COMPILE_OBJECTIVE_CPP=1) add_compile_options( -Wno-deprecated-declarations -Wno-unused-function) endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index 15f9bc7aa..bc1bd051e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -444,10 +444,6 @@ add_with_props(rippled_src_all src/ripple/unity/snappy.cpp -I"${CMAKE_SOURCE_DIR}/"src/snappy/config ${no_unused_w}) -if (APPLE AND is_clang) - list(APPEND rippled_src_all src/ripple/unity/beastobjc.mm) -endif() - list(APPEND rippled_src_unity "${rippled_src_all}") list(APPEND rippled_src_nonunity "${rippled_src_all}") diff --git a/src/ripple/beast/core/BasicNativeHeaders.h b/src/ripple/beast/core/BasicNativeHeaders.h index 232d9e29b..676ece863 100644 --- a/src/ripple/beast/core/BasicNativeHeaders.h +++ b/src/ripple/beast/core/BasicNativeHeaders.h @@ -32,18 +32,22 @@ #if BEAST_MAC || BEAST_IOS #if BEAST_IOS - #import - #import - #import - #import + #ifdef __OBJC__ + #import + #import + #import + #import + #endif #include #else - #define Point CarbonDummyPointName - #define Component CarbonDummyCompName - #import - #import - #undef Point - #undef Component + #ifdef __OBJC__ + #define Point CarbonDummyPointName + #define Component CarbonDummyCompName + #import + #import + #undef Point + #undef Component + #endif #include #endif diff --git a/src/ripple/beast/core/core.unity.mm b/src/ripple/beast/core/core.unity.mm deleted file mode 100644 index 2875d3148..000000000 --- a/src/ripple/beast/core/core.unity.mm +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Portions of this file are from JUCE. - Copyright (c) 2013 - Raw Material Software Ltd. - Please visit http://www.juce.com - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#undef BEAST_COMPILE_OBJECTIVE_CPP -#define BEAST_COMPILE_OBJECTIVE_CPP 1 - -#include "beast_core.unity.cpp" - -#undef BEAST_COMPILE_OBJECTIVE_CPP -#define BEAST_COMPILE_OBJECTIVE_CPP 0 diff --git a/src/ripple/unity/beast.cpp b/src/ripple/unity/beast.cpp index 2e8349c03..7755b9eba 100644 --- a/src/ripple/unity/beast.cpp +++ b/src/ripple/unity/beast.cpp @@ -17,10 +17,7 @@ */ //============================================================================== -#if ! BEAST_COMPILE_OBJECTIVE_CPP - // MUST come first! #include #include -#endif diff --git a/src/ripple/unity/beastobjc.mm b/src/ripple/unity/beastobjc.mm deleted file mode 100644 index 6bebb8cf3..000000000 --- a/src/ripple/unity/beastobjc.mm +++ /dev/null @@ -1,28 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of rippled: https://github.com/ripple/rippled - Copyright (c) 2012, 2013 Ripple Labs Inc. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#if ! BEAST_COMPILE_OBJECTIVE_CPP -#error Incorrect compilation setting! -#endif - -#undef BEAST_COMPILE_OBJECTIVE_CPP -#define BEAST_COMPILE_OBJECTIVE_CPP 0 - -#include -