Skip to content

Commit

Permalink
3rd
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Oct 10, 2023
1 parent b3de6f1 commit 0da9243
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# specific language governing permissions and limitations
# under the License.

project(pegasus)
cmake_minimum_required(VERSION 3.11.0)
project(pegasus)

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# require at least gcc 7.0.0
Expand Down
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ function run_build()
fi

if [ "$(uname)" == "Darwin" ]; then
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DMACOS_OPENSSL_ROOT_DIR=/usr/local/opt/openssl"
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DMACOS_OPENSSL_ROOT_DIR=$(brew --prefix openssl@1.1)"
fi

if [ ! -z "${SANITIZER}" ]; then
Expand Down
33 changes: 24 additions & 9 deletions thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# under the License.
##############################################################################

project(pegasus_thirdparties)
cmake_minimum_required(VERSION 3.11.0)
project(pegasus_thirdparties)

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# require at least gcc 7.0.0
Expand All @@ -33,6 +33,11 @@ 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)

Expand Down Expand Up @@ -331,20 +336,30 @@ 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 ${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
URL https://github.com/google/s2geometry/archive/refs/tags/v0.10.0.tar.gz
URL_MD5 c68f3c5d326dde9255681b9201393a9f
DEPENDS abseil
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${TP_OUTPUT}
-DGTEST_ROOT=${googletest_SRC}/googletest
-DWITH_GFLAGS=OFF
-DWITH_GLOG=OFF
-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)
Expand Down

0 comments on commit 0da9243

Please sign in to comment.