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
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
Yuhao Liu
ogs
Commits
35ed76d2
Commit
35ed76d2
authored
8 years ago
by
Lars Bilke
Browse files
Options
Downloads
Plain Diff
Merge pull request #1209 from bilke/find-eigen-fix
Simplified FindEigen3.cmake.
parents
f3a4ecfa
54a774d0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.travis.yml
+1
-1
1 addition, 1 deletion
.travis.yml
scripts/cmake/cmake/FindEigen3.cmake
+12
-50
12 additions, 50 deletions
scripts/cmake/cmake/FindEigen3.cmake
with
13 additions
and
51 deletions
.travis.yml
+
1
−
1
View file @
35ed76d2
...
@@ -49,7 +49,7 @@ before_script:
...
@@ -49,7 +49,7 @@ before_script:
-
if [ "$CC" == "gcc" ]; then export CXX=g++-4.8 CC=gcc-4.8; fi
-
if [ "$CC" == "gcc" ]; then export CXX=g++-4.8 CC=gcc-4.8; fi
script
:
script
:
-
if [ "$CASE" == "CHECK" ]; then git diff --check `git merge-base origin/master HEAD` HEAD; fi
-
if [ "$CASE" == "CHECK" ]; then git
config core.whitespace -blank-at-eof; git
diff --check `git merge-base origin/master HEAD` HEAD; fi
-
if [ "$CASE" != "CHECK" ]; then mkdir build; fi
-
if [ "$CASE" != "CHECK" ]; then mkdir build; fi
-
if [ "$CASE" != "CHECK" ]; then cd build; fi
-
if [ "$CASE" != "CHECK" ]; then cd build; fi
-
if [ "$CASE" != "CHECK" ]; then cmake $CMAKE_ARGS -DCMAKE_BUILD_TYPE=Debug ..; fi
-
if [ "$CASE" != "CHECK" ]; then cmake $CMAKE_ARGS -DCMAKE_BUILD_TYPE=Debug ..; fi
...
...
This diff is collapsed.
Click to expand it.
scripts/cmake/cmake/FindEigen3.cmake
+
12
−
50
View file @
35ed76d2
...
@@ -15,20 +15,6 @@
...
@@ -15,20 +15,6 @@
# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
# 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.
# 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
)
macro
(
_eigen3_check_version
)
file
(
READ
"
${
EIGEN3_INCLUDE_DIR
}
/Eigen/src/Core/util/Macros.h"
_eigen3_version_header
)
file
(
READ
"
${
EIGEN3_INCLUDE_DIR
}
/Eigen/src/Core/util/Macros.h"
_eigen3_version_header
)
...
@@ -45,46 +31,22 @@ macro(_eigen3_check_version)
...
@@ -45,46 +31,22 @@ macro(_eigen3_check_version)
else
()
else
()
set
(
EIGEN3_VERSION_OK TRUE
)
set
(
EIGEN3_VERSION_OK TRUE
)
endif
()
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
()
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
()
_eigen3_check_version
()
set
(
EIGEN3_FOUND
${
EIGEN3_VERSION_OK
}
)
endif
()
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
)
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