Skip to content

Commit

Permalink
changed eigen dependency to be fetch content so it is more platform i…
Browse files Browse the repository at this point in the history
…ndependent
  • Loading branch information
JMoore5353 committed Dec 16, 2024
1 parent 935548d commit 9416b66
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/varmint_firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: checkout submodules
run: git submodule update --init --recursive
- name: install toolchain
run: sudo apt -y install gcc-arm-none-eabi libeigen3-dev
run: sudo apt -y install gcc-arm-none-eabi
- name: check toolchain
run: arm-none-eabi-gcc --version
- name: build varmint
Expand Down
14 changes: 10 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,24 @@ if("${GIT_VERSION_HASH}" STREQUAL "")
set(GIT_VERSION_HASH "0")
endif()

### source files ###
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIRS})
### Install Eigen dependency ###
include(FetchContent)
FetchContent_Declare(
Eigen3
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_TAG origin/3.4
)
FetchContent_MakeAvaliable(Eigen3)

### source files ###
include_directories(
include
include/interface
lib
comms/mavlink
comms/mavlink/v1.0
comms/mavlink/v1.0/common
comms/mavlink/v1.0/rosflight
${eigen3_SOURCE_DIR}
)

file(GLOB_RECURSE ROSFLIGHT_SOURCES
Expand Down

1 comment on commit 9416b66

@avtoku
Copy link
Contributor

@avtoku avtoku commented on 9416b66 Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer that eigen be included as a submodule via:
git submodule add https://gitlab.com/libeigen/eigen.git lib/eigen

Please sign in to comment.