Eliminate objective-c sources

This commit is contained in:
Mike Ellery
2018-04-05 18:51:20 -07:00
committed by Nikolaos D. Bougalis
parent f8fb1f6c7d
commit d65e208a99
6 changed files with 14 additions and 76 deletions

View File

@@ -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()

View File

@@ -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}")

View File

@@ -32,18 +32,22 @@
#if BEAST_MAC || BEAST_IOS
#if BEAST_IOS
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CoreData/CoreData.h>
#import <MobileCoreServices/MobileCoreServices.h>
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CoreData/CoreData.h>
#import <MobileCoreServices/MobileCoreServices.h>
#endif
#include <sys/fcntl.h>
#else
#define Point CarbonDummyPointName
#define Component CarbonDummyCompName
#import <Cocoa/Cocoa.h>
#import <CoreAudio/HostTime.h>
#undef Point
#undef Component
#ifdef __OBJC__
#define Point CarbonDummyPointName
#define Component CarbonDummyCompName
#import <Cocoa/Cocoa.h>
#import <CoreAudio/HostTime.h>
#undef Point
#undef Component
#endif
#include <sys/dir.h>
#endif

View File

@@ -1,30 +0,0 @@
//------------------------------------------------------------------------------
/*
This file is part of Beast: https://github.com/vinniefalco/Beast
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
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

View File

@@ -17,10 +17,7 @@
*/
//==============================================================================
#if ! BEAST_COMPILE_OBJECTIVE_CPP
// MUST come first!
#include <BeastConfig.h>
#include <ripple/beast/core/core.unity.cpp>
#endif

View File

@@ -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 <ripple/unity/beast.cpp>