include(FetchContent)

if(NOT DEFINED EIGEN_REPO)
    set(EIGEN_REPO https://gitlab.com/libeigen/eigen.git)
endif ()

FetchContent_Declare(
        eigen
        EXCLUDE_FROM_ALL
        GIT_REPOSITORY ${EIGEN_REPO}
        GIT_TAG master
        GIT_SHALLOW TRUE
)
set(EIGEN_BUILD_DOC OFF CACHE BOOL "" FORCE)
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
set(EIGEN_BUILD_PKGCONFIG OFF CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(eigen)
