Skip to content

Commit 34b8b92

Browse files
authored
build: fetch Boost from OSS and define network test macro globally (#438)
* build: fetch Boost from OSS * build: define network test macro globally
1 parent cd0d3ce commit 34b8b92

8 files changed

Lines changed: 13 additions & 53 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@ if(PAIMON_ENABLE_JINDO)
7373
add_definitions(-DPAIMON_ENABLE_JINDO)
7474
endif()
7575
if(PAIMON_ENABLE_NETWORK_TESTS)
76-
if(NOT PAIMON_BUILD_TESTS)
77-
message(FATAL_ERROR "PAIMON_ENABLE_NETWORK_TESTS requires PAIMON_BUILD_TESTS=ON")
78-
endif()
76+
add_definitions(-DPAIMON_ENABLE_NETWORK_TESTS)
7977
endif()
8078
if(PAIMON_USE_CXX11_ABI)
8179
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=1)

LICENSE

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -462,40 +462,6 @@ License: https://www.apache.org/licenses/LICENSE-2.0
462462

463463
--------------------------------------------------------------------------------
464464

465-
This product includes code from boost.
466-
467-
* Boost source code in third_party/boost/ directory
468-
469-
Copyright: 2003-2023 The Boost Authors
470-
Home page: https://www.boost.org/
471-
License: https://www.boost.org/LICENSE_1_0.txt
472-
473-
Boost Software License - Version 1.0 - August 17th, 2003
474-
475-
Permission is hereby granted, free of charge, to any person or organization
476-
obtaining a copy of the software and accompanying documentation covered by
477-
this license (the "Software") to use, reproduce, display, distribute,
478-
execute, and transmit the Software, and to prepare derivative works of the
479-
Software, and to permit third-parties to whom the Software is furnished to
480-
do so, all subject to the following:
481-
482-
The copyright notices in the Software and this entire statement, including
483-
the above license grant, this restriction and the following disclaimer,
484-
must be included in all copies of the Software, in whole or in part, and
485-
all derivative works of the Software, unless such copies or derivative
486-
works are solely in the form of machine-executable object code generated by
487-
a source language processor.
488-
489-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
490-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
491-
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
492-
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
493-
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
494-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
495-
DEALINGS IN THE SOFTWARE.
496-
497-
--------------------------------------------------------------------------------
498-
499465
This product includes code from LucenePlusPlus.
500466

501467
* LucenePlusPlus utility in src/paimon/global_index/lucene/ directory

NOTICE

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ Copyright (C) 2012-2023 Yann Collet
2929
This product includes software from CRoaring project (Apache 2.0)
3030
Copyright 2016-2022 The CRoaring authors
3131

32-
This product includes software from boost project (BSL 1.0)
33-
Copyright 2003-2023 The Boost authors
34-
3532
This product includes software from LucenePlusPlus project (Apache 2.0)
3633
Copyright 2009-2014 Alan Wright.
3734

cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,16 @@ else()
305305
)
306306
endif()
307307

308+
if(DEFINED ENV{PAIMON_BOOST_URL})
309+
set(BOOST_SOURCE_URL "$ENV{PAIMON_BOOST_URL}")
310+
elseif(EXISTS "${THIRDPARTY_DIR}/${PAIMON_BOOST_PKG_NAME}")
311+
set_urls(BOOST_SOURCE_URL "${THIRDPARTY_DIR}/${PAIMON_BOOST_PKG_NAME}")
312+
else()
313+
set_urls(BOOST_SOURCE_URL
314+
"https://paimon-cpp.oss-cn-beijing.aliyuncs.com/thirdparty/boost/${PAIMON_BOOST_PKG_NAME}"
315+
)
316+
endif()
317+
308318
if(APPLE)
309319
set(JINDOSDK_C_DYNAMIC_LIB_NAME "jindosdk_c.${PAIMON_JINDOSDK_C_BUILD_VERSION}")
310320
set(JINDOSDK_C_DYNAMIC_LIB_FILE "lib${JINDOSDK_C_DYNAMIC_LIB_NAME}.dylib")
@@ -937,7 +947,7 @@ macro(build_boost)
937947
"using ${BOOST_TOOLSET} : : \"${CMAKE_CXX_COMPILER}\" ;\n")
938948

939949
externalproject_add(boost_ep
940-
URL "${THIRDPARTY_DIR}/boost/${PAIMON_BOOST_PKG_NAME}"
950+
URL ${BOOST_SOURCE_URL}
941951
URL_HASH "SHA256=${PAIMON_BOOST_BUILD_SHA256_CHECKSUM}"
942952
CONFIGURE_COMMAND ${BOOST_PREFIX}/src/boost_ep/bootstrap.sh
943953
--with-libraries=date_time,filesystem,iostreams,regex,system,thread,chrono,atomic

src/paimon/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -851,8 +851,4 @@ if(PAIMON_BUILD_TESTS)
851851
EXTRA_INCLUDES
852852
${JINDOSDK_INCLUDE_DIR})
853853

854-
if(PAIMON_ENABLE_NETWORK_TESTS)
855-
target_compile_definitions(paimon-fs-test PRIVATE PAIMON_ENABLE_NETWORK_TESTS)
856-
endif()
857-
858854
endif()

test/inte/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ if(PAIMON_BUILD_TESTS)
4747
${TEST_STATIC_LINK_LIBS}
4848
test_utils_static
4949
${GTEST_LINK_TOOLCHAIN})
50-
if(PAIMON_ENABLE_NETWORK_TESTS)
51-
target_compile_definitions(paimon-write-and-read-inte-test
52-
PRIVATE PAIMON_ENABLE_NETWORK_TESTS)
53-
endif()
5450

5551
add_paimon_test(clean_inte_test
5652
STATIC_LINK_LIBS

third_party/boost/boost_1_66_0.tar.gz

Lines changed: 0 additions & 3 deletions
This file was deleted.

third_party/versions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ PAIMON_JIEBA_BUILD_VERSION=v5.6.0
114114
PAIMON_JIEBA_BUILD_SHA256_CHECKSUM=e6e517b778e0f4a99cbed1ee3eaa041616b74bc685e03a6ca08887ad9cedfe49
115115
PAIMON_JIEBA_PKG_NAME=jieba-${PAIMON_JIEBA_BUILD_VERSION}.tar.gz
116116

117-
# Boost source package is bundled at third_party/boost/
118117
PAIMON_BOOST_BUILD_VERSION=1_66_0
119118
PAIMON_BOOST_BUILD_SHA256_CHECKSUM=28e9200637800fbfd1292b2c6876189dba7e8e1c5282c71fac6515e96f7af2b0
120119
PAIMON_BOOST_PKG_NAME=boost_${PAIMON_BOOST_BUILD_VERSION}.tar.gz
@@ -147,4 +146,5 @@ DEPENDENCIES=(
147146
"PAIMON_LUCENE_URL ${PAIMON_LUCENE_PKG_NAME} ${THIRDPARTY_MIRROR_URL}https://github.com/luceneplusplus/LucenePlusPlus/archive/refs/tags/rel_${PAIMON_LUCENE_BUILD_VERSION}.tar.gz"
148147
"PAIMON_LIMONP_URL ${PAIMON_LIMONP_PKG_NAME} ${THIRDPARTY_MIRROR_URL}https://github.com/yanyiwu/limonp/archive/refs/tags/v${PAIMON_LIMONP_BUILD_VERSION}.tar.gz"
149148
"PAIMON_JIEBA_URL ${PAIMON_JIEBA_PKG_NAME} ${THIRDPARTY_MIRROR_URL}https://github.com/yanyiwu/cppjieba/archive/refs/tags/${PAIMON_JIEBA_BUILD_VERSION}.tar.gz"
149+
"PAIMON_BOOST_URL ${PAIMON_BOOST_PKG_NAME} https://paimon-cpp.oss-cn-beijing.aliyuncs.com/thirdparty/boost/${PAIMON_BOOST_PKG_NAME}"
150150
)

0 commit comments

Comments
 (0)