Tidy up includes and add modules to the classic build:

An alternative to the unity build, the classic build compiles each
translation unit individually. This adds more modules to the classic build:

* Remove unity header app.h
* Add missing includes as needed
* Remove obsolete NodeStore backend code
* Add app/, core/, crypto/, json/, net/, overlay/, peerfinder/ to classic build
This commit is contained in:
Vinnie Falco
2014-12-29 08:49:55 -08:00
parent 2e595830b3
commit df54b47cd0
412 changed files with 1736 additions and 1224 deletions

View File

@@ -18,9 +18,7 @@
//==============================================================================
#include <BeastConfig.h>
#include <ripple/rpc/Manager.h>
#include <ripple/unity/app.h>
#include <ripple/unity/websocket.h>
#include <ripple/app/impl/BasicApp.cpp>
#include <ripple/app/main/CollectorManager.cpp>
@@ -33,66 +31,3 @@
#include <ripple/app/main/Main.cpp>
#include <ripple/resource/Manager.h>
#include <beast/module/core/time/Time.h>
//------------------------------------------------------------------------------
namespace ripple {
int run (int argc, char** argv);
}
struct ProtobufLibrary
{
~ProtobufLibrary ()
{
google::protobuf::ShutdownProtobufLibrary();
}
};
// Must be outside the namespace for obvious reasons
//
int main (int argc, char** argv)
{
// Workaround for Boost.Context / Boost.Coroutine
// https://svn.boost.org/trac/boost/ticket/10657
(void)beast::Time::currentTimeMillis();
#if defined(__GNUC__) && !defined(__clang__)
auto constexpr gccver = (__GNUC__ * 100 * 100) +
(__GNUC_MINOR__ * 100) +
__GNUC_PATCHLEVEL__;
static_assert (gccver >= 40801,
"GCC version 4.8.1 or later is required to compile rippled.");
#endif
static_assert (BOOST_VERSION >= 105500,
"Boost version 1.55 or later is required to compile rippled");
//
// These debug heap calls do nothing in release or non Visual Studio builds.
//
// Checks the heap at every allocation and deallocation (slow).
//
//beast::Debug::setAlwaysCheckHeap (false);
// Keeps freed memory blocks and fills them with a guard value.
//
//beast::Debug::setHeapDelayedFree (false);
// At exit, reports all memory blocks which have not been freed.
//
#if RIPPLE_DUMP_LEAKS_ON_EXIT
beast::Debug::setHeapReportLeaks (true);
#else
beast::Debug::setHeapReportLeaks (false);
#endif
beast::SharedSingleton <ProtobufLibrary>::get ();
auto const result (ripple::run (argc, argv));
beast::basic_seconds_clock_main_hook();
return result;
}

View File

@@ -1,91 +0,0 @@
//------------------------------------------------------------------------------
/*
This file is part of rippled: https://github.com/ripple/rippled
Copyright (c) 2012, 2013 Ripple Labs
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.
*/
//==============================================================================
#ifndef RIPPLE_APP_H_INCLUDED
#define RIPPLE_APP_H_INCLUDED
#if BEAST_LINUX || BEAST_MAC || BEAST_BSD
#include <sys/resource.h>
#endif
#include <ripple/basics/ResolverAsio.h>
// VFALCO TODO Remove this include
#include <beast/module/sqlite/sqlite.h>
// Order matters here. If you get compile errors,
// reorder the include lines until the order is correct.
#include <ripple/basics/KeyCache.h>
#include <ripple/basics/TaggedCache.h>
#include <ripple/protocol/Indexes.h>
#include <ripple/app/data/Database.h>
#include <ripple/app/data/DatabaseCon.h>
#include <ripple/app/data/SqliteDatabase.h>
#include <ripple/app/data/DBInit.h>
#include <ripple/protocol/STTx.h>
#include <ripple/protocol/STLedgerEntry.h>
#include <ripple/app/tx/TransactionMeta.h>
#include <ripple/app/tx/Transaction.h>
#include <ripple/app/misc/AccountState.h>
#include <ripple/app/ledger/Ledger.h>
#include <ripple/app/main/LoadManager.h>
#include <ripple/app/misc/OrderBook.h>
#include <ripple/app/misc/AmendmentTable.h>
#include <ripple/app/misc/FeeVote.h>
#include <ripple/app/misc/IHashRouter.h>
#include <ripple/app/peers/ClusterNodeStatus.h>
#include <ripple/app/peers/UniqueNodeList.h>
#include <ripple/app/misc/Validations.h>
#include <ripple/app/peers/PeerSet.h>
#include <ripple/app/ledger/InboundLedger.h>
#include <ripple/app/ledger/InboundLedgers.h>
#include <ripple/app/ledger/AcceptedLedgerTx.h>
#include <ripple/app/ledger/AcceptedLedger.h>
#include <ripple/app/ledger/LedgerEntrySet.h>
#include <ripple/app/ledger/DirectoryEntryIterator.h>
#include <ripple/app/ledger/OrderBookIterator.h>
#include <ripple/app/tx/TransactionEngine.h>
#include <ripple/app/misc/CanonicalTXSet.h>
#include <ripple/app/ledger/LedgerHolder.h>
#include <ripple/app/ledger/LedgerHistory.h>
#include <ripple/app/ledger/LedgerCleaner.h>
#include <ripple/app/ledger/LedgerMaster.h>
#include <ripple/app/ledger/LedgerProposal.h>
#include <ripple/app/misc/NetworkOPs.h>
#include <ripple/app/tx/TransactionMaster.h>
#include <ripple/app/main/LocalCredentials.h>
#include <ripple/app/main/Application.h>
#include <ripple/app/ledger/OrderBookDB.h>
#include <ripple/app/tx/TransactionAcquire.h>
#include <ripple/app/tx/LocalTxs.h>
#include <ripple/app/consensus/DisputedTx.h>
#include <ripple/app/consensus/LedgerConsensus.h>
#include <ripple/app/ledger/LedgerTiming.h>
#include <ripple/app/paths/RippleState.h>
#include <ripple/app/paths/RippleLineCache.h>
#include <ripple/app/paths/PathRequest.h>
#include <ripple/app/paths/PathRequests.h>
#include <ripple/app/main/ParameterTable.h>
#include <ripple/app/paths/PathState.h>
#include <ripple/app/paths/RippleCalc.h>
#endif

View File

@@ -19,8 +19,6 @@
#include <BeastConfig.h>
#include <ripple/unity/app.h>
#include <ripple/app/data/Database.cpp>
#include <ripple/app/data/DatabaseCon.cpp>
#include <ripple/app/data/SqliteDatabase.cpp>

View File

@@ -19,8 +19,6 @@
#include <BeastConfig.h>
#include <ripple/unity/app.h>
#include <ripple/app/ledger/Ledger.cpp>
#include <ripple/app/ledger/Ledger.test.cpp>
#include <ripple/app/misc/AccountState.cpp>

View File

@@ -19,8 +19,6 @@
#include <BeastConfig.h>
#include <ripple/unity/app.h>
#include <ripple/app/book/tests/OfferStream.test.cpp>
#include <ripple/app/book/tests/Quality.test.cpp>
#include <ripple/app/ledger/InboundLedger.cpp>

View File

@@ -19,8 +19,6 @@
#include <BeastConfig.h>
#include <ripple/unity/app.h>
#include <ripple/app/ledger/LedgerTiming.cpp>
#include <ripple/app/ledger/AcceptedLedgerTx.cpp>
#include <ripple/app/main/LocalCredentials.cpp>

View File

@@ -19,8 +19,6 @@
#include <BeastConfig.h>
#include <ripple/unity/app.h>
#include <ripple/app/ledger/LedgerEntrySet.cpp>
#include <ripple/app/ledger/AcceptedLedger.cpp>
#include <ripple/app/ledger/DirectoryEntryIterator.cpp>

View File

@@ -19,8 +19,6 @@
#include <BeastConfig.h>
#include <ripple/unity/app.h>
#include <ripple/app/ledger/InboundLedgers.cpp>
#include <ripple/app/ledger/LedgerHistory.cpp>
#include <ripple/app/tx/TransactionAcquire.cpp>

View File

@@ -19,8 +19,6 @@
#include <BeastConfig.h>
#include <ripple/unity/app.h>
#ifdef _MSC_VER
#pragma warning (push)
#pragma warning (disable: 4309) // truncation of constant value
@@ -41,7 +39,6 @@
#include <ripple/app/paths/cursor/ReverseLiquidityForAccount.cpp>
#include <ripple/app/paths/cursor/RippleLiquidity.cpp>
#include <ripple/app/main/ParameterTable.cpp>
#include <ripple/app/paths/RippleLineCache.cpp>
#ifdef _MSC_VER

View File

@@ -19,8 +19,6 @@
#include <BeastConfig.h>
#include <ripple/unity/app.h>
#include <ripple/app/book/impl/BookTip.cpp>
#include <ripple/app/book/impl/OfferStream.cpp>
#include <ripple/app/book/impl/Quality.cpp>

View File

@@ -17,10 +17,6 @@
*/
//==============================================================================
#if DOXYGEN
#include <ripple/basics/README.md>
#endif
#include <BeastConfig.h>
#include <ripple/basics/impl/BasicConfig.cpp>
@@ -43,3 +39,7 @@
#include <ripple/basics/tests/RangeSet.test.cpp>
#include <ripple/basics/tests/StringUtilities.test.cpp>
#include <ripple/basics/tests/TaggedCache.test.cpp>
#if DOXYGEN
#include <ripple/basics/README.md>
#endif

View File

@@ -17,10 +17,6 @@
*/
//==============================================================================
#if DOXYGEN
#include <ripple/crypto/README.md>
#endif
#include <BeastConfig.h>
#include <ripple/crypto/impl/Base58.cpp>
@@ -37,3 +33,7 @@
#include <ripple/crypto/tests/CKey.test.cpp>
#include <ripple/crypto/tests/ECDSACanonical.test.cpp>
#if DOXYGEN
#include <ripple/crypto/README.md>
#endif

View File

@@ -17,17 +17,10 @@
*/
//==============================================================================
/** Add this to get the @ref ripple_net module.
@file ripple_net.cpp
@ingroup ripple_net
*/
#undef DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
#define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER /**/
#include <BeastConfig.h>
#include <ripple/net/impl/HTTPRequest.cpp>
#include <ripple/net/impl/HTTPClient.cpp>
#include <ripple/net/impl/InfoSub.cpp>

View File

@@ -17,13 +17,7 @@
*/
//==============================================================================
//#include <memory>
//#include <vector>
// backend support
#include <ripple/unity/leveldb.h>
#include <ripple/unity/hyperleveldb.h>
#include <ripple/unity/rocksdb.h>
#include <BeastConfig.h>
#include <ripple/nodestore/backend/HyperDBFactory.cpp>
#include <ripple/nodestore/backend/LevelDBFactory.cpp>

View File

@@ -17,10 +17,6 @@
*/
//==============================================================================
#if DOXYGEN
#include <ripple/overlay/README.md>
#endif
#include <BeastConfig.h>
#include <ripple/overlay/impl/ConnectAttempt.cpp>
@@ -32,3 +28,6 @@
#include <ripple/overlay/tests/short_read.test.cpp>
#include <ripple/overlay/tests/TMHello.test.cpp>
#if DOXYGEN
#include <ripple/overlay/README.md>
#endif

View File

@@ -17,10 +17,6 @@
*/
//==============================================================================
#if DOXYGEN
#include <ripple/peerfinder/README.md>
#endif
#include <BeastConfig.h>
#ifndef NDEBUG
@@ -30,7 +26,7 @@
#endif
#include <ripple/peerfinder/impl/Bootcache.cpp>
#include <ripple/peerfinder/impl/Config.cpp>
#include <ripple/peerfinder/impl/PeerfinderConfig.cpp>
#include <ripple/peerfinder/impl/Endpoint.cpp>
#include <ripple/peerfinder/impl/Manager.cpp>
#include <ripple/peerfinder/impl/SlotImp.cpp>
@@ -46,3 +42,7 @@
#include <ripple/peerfinder/sim/Tests.cpp>
#include <ripple/peerfinder/tests/Livecache.test.cpp>
#if DOXYGEN
#include <ripple/peerfinder/README.md>
#endif

View File

@@ -19,10 +19,6 @@
#include <BeastConfig.h>
#if DOXYGEN
#include <ripple/protocol/README.md>
#endif
#include <ripple/protocol/impl/BuildInfo.cpp>
#include <ripple/protocol/impl/ByteOrder.cpp>
#include <ripple/protocol/impl/ErrorCodes.cpp>
@@ -58,3 +54,7 @@
#include <ripple/protocol/tests/STAmount.test.cpp>
#include <ripple/protocol/tests/STObject.test.cpp>
#include <ripple/protocol/tests/STTx.test.cpp>
#if DOXYGEN
#include <ripple/protocol/README.md>
#endif

View File

@@ -17,10 +17,6 @@
*/
//==============================================================================
#if DOXYGEN
#include <ripple/resource/README.md>
#endif
#include <BeastConfig.h>
#include <ripple/resource/impl/Charge.cpp>
@@ -30,5 +26,8 @@
#include <ripple/resource/impl/Kind.h>
#include <ripple/resource/impl/Manager.cpp>
#include <ripple/resource/impl/Tuning.h>
#include <ripple/resource/tests/Logic.test.cpp>
#if DOXYGEN
#include <ripple/resource/README.md>
#endif

View File

@@ -19,8 +19,9 @@
#include <BeastConfig.h>
// Unfortunate but necessary since RPC handlers can literally do anything
#include <ripple/unity/app.h>
// This has to be included early to prevent an obscure MSVC compile error
#include <boost/asio/deadline_timer.hpp>
#include <ripple/protocol/JsonFields.h>
#include <ripple/rpc/RPCHandler.h>

View File

@@ -18,7 +18,6 @@
//==============================================================================
#include <BeastConfig.h>
#include <ripple/shamap/impl/SHAMap.cpp>
#include <ripple/shamap/impl/SHAMapDelta.cpp>
#include <ripple/shamap/impl/SHAMapItem.cpp>
@@ -26,7 +25,6 @@
#include <ripple/shamap/impl/SHAMapNodeID.cpp>
#include <ripple/shamap/impl/SHAMapSync.cpp>
#include <ripple/shamap/impl/SHAMapTreeNode.cpp>
#include <ripple/shamap/tests/FetchPack.test.cpp>
#include <ripple/shamap/tests/SHAMap.test.cpp>
#include <ripple/shamap/tests/SHAMapSync.test.cpp>

View File

@@ -18,10 +18,8 @@
//==============================================================================
#include <BeastConfig.h>
#include <ripple/validators/impl/ConnectionImp.cpp>
#include <ripple/validators/impl/Logic.cpp>
#include <ripple/validators/impl/Manager.cpp>
#include <ripple/validators/impl/StoreSqdb.cpp>
#include <ripple/validators/tests/Validators.test.cpp>