From 24b79b9a462c9be46cd56a5631d39eea7c2426ce Mon Sep 17 00:00:00 2001 From: serkixenos Date: Mon, 9 Nov 2020 13:47:44 +0100 Subject: [PATCH] Build optimizations, simplify dependancy tree --- libraries/app/CMakeLists.txt | 2 +- libraries/chain/CMakeLists.txt | 12 ++++++------ programs/delayed_node/CMakeLists.txt | 2 +- programs/witness_node/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libraries/app/CMakeLists.txt b/libraries/app/CMakeLists.txt index 91b931d3..52460c77 100644 --- a/libraries/app/CMakeLists.txt +++ b/libraries/app/CMakeLists.txt @@ -15,7 +15,7 @@ add_library( graphene_app #target_link_libraries( graphene_app graphene_market_history graphene_account_history graphene_chain fc graphene_db graphene_net graphene_utilities graphene_debug_witness ) target_link_libraries( graphene_app PUBLIC graphene_net graphene_utilities - graphene_account_history graphene_accounts_list graphene_affiliate_stats graphene_bookie graphene_debug_witness graphene_delayed_node graphene_elasticsearch graphene_es_objects graphene_generate_genesis graphene_market_history peerplays_sidechain graphene_snapshot graphene_witness ) + graphene_account_history graphene_accounts_list graphene_affiliate_stats graphene_bookie graphene_debug_witness graphene_elasticsearch graphene_es_objects graphene_generate_genesis graphene_market_history ) target_include_directories( graphene_app PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" diff --git a/libraries/chain/CMakeLists.txt b/libraries/chain/CMakeLists.txt index 8e3fd5f5..4054878c 100755 --- a/libraries/chain/CMakeLists.txt +++ b/libraries/chain/CMakeLists.txt @@ -11,15 +11,15 @@ file(GLOB PROTOCOL_HEADERS "include/graphene/chain/protocol/*.hpp") file(GLOB CPP_FILES "*.cpp") file(GLOB PROTOCOL_CPP_FILES "protocol/*.cpp") -if( GRAPHENE_DISABLE_UNITY_BUILD ) +#if( GRAPHENE_DISABLE_UNITY_BUILD ) list(FILTER CPP_FILES EXCLUDE REGEX "[/]database[.]cpp$") #message ("--- ${CPP_FILES}") message( STATUS "Graphene database unity build disabled" ) -else( GRAPHENE_DISABLE_UNITY_BUILD ) - list(FILTER CPP_FILES EXCLUDE REGEX ".*db_.*[.]cpp$") - #message ("--- ${CPP_FILES}") - message( STATUS "Graphene database unity build enabled" ) -endif( GRAPHENE_DISABLE_UNITY_BUILD ) +#else( GRAPHENE_DISABLE_UNITY_BUILD ) +# list(FILTER CPP_FILES EXCLUDE REGEX ".*db_.*[.]cpp$") +# #message ("--- ${CPP_FILES}") +# message( STATUS "Graphene database unity build enabled" ) +#endif( GRAPHENE_DISABLE_UNITY_BUILD ) add_library( graphene_chain ${CPP_FILES} diff --git a/programs/delayed_node/CMakeLists.txt b/programs/delayed_node/CMakeLists.txt index 973d98e3..7e610ace 100644 --- a/programs/delayed_node/CMakeLists.txt +++ b/programs/delayed_node/CMakeLists.txt @@ -10,7 +10,7 @@ if( GPERFTOOLS_FOUND ) endif() target_link_libraries( delayed_node - PRIVATE graphene_app graphene_egenesis_full ${PLATFORM_SPECIFIC_LIBS} ) + PRIVATE graphene_app graphene_egenesis_full graphene_delayed_node ${PLATFORM_SPECIFIC_LIBS} ) install( TARGETS delayed_node diff --git a/programs/witness_node/CMakeLists.txt b/programs/witness_node/CMakeLists.txt index e8c7a54e..806330d6 100644 --- a/programs/witness_node/CMakeLists.txt +++ b/programs/witness_node/CMakeLists.txt @@ -11,7 +11,7 @@ endif() # We have to link against graphene_debug_witness because deficiency in our API infrastructure doesn't allow plugins to be fully abstracted #246 target_link_libraries( witness_node - PRIVATE graphene_app graphene_egenesis_full ${PLATFORM_SPECIFIC_LIBS} ) + PRIVATE graphene_app graphene_egenesis_full graphene_snapshot graphene_witness peerplays_sidechain ${PLATFORM_SPECIFIC_LIBS} ) # also add dependencies to graphene_generate_genesis graphene_generate_uia_sharedrop_genesis if you want those plugins install( TARGETS diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b02edbd4..6ff915a9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -26,7 +26,7 @@ target_link_libraries( chain_bench PRIVATE graphene_tests_common ${PLATFORM_SPEC file(GLOB APP_SOURCES "app/*.cpp") add_executable( app_test ${APP_SOURCES} ) -target_link_libraries( app_test PRIVATE graphene_tests_common ${PLATFORM_SPECIFIC_LIBS} ) +target_link_libraries( app_test PRIVATE graphene_tests_common graphene_witness ${PLATFORM_SPECIFIC_LIBS} ) file(GLOB INTENSE_SOURCES "intense/*.cpp") add_executable( intense_test ${INTENSE_SOURCES} ) @@ -38,7 +38,7 @@ target_link_libraries( betting_test PRIVATE graphene_tests_common ${PLATFORM_SPE file(GLOB PEERPLAYS_SIDECHAIN_TESTS "peerplays_sidechain/*.cpp") add_executable( peerplays_sidechain_test ${PEERPLAYS_SIDECHAIN_TESTS} ) -target_link_libraries( peerplays_sidechain_test PRIVATE graphene_tests_common ${PLATFORM_SPECIFIC_LIBS} ) +target_link_libraries( peerplays_sidechain_test PRIVATE graphene_tests_common peerplays_sidechain ${PLATFORM_SPECIFIC_LIBS} ) file(GLOB TOURNAMENT_TESTS "tournament/*.cpp") add_executable( tournament_test ${TOURNAMENT_TESTS} ) @@ -53,7 +53,7 @@ add_executable( cli_test ${CLI_SOURCES} ) if(WIN32) list(APPEND PLATFORM_SPECIFIC_LIBS ws2_32) endif() -target_link_libraries( cli_test PRIVATE graphene_wallet graphene_tests_common ${PLATFORM_SPECIFIC_LIBS} ) +target_link_libraries( cli_test PRIVATE graphene_wallet graphene_tests_common graphene_witness ${PLATFORM_SPECIFIC_LIBS} ) if(MSVC) set_source_files_properties( cli/main.cpp PROPERTIES COMPILE_FLAGS "/bigobj" ) endif(MSVC)