Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
d91f8d08
Unverified
Commit
d91f8d08
authored
Dec 04, 2023
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use fetchcontent for eigen, again
parent
43d4644f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
CMakeLists.txt
+12
-16
No files found.
CMakeLists.txt
View file @
d91f8d08
...
...
@@ -216,18 +216,18 @@ find_package(ZLIB REQUIRED)
find_package
(
Eigen3 QUIET
)
if
(
Eigen3_FOUND
)
get_target_property
(
EIGEN_INCLUDE_DIR Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES
)
else
()
ExternalProject_Add
(
local_Eigen3
if
(
NOT Eigen3_FOUND
)
FetchContent_Declare
(
Eigen3
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_TAG 3.4.0
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=
${
CMAKE_CURRENT_BINARY_DIR
}
/external
)
set
(
EIGEN3_D local_Eigen3
)
set
(
EIGEN_INCLUDE_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/external/include/eigen3
)
FetchContent_GetProperties
(
Eigen3
)
if
(
NOT Eigen3_POPULATED
)
FetchContent_Populate
(
Eigen3
)
add_subdirectory
(
${
Eigen3_SOURCE_DIR
}
${
Eigen3_BINARY_DIR
}
EXCLUDE_FROM_ALL
)
endif
()
endif
()
include
(
FindFilesystem
)
...
...
@@ -338,15 +338,12 @@ target_include_directories(cifpp
"$<BUILD_INTERFACE:
${
PROJECT_SOURCE_DIR
}
/include>"
"$<INSTALL_INTERFACE:
${
CMAKE_INSTALL_INCLUDEDIR
}
>"
PRIVATE
"
${
EIGEN_INCLUDE_DIR
}
"
"
${
BOOST_REGEX_INCLUDE_DIR
}
"
)
target_link_libraries
(
cifpp PUBLIC Threads::Threads ZLIB::ZLIB
${
CIFPP_REQUIRED_LIBRARIES
}
)
if
(
${
EIGEN3_D
}
)
add_dependencies
(
cifpp
${
EIGEN3_D
}
)
endif
()
target_link_libraries
(
cifpp
PUBLIC Threads::Threads ZLIB::ZLIB
${
CIFPP_REQUIRED_LIBRARIES
}
PRIVATE Eigen3::Eigen
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
)
target_link_options
(
cifpp PRIVATE -undefined dynamic_lookup
)
...
...
@@ -542,8 +539,7 @@ if(BUILD_TESTING)
add_executable
(
${
CIFPP_TEST
}
${
CIFPP_TEST_SOURCE
}
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/test/test-main.cpp"
)
target_link_libraries
(
${
CIFPP_TEST
}
PRIVATE Threads::Threads cifpp::cifpp Catch2::Catch2
)
target_include_directories
(
${
CIFPP_TEST
}
PRIVATE
${
EIGEN_INCLUDE_DIR
}
)
target_link_libraries
(
${
CIFPP_TEST
}
PRIVATE Threads::Threads cifpp::cifpp Catch2::Catch2 Eigen3::Eigen
)
if
(
MSVC
)
# Specify unwind semantics so that MSVC knowns how to handle exceptions
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment