From 513a38d8a37cb0cd02a34f9b677b49eef17de4e6 Mon Sep 17 00:00:00 2001 From: Yingchun Lai Date: Thu, 28 Sep 2023 01:03:03 +0800 Subject: [PATCH] Revert "3rd" This reverts commit 3f80573f16099682ecc180429295e44b24b73d6f. --- CMakeLists.txt | 2 +- run.sh | 2 +- .../test/block_service_manager_test.cpp | 4 --- .../test/load_from_private_log_test.cpp | 1 - src/replica/replica_http_service.h | 7 ---- src/replica/test/mutation_log_test.cpp | 1 - src/utils/alloc.h | 1 + thirdparty/CMakeLists.txt | 33 +++++-------------- 8 files changed, 12 insertions(+), 39 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12c87dadd2..fee1807892 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,8 +15,8 @@ # specific language governing permissions and limitations # under the License. -cmake_minimum_required(VERSION 3.11.0) project(pegasus) +cmake_minimum_required(VERSION 3.11.0) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # require at least gcc 7.0.0 diff --git a/run.sh b/run.sh index 4926fd445a..2672094f7c 100755 --- a/run.sh +++ b/run.sh @@ -227,7 +227,7 @@ function run_build() fi if [ "$(uname)" == "Darwin" ]; then - CMAKE_OPTIONS="${CMAKE_OPTIONS} -DMACOS_OPENSSL_ROOT_DIR=$(brew --prefix openssl@1.1)" + CMAKE_OPTIONS="${CMAKE_OPTIONS} -DMACOS_OPENSSL_ROOT_DIR=/usr/local/opt/openssl" fi if [ ! -z "${SANITIZER}" ]; then diff --git a/src/block_service/test/block_service_manager_test.cpp b/src/block_service/test/block_service_manager_test.cpp index b2c83c9a3e..a059062b25 100644 --- a/src/block_service/test/block_service_manager_test.cpp +++ b/src/block_service/test/block_service_manager_test.cpp @@ -19,9 +19,6 @@ // IWYU pragma: no_include // IWYU pragma: no_include #include -#include -#include -#include #include #include #include @@ -33,7 +30,6 @@ #include "block_service_mock.h" #include "metadata_types.h" #include "test_util/test_util.h" -#include "utils/env.h" #include "utils/error_code.h" #include "utils/filesystem.h" #include "utils/test_macros.h" diff --git a/src/replica/duplication/test/load_from_private_log_test.cpp b/src/replica/duplication/test/load_from_private_log_test.cpp index 1cbdde0305..e44bb74a3d 100644 --- a/src/replica/duplication/test/load_from_private_log_test.cpp +++ b/src/replica/duplication/test/load_from_private_log_test.cpp @@ -54,7 +54,6 @@ #include "utils/filesystem.h" #include "utils/flags.h" #include "utils/fmt_logging.h" -#include "utils/ports.h" #define BOOST_NO_CXX11_SCOPED_ENUMS #include diff --git a/src/replica/replica_http_service.h b/src/replica/replica_http_service.h index 7392d03bff..35b2352ac1 100644 --- a/src/replica/replica_http_service.h +++ b/src/replica/replica_http_service.h @@ -58,13 +58,6 @@ class replica_http_service : public http_server_base deregister_http_call("replica/manual_compaction"); } - ~replica_http_service() - { - deregister_http_call("replica/duplication"); - deregister_http_call("replica/data_version"); - deregister_http_call("replica/manual_compaction"); - } - std::string path() const override { return "replica"; } void query_duplication_handler(const http_request &req, http_response &resp); diff --git a/src/replica/test/mutation_log_test.cpp b/src/replica/test/mutation_log_test.cpp index 0304edd9ab..70f8a8c695 100644 --- a/src/replica/test/mutation_log_test.cpp +++ b/src/replica/test/mutation_log_test.cpp @@ -26,7 +26,6 @@ #include "replica/mutation_log.h" -#include // IWYU pragma: no_include // IWYU pragma: no_include // IWYU pragma: no_include diff --git a/src/utils/alloc.h b/src/utils/alloc.h index 06d72185a7..8541d98e8a 100644 --- a/src/utils/alloc.h +++ b/src/utils/alloc.h @@ -17,6 +17,7 @@ #pragma once +#include #include #include #include diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 6b2f505137..5e489d03f5 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -17,8 +17,8 @@ # under the License. ############################################################################## -cmake_minimum_required(VERSION 3.11.0) project(pegasus_thirdparties) +cmake_minimum_required(VERSION 3.11.0) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # require at least gcc 7.0.0 @@ -33,11 +33,6 @@ if (APPLE) endif() endif() -# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24: -if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") - cmake_policy(SET CMP0135 NEW) -endif() - include(ExternalProject) include(CheckCXXCompilerFlag) @@ -336,30 +331,20 @@ ExternalProject_Add(nlohmann_json BUILD_IN_SOURCE 1 ) -ExternalProject_Add(abseil - URL https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.1.tar.gz - URL_MD5 84665b6daa5dda7c9082b1a00057457a - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${TP_OUTPUT} - -DCMAKE_CXX_STANDARD=17 - -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} - -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} - DEPENDS googletest - ) - -# TODO(yingchun): check necessary of 'PATCH_COMMAND patch -p0 < ${TP_DIR}/fix_s2_for_aarch64.patch' ExternalProject_Add(s2geometry - URL https://github.com/google/s2geometry/archive/refs/tags/v0.10.0.tar.gz - URL_MD5 c68f3c5d326dde9255681b9201393a9f - DEPENDS abseil + URL ${OSS_URL_PREFIX}/s2geometry-e8d16637a467d9f096a92a6d81a50a9b747ca828.zip + https://github.com/neverchanje/s2geometry/archive/e8d16637a467d9f096a92a6d81a50a9b747ca828.zip + URL_MD5 75cc44c9c31382083d8a2d0e42590788 + PATCH_COMMAND patch -p0 < ${TP_DIR}/fix_s2_for_aarch64.patch CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${TP_OUTPUT} - -DWITH_GFLAGS=OFF - -DWITH_GLOG=OFF + -DGTEST_ROOT=${googletest_SRC}/googletest -DBUILD_SHARED_LIBS=OFF + -DBUILD_PYTHON=OFF + -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF - -DWITH_PYTHON=OFF - -DCMAKE_CXX_STANDARD=17 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} + DEPENDS googletest ) option(USE_JEMALLOC "use jemalloc" OFF)