Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add date #114

Merged
merged 3 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* breakpad
* bzip2
* capstone
* date
* double-conversion
* fatal
* fbthrift
Expand Down
2 changes: 2 additions & 0 deletions project/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ set(ALL_TARGETS
bzip2
cachelib
cyrus-sasl
date
double-conversion
duckdb
fatal
Expand Down Expand Up @@ -255,6 +256,7 @@ maybe_add_dependencies(lzma gettext)
maybe_add_dependencies(libev gettext)
maybe_add_dependencies(libevent libtool openssl)
maybe_add_dependencies(libcurl libtool openssl)
maybe_add_dependencies(date libcurl)
maybe_add_dependencies(gperf libtool)
maybe_add_dependencies(cyrus-sasl openssl berkeleydb automake libtool)
maybe_add_dependencies(ldap berkeleydb libtool openssl cyrus-sasl)
Expand Down
2 changes: 1 addition & 1 deletion project/externals/boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ endif()

ExternalProject_Add(
${name}
URL https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.gz
URL https://cytranet.dl.sourceforge.net/project/boost/boost/1.81.0/boost_1_81_0.tar.gz
URL_HASH MD5=4bf02e84afb56dfdccd1e6aec9911f4b
DOWNLOAD_NAME boost-1.81.0.tar.gz
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/${name}
Expand Down
41 changes: 41 additions & 0 deletions project/externals/date.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright (c) 2024 vesoft inc. All rights reserved.
#
# This source code is licensed under Apache 2.0 License.

set(name date)
set(source_dir ${CMAKE_CURRENT_BINARY_DIR}/${name}/source)
ExternalProject_Add(
${name}
URL https://github.com/HowardHinnant/date/archive/refs/tags/v3.0.1.tar.gz
URL_HASH MD5=78902f47f7931a3ae8a320e0dea1f20a
DOWNLOAD_NAME date-3.0.1.tar.gz
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/${name}
TMP_DIR ${BUILD_INFO_DIR}
STAMP_DIR ${BUILD_INFO_DIR}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
SOURCE_DIR ${source_dir}
PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/patches/${name}-3.0.1.patch
CMAKE_ARGS
${common_cmake_args}
-DBUILD_TZ_LIB=ON
-DENABLE_DATE_TESTING=OFF
-DBUILD_SHARED_LIBS=ON
-DCMAKE_BUILD_TYPE=Release
BUILD_IN_SOURCE 1
BUILD_COMMAND make -s -j${BUILDING_JOBS_NUM}
INSTALL_COMMAND make -s -j${BUILDING_JOBS_NUM} install
LOG_CONFIGURE TRUE
LOG_BUILD TRUE
LOG_INSTALL TRUE
)

ExternalProject_Add_Step(${name} clean
EXCLUDE_FROM_MAIN TRUE
ALWAYS TRUE
DEPENDEES configure
COMMAND make clean -j
COMMAND rm -f ${BUILD_INFO_DIR}/${name}-build
WORKING_DIRECTORY ${source_dir}
)

ExternalProject_Add_StepTargets(${name} clean)
13 changes: 13 additions & 0 deletions project/patches/date-3.0.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- CMakeLists.txt 2024-01-05 14:59:42.233660898 +0800
+++ src/CMakeLists.txt 2024-01-08 14:07:39.058107005 +0800
@@ -153,8 +153,8 @@
endif( )
if( NOT USE_SYSTEM_TZ_DB AND NOT MANUAL_TZ_DB )
find_package( CURL REQUIRED )
- target_include_directories( date-tz SYSTEM PRIVATE ${CURL_INCLUDE_DIRS} )
- target_link_libraries( date-tz PRIVATE ${CURL_LIBRARIES} )
+ target_include_directories( date-tz SYSTEM PRIVATE ${CURL_DIR}/../../../include )
+ target_link_libraries( date-tz PRIVATE ${CURL_DIR}/../../../lib )
endif( )
endif( )

Loading