Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Özgür Ozan Sen
ogs
Commits
8bae1b2c
Commit
8bae1b2c
authored
8 years ago
by
Lars Bilke
Browse files
Options
Downloads
Patches
Plain Diff
Simplified FindEigen3.cmake.
Will find Eigen correctly on envinf1 Fixes #1073.
parent
f3a4ecfa
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/cmake/cmake/FindEigen3.cmake
+12
-50
12 additions, 50 deletions
scripts/cmake/cmake/FindEigen3.cmake
with
12 additions
and
50 deletions
scripts/cmake/cmake/FindEigen3.cmake
+
12
−
50
View file @
8bae1b2c
...
...
@@ -15,20 +15,6 @@
# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
if
(
NOT Eigen3_FIND_VERSION
)
if
(
NOT Eigen3_FIND_VERSION_MAJOR
)
set
(
Eigen3_FIND_VERSION_MAJOR 2
)
endif
()
if
(
NOT Eigen3_FIND_VERSION_MINOR
)
set
(
Eigen3_FIND_VERSION_MINOR 91
)
endif
()
if
(
NOT Eigen3_FIND_VERSION_PATCH
)
set
(
Eigen3_FIND_VERSION_PATCH 0
)
endif
()
set
(
Eigen3_FIND_VERSION
"
${
Eigen3_FIND_VERSION_MAJOR
}
.
${
Eigen3_FIND_VERSION_MINOR
}
.
${
Eigen3_FIND_VERSION_PATCH
}
"
)
endif
()
macro
(
_eigen3_check_version
)
file
(
READ
"
${
EIGEN3_INCLUDE_DIR
}
/Eigen/src/Core/util/Macros.h"
_eigen3_version_header
)
...
...
@@ -45,46 +31,22 @@ macro(_eigen3_check_version)
else
()
set
(
EIGEN3_VERSION_OK TRUE
)
endif
()
if
(
NOT EIGEN3_VERSION_OK
)
message
(
STATUS
"Eigen3 version
${
EIGEN3_VERSION
}
found in
${
EIGEN3_INCLUDE_DIR
}
, "
"but at least version
${
Eigen3_FIND_VERSION
}
is required"
)
endif
()
endmacro
()
if
(
EIGEN3_INCLUDE_DIR
)
find_path
(
EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
PATHS /opt/eigen/*/include
PATH_SUFFIXES eigen3 eigen
)
# in cache already
if
(
EIGEN3_INCLUDE_DIR
)
_eigen3_check_version
()
set
(
EIGEN3_FOUND
${
EIGEN3_VERSION_OK
}
)
else
()
find_path
(
EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
PATHS
${
CMAKE_INSTALL_PREFIX
}
/include
${
KDE4_INCLUDE_DIR
}
/usr/include
/usr/local/include
/opt/boxen/homebrew/include
C:/
$ENV{ProgramFiles}/
/usr/local/eigen/*/include
PATH_SUFFIXES eigen3 eigen
)
if
(
EIGEN3_INCLUDE_DIR
)
_eigen3_check_version
()
endif
()
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK
)
endif
()
mark_as_advanced
(
EIGEN3_INCLUDE_DIR
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
Eigen3
REQUIRED_VARS EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK
VERSION_VAR EIGEN3_VERSION
)
endif
(
)
mark_as_advanced
(
EIGEN3_INCLUDE_DIR
)
if
(
EIGEN3_INCLUDE_DIR
)
message
(
STATUS
"Eigen version
${
EIGEN3_VERSION
}
"
)
endif
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment