Skip to content

Commit

Permalink
fix(third_party): use submodule for Eigen
Browse files Browse the repository at this point in the history
  • Loading branch information
JieRen98 committed Dec 13, 2023
1 parent 4aaaad2 commit bd86dc0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "third_party/eigen"]
path = third_party/eigen
url = https://gitlab.com/libeigen/eigen.git
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ option(MEGBA_ENABLE_EXAMPLE "BUILD EXAMPLES" TRUE)
# CUDA
find_package(CUDAToolkit REQUIRED)
find_package(OpenMP REQUIRED)
find_package(Eigen3 3.4.0 CONFIG REQUIRED)
set(EIGEN_BUILD_TESTING OFF)
add_subdirectory(third_party/eigen)
find_package(Threads REQUIRED)
if (${CMAKE_CUDA_COMPILER_VERSION} GREATER_EQUAL 11.5)
set(Thrust_DIR /usr/local/cuda/targets/x86_64-linux/lib/cmake/thrust/)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Dependencies:
- C++14
- CMake (>= 3.15)
- [CUDA](https://developer.nvidia.com/cuda-downloads) (>= 11.2)
- [Eigen](https://eigen.tuxfamily.org/) (>= 3.4.0)
- [gflags](https://github.com/gflags/gflags)
- NCCL2 (if you need Distributed features) https://developer.nvidia.com/nccl/nccl-download

Expand All @@ -45,6 +44,7 @@ Demo with BAL dataset:
If you want to use the distributed feature, use `cmake -DMEGBA_ENABLE_NCCL ..` instead of `cmake ..`.

```bash
git submodule update --init
mkdir build
cd build
cmake .. # enable nccl by using cmake -DMEGBA_ENABLE_NCCL ..
Expand Down
1 change: 1 addition & 0 deletions third_party/eigen
Submodule eigen added at 314739

0 comments on commit bd86dc0

Please sign in to comment.