diff options
-rw-r--r-- | CMakeLists.txt | 13 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | tests/core_proxy/core_proxy.h | 3 | ||||
-rw-r--r-- | tests/unit_tests/ban.cpp | 3 |
4 files changed, 13 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d4f4f24b..020aa0c37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,6 +80,7 @@ endif() if (ARM_ID STREQUAL "aarch64") set(ARM 1) set(ARM8 1) + set(BUILD_SHARED_LIBS ON) endif() if(WIN32 OR ARM) @@ -182,10 +183,11 @@ option(STATIC "Link libraries statically" ${DEFAULT_STATIC}) # This is a CMake built-in switch that concerns internal libraries if (NOT DEFINED BUILD_SHARED_LIBS AND NOT STATIC AND CMAKE_BUILD_TYPE_LOWER STREQUAL "debug") - set(BUILD_SHARED_LIBS ON CACHE STRING "Build internal libs as shared") + set(BUILD_SHARED_LIBS ON) endif() + if (BUILD_SHARED_LIBS) - message(STATUS "Building internal libraries as shared") + message(STATUS "Building internal libraries with position independent code") set(PIC_FLAG "-fPIC") else() message(STATUS "Building internal libraries as static") @@ -378,9 +380,6 @@ else() set(COVERAGE_FLAGS "-fprofile-arcs -ftest-coverage --coverage") endif() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${ARCH_FLAG} ${COVERAGE_FLAGS} ${PIC_FLAG}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG} ${COVERAGE_FLAGS} ${PIC_FLAG}") - # With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that # is fixed in the code (Issue #847), force compiler to be conservative. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-strict-aliasing") @@ -408,8 +407,8 @@ else() message(STATUS "AES support disabled") endif() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${ARCH_FLAG} ${COVERAGE_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG} ${COVERAGE_FLAGS}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${ARCH_FLAG} ${COVERAGE_FLAGS} ${PIC_FLAG}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG} ${COVERAGE_FLAGS} ${PIC_FLAG}") # With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that # is fixed in the code (Issue #847), force compiler to be conservative. @@ -145,7 +145,7 @@ library archives (`.a`). | Graphviz | any | NO | `graphviz` | `graphviz` | YES | documentation | [^] On Debian/Ubuntu `libgtest-dev` only includes sources and headers. You must -build the library binary manually. +build the library binary manually. This can be done with the following command ```sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv libg* /usr/lib/ ``` ### Build instructions diff --git a/tests/core_proxy/core_proxy.h b/tests/core_proxy/core_proxy.h index a265ef1ce..31e876d06 100644 --- a/tests/core_proxy/core_proxy.h +++ b/tests/core_proxy/core_proxy.h @@ -89,5 +89,8 @@ namespace tests uint64_t get_target_blockchain_height() const { return 1; } size_t get_block_sync_size() const { return BLOCKS_SYNCHRONIZING_DEFAULT_COUNT; } virtual void on_transaction_relayed(const cryptonote::blobdata& tx) {} + bool get_testnet() const { return false; } + bool get_pool_transaction(const crypto::hash& id, cryptonote::transaction& tx) const { return false; } + bool get_blocks(uint64_t start_offset, size_t count, std::list<cryptonote::block>& blocks, std::list<cryptonote::transaction>& txs) const { return false; } }; } diff --git a/tests/unit_tests/ban.cpp b/tests/unit_tests/ban.cpp index e82661545..6b3f029d1 100644 --- a/tests/unit_tests/ban.cpp +++ b/tests/unit_tests/ban.cpp @@ -64,6 +64,9 @@ public: uint64_t get_target_blockchain_height() const { return 1; } size_t get_block_sync_size() const { return BLOCKS_SYNCHRONIZING_DEFAULT_COUNT; } virtual void on_transaction_relayed(const cryptonote::blobdata& tx) {} + bool get_testnet() const { return false; } + bool get_pool_transaction(const crypto::hash& id, cryptonote::transaction& tx) const { return false; } + bool get_blocks(uint64_t start_offset, size_t count, std::list<cryptonote::block>& blocks, std::list<cryptonote::transaction>& txs) const { return false; } }; typedef nodetool::node_server<cryptonote::t_cryptonote_protocol_handler<test_core>> Server; |