Skip to content

Commit

Permalink
Move libgrape-lite from modules/graph/thirdparty to thirdparty
Browse files Browse the repository at this point in the history
Signed-off-by: vegetableysm <[email protected]>
  • Loading branch information
vegetableysm committed Aug 26, 2024
1 parent ba96b15 commit 53fd7d8
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ jobs:
-DBUILD_VINEYARD_HOSSEINMOEIN_DATAFRAME=ON \
-DBUILD_VINEYARD_FUSE=ON \
-DBUILD_VINEYARD_FUSE_PARQUET=ON \
-DBUILD_VINEYARD_GRAPH=ON \
-DBUILD_VINEYARD_GRAPH=OFF \
-DBUILD_VINEYARD_GRAPH_WITH_GAR=OFF \
-DBUILD_VINEYARD_TESTS_ALL=ON
Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
path = modules/graph/thirdparty/GraphAr
url = https://github.com/alibaba/GraphAr.git
shallow = true
[submodule "modules/graph/thirdparty/libgrape-lite"]
path = modules/graph/thirdparty/libgrape-lite
[submodule "thirdparty/libgrape-lite"]
path = thirdparty/libgrape-lite
url = https://github.com/alibaba/libgrape-lite.git
shallow = true
[submodule "modules/graph/thirdparty/powturbo"]
Expand Down
21 changes: 21 additions & 0 deletions modules/basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,27 @@ target_link_libraries(vineyard_basic PUBLIC vineyard_client
)
target_include_directories(vineyard_basic PUBLIC ${ARROW_INCLUDE_DIR})

# find_package(libgrapelite 0.3.4 QUIET)
if(LIBGRAPELITE_INCLUDE_DIRS)
message(STATUS "-- Found libgrape-lite: ${LIBGRAPELITE_INCLUDE_DIRS}")
target_include_directories(vineyard_basic PUBLIC ${LIBGRAPELITE_INCLUDE_DIRS})
else()
# use bundled libgrape-lite
message(STATUS "-- Building libgrape-lite from submodule: ${CMAKE_SOURCE_DIR}/thirdparty/libgrape-lite")
set(BUILD_LIBGRAPELITE_DOCS OFF CACHE BOOL "no libgrape-lite docs")
set(BUILD_LIBGRAPELITE_TESTS OFF CACHE BOOL "no libgrape-lite tests")
# use `add_subdirectory` to use the same CMAKE_BUILD_TYPE with vineyard itself and
# ensure the libgrapelite-targets-{debug/release}.cmake been generated during installation.
add_subdirectory("${CMAKE_SOURCE_DIR}/thirdparty/libgrape-lite"
"${CMAKE_SOURCE_DIR}/thirdparty/libgrape-lite"
)
target_include_directories(vineyard_basic PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/thirdparty/libgrape-lite>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/thirdparty/libgrape-lite/thirdparty>
$<INSTALL_INTERFACE:include>
)
endif()

# install bundled thirdparty: flat_hash_map
install(DIRECTORY ${PROJECT_SOURCE_DIR}/thirdparty/flat_hash_map
DESTINATION include/vineyard/contrib # target directory
Expand Down
21 changes: 0 additions & 21 deletions modules/graph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,27 +101,6 @@ else()
)
endif()

find_package(libgrapelite 0.3.4 QUIET)
if(LIBGRAPELITE_INCLUDE_DIRS)
message(STATUS "-- Found libgrape-lite: ${LIBGRAPELITE_INCLUDE_DIRS}")
target_include_directories(vineyard_graph PUBLIC ${LIBGRAPELITE_INCLUDE_DIRS})
else()
# use bundled libgrape-lite
message(STATUS "-- Building libgrape-lite from submodule: ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libgrape-lite")
set(BUILD_LIBGRAPELITE_DOCS OFF CACHE BOOL "no libgrape-lite docs")
set(BUILD_LIBGRAPELITE_TESTS OFF CACHE BOOL "no libgrape-lite tests")
# use `add_subdirectory` to use the same CMAKE_BUILD_TYPE with vineyard itself and
# ensure the libgrapelite-targets-{debug/release}.cmake been generated during installation.
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libgrape-lite"
"${CMAKE_CURRENT_BINARY_DIR}/thirdparty/libgrape-lite"
)
target_include_directories(vineyard_graph PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libgrape-lite>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libgrape-lite/thirdparty>
$<INSTALL_INTERFACE:include>
)
endif()

# install headers for powturbo
target_include_directories(vineyard_graph PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/thirdparty>
Expand Down

0 comments on commit 53fd7d8

Please sign in to comment.