You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
685 B
CMake
23 lines
685 B
CMake
# usage:
|
|
# FetchContent_MakeAvailable(Eigen)
|
|
# target_link_libraries(${PROJECT_NAME} PRIVATE Eigen3::Eigen)
|
|
|
|
if (NOT DEFINED EIGEN_GIT_TAG)
|
|
message(FATAL_ERROR "EIGEN_GIT_TAG is not defined.\n see https://gitlab.com/libeigen/eigen and grab a release tag.\n example: set(EIGEN_GIT_TAG 3.4.0)")
|
|
endif()
|
|
|
|
FetchContent_Declare(
|
|
Eigen
|
|
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
|
|
GIT_TAG ${EIGEN_GIT_TAG}
|
|
GIT_SHALLOW TRUE
|
|
GIT_PROGRESS TRUE
|
|
)
|
|
set(EIGEN_BUILD_DOC OFF)
|
|
set(BUILD_TESTING OFF)
|
|
set(CMAKE_Fortran_COMPILER_WORKS ON)
|
|
set(EIGEN_BUILD_PKGCONFIG OFF)
|
|
|
|
include(${CMAKE_SOURCE_DIR}/cmake/Utils.cmake)
|
|
print_git_tag(${EIGEN_GIT_TAG})
|