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

feat: offline with git submodule #3787

Merged
merged 16 commits into from
Mar 4, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "gflags"]
path = contrib/gflags
url = https://github.com/gflags/gflags
[submodule "contrib/rapidjson"]
dl239 marked this conversation as resolved.
Show resolved Hide resolved
path = contrib/rapidjson
url = https://github.com/Tencent/rapidjson.git
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,7 @@ else()
set(RocksDB_LIB ${RocksDB_LIBRARY})
endif()

# third party sources
include(FetchContent)
set(FETCHCONTENT_QUIET OFF)
include(farmhash)
include(rapidjson)

# contrib libs
add_subdirectory(contrib EXCLUDE_FROM_ALL)
Expand Down Expand Up @@ -298,6 +294,7 @@ include_directories(
${LLVM_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${CMAKE_PREFIX_PATH}/include
${PROJECT_SOURCE_DIR}/contrib/rapidjson/include
QiChenX marked this conversation as resolved.
Show resolved Hide resolved
)

link_directories(
Expand Down
17 changes: 0 additions & 17 deletions cmake/farmhash.cmake

This file was deleted.

9 changes: 0 additions & 9 deletions cmake/rapidjson.cmake

This file was deleted.

2 changes: 2 additions & 0 deletions contrib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ function(add_contrib cmake_folder)
endfunction()

add_contrib(simdjson)
add_contrib(rapidjson)
add_contrib(farmhash)

if (BUILD_SHARED_LIBS)
add_contrib(gflags-cmake gflags)
Expand Down
12 changes: 12 additions & 0 deletions contrib/farmhash/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

add_library(farmhash ${CMAKE_CURRENT_SOURCE_DIR}/src/farmhash.cc)
target_include_directories(farmhash SYSTEM PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src/")
set_target_properties(farmhash
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
target_compile_definitions(farmhash
PUBLIC NAMESPACE_FOR_HASH_FUNCTIONS=farmhash)

add_library(op_contrib::farmhash ALIAS farmhash)