Skip to content

Commit

Permalink
add eigen.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiu-xiao committed Feb 14, 2024
1 parent 79708fc commit 0702998
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@
[submodule "hw/mcu/st/cmsis_device_g0"]
path = hw/mcu/st/cmsis_device_g0
url = https://github.com/STMicroelectronics/cmsis_device_g0.git
[submodule "lib/eigen"]
path = lib/eigen
url = https://gitlab.com/libeigen/eigen.git
3 changes: 3 additions & 0 deletions .gitmodules_cn
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@
[submodule "hw/mcu/st/cmsis_device_g0"]
path = hw/mcu/st/cmsis_device_g0
url = https://gitee.com/x-robot/cmsis_device_g0.git
[submodule "lib/eigen"]
path = lib/eigen
url = https://gitee.com/x-robot/eigen.git
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
set(CMAKE_C_FLAGS_RELEASE "-O3")
set(CMAKE_ASM_FLAGS_RELEASE "-O3")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "")
add_compile_definitions()
add_compile_definitions(EIGEN_NO_DEBUG=1)

elseif(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
set(CMAKE_C_FLAGS_MINSIZEREL "-Os")
set(CMAKE_ASM_FLAGS_MINSIZEREL "-Os")
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "")
add_compile_definitions()
add_compile_definitions(EIGEN_NO_DEBUG=1)
else()
message(FATAL_ERROR "Unknown build type.")
endif()
Expand Down
1 change: 1 addition & 0 deletions lib/eigen
Submodule eigen added at 7e655c
5 changes: 4 additions & 1 deletion src/component/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ target_include_directories(
target_include_directories(
${PROJECT_NAME} SYSTEM
PUBLIC ${${PROJECT_NAME}_INCLUDES}
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC ${LIB_DIR}/eigen/Eigen)

add_compile_definitions(EIGEN_NO_MALLOC)

add_dependencies(${PROJECT_NAME} OneMessage system)

0 comments on commit 0702998

Please sign in to comment.