Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions cmake/ExternalDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,24 @@ list(APPEND FETCH_PACKAGES mqt-core)

# ---------------------------------------------------------------------------------Fetch Eigen3
# cmake-format: off
set(EIGEN_VERSION 3.4.0
set(EIGEN_VERSION 5.0.1
CACHE STRING "Eigen3 version")
# cmake-format: on
FetchContent_Declare(
Eigen3
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_TAG ${EIGEN_VERSION}
GIT_SHALLOW TRUE
# null is a non-existent subdirectory in Eigen3's repository, so add_subdirectory() becomes a
# no-op. This stops Eigen3's own CMakeLists.txt from running, which is only relevant for its
# documentation and tests.
SOURCE_SUBDIR null)
GIT_SHALLOW TRUE)
list(APPEND FETCH_PACKAGES Eigen3)
set(EIGEN_BUILD_TESTING
OFF
CACHE BOOL "Disable testing for Eigen")
set(BUILD_TESTING
OFF
CACHE BOOL "Disable general testing")
set(EIGEN_BUILD_DOC
OFF
CACHE BOOL "Disable documentation build for Eigen")

if(BUILD_MQT_DEBUGGER_TESTS)
set(gtest_force_shared_crt
Expand All @@ -65,8 +70,5 @@ endif()
# Make all declared dependencies available.
FetchContent_MakeAvailable(${FETCH_PACKAGES})

add_library(Eigen3::Eigen INTERFACE IMPORTED)
set_target_properties(Eigen3::Eigen PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${eigen3_SOURCE_DIR}")

# Hide Eigen3 warnings
get_target_property(Eigen3_Includes Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES)
Loading