Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
Docs: Update Eigen
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslo committed Aug 26, 2018
1 parent 487fb33 commit 96c5b0c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
17 changes: 9 additions & 8 deletions docs/packages/pkg/Eigen.rst
Expand Up @@ -9,20 +9,21 @@
Eigen
=====

- http://eigen.tuxfamily.org
- `Official <https://bitbucket.org/eigen/eigen/>`__
- `Official Git mirror on GitHub <https://github.com/eigenteam/eigen-git-mirror>`__
- `Hunterized <https://github.com/hunter-packages/eigen>`__
- Maintainer: https://github.com/NeroBurner

.. code-block:: cmake
.. literalinclude:: /../examples/Eigen/CMakeLists.txt
:language: cmake
:start-after: # DOCUMENTATION_START {
:end-before: # DOCUMENTATION_END }

hunter_add_package(Eigen)
find_package(Eigen REQUIRED)
target_link_libraries(... Eigen::eigen)
For Hunter >= `v0.17.15 <https://github.com/ruslo/hunter/releases/tag/v0.17.15>`__
For Hunter < `v0.17.15 <https://github.com/ruslo/hunter/releases/tag/v0.17.15>`__

.. code-block:: cmake
hunter_add_package(Eigen)
find_package(Eigen3 CONFIG REQUIRED)
target_link_libraries(... Eigen3::Eigen)
find_package(Eigen REQUIRED)
target_link_libraries(... Eigen::eigen)
17 changes: 9 additions & 8 deletions examples/Eigen/CMakeLists.txt
Expand Up @@ -9,7 +9,16 @@ include("../common.cmake")

project(download-eigen)

# DOCUMENTATION_START {
hunter_add_package(Eigen)
find_package(Eigen3 CONFIG REQUIRED)

add_executable(foo foo.cpp)
target_link_libraries(foo Eigen3::Eigen)
# DOCUMENTATION_END }

# Test double library creation
find_package(Eigen3 CONFIG REQUIRED)

string(COMPARE EQUAL "${Eigen_LICENSES}" "" is_empty)
if(is_empty)
Expand All @@ -23,11 +32,3 @@ foreach(x ${Eigen_LICENSES})
message(FATAL_ERROR "File not found")
endif()
endforeach()

find_package(Eigen3 CONFIG REQUIRED)

# Test double library creation
find_package(Eigen3 CONFIG REQUIRED)

add_executable(foo foo.cpp)
target_link_libraries(foo Eigen3::Eigen)

0 comments on commit 96c5b0c

Please sign in to comment.