Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
eigenpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Stack Of Tasks
eigenpy
Commits
8e85b3fe
Commit
8e85b3fe
authored
8 years ago
by
jcarpent
Browse files
Options
Downloads
Patches
Plain Diff
[CMake] Rework unit tests
parent
a6867bd9
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
CMakeLists.txt
+6
-10
6 additions, 10 deletions
CMakeLists.txt
unittest/CMakeLists.txt
+41
-0
41 additions, 0 deletions
unittest/CMakeLists.txt
with
47 additions
and
10 deletions
CMakeLists.txt
+
6
−
10
View file @
8e85b3fe
...
@@ -48,6 +48,7 @@ ENDIF(APPLE)
...
@@ -48,6 +48,7 @@ ENDIF(APPLE)
# --- OPTIONS ---------------------------------------
# --- OPTIONS ---------------------------------------
# ----------------------------------------------------
# ----------------------------------------------------
OPTION
(
EIGEN_NUMPY_ALIGNED
"Directly aligned data between Numpy and Eigen"
OFF
)
OPTION
(
EIGEN_NUMPY_ALIGNED
"Directly aligned data between Numpy and Eigen"
OFF
)
OPTION
(
BUILD_UNIT_TESTS
"Build the unitary tests"
ON
)
IF
(
EIGEN_NUMPY_ALIGNED
)
IF
(
EIGEN_NUMPY_ALIGNED
)
ADD_DEFINITIONS
(
-DEIGENPY_ALIGNED
)
ADD_DEFINITIONS
(
-DEIGENPY_ALIGNED
)
...
@@ -104,7 +105,6 @@ ENDFOREACH(header)
...
@@ -104,7 +105,6 @@ ENDFOREACH(header)
# ----------------------------------------------------
# ----------------------------------------------------
# --- TARGETS ----------------------------------------
# --- TARGETS ----------------------------------------
# ----------------------------------------------------
# ----------------------------------------------------
SET
(
${
PROJECT_NAME
}
_SOURCES
SET
(
${
PROJECT_NAME
}
_SOURCES
src/exception.cpp
src/exception.cpp
src/eigenpy.cpp
src/eigenpy.cpp
...
@@ -122,15 +122,11 @@ INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
...
@@ -122,15 +122,11 @@ INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
# ----------------------------------------------------
# ----------------------------------------------------
# --- UNIT TEST --------------------------------------
# --- UNIT TEST --------------------------------------
# ----------------------------------------------------
# ----------------------------------------------------
ADD_LIBRARY
(
matrix SHARED unittest/matrix.cpp
)
ADD_SUBDIRECTORY
(
unittest
)
TARGET_LINK_LIBRARIES
(
matrix
${
PROJECT_NAME
}
)
TARGET_LINK_BOOST_PYTHON
(
matrix
)
# ----------------------------------------------------
SET_TARGET_PROPERTIES
(
matrix PROPERTIES PREFIX
""
)
# --- EXECUTABLES ------------------------------------
# ----------------------------------------------------
ADD_LIBRARY
(
geometry SHARED unittest/geometry.cpp
)
TARGET_LINK_LIBRARIES
(
geometry
${
PROJECT_NAME
}
)
TARGET_LINK_BOOST_PYTHON
(
geometry
)
SET_TARGET_PROPERTIES
(
geometry PROPERTIES PREFIX
""
)
IF
(
EIGEN_NUMPY_ALIGNED
)
IF
(
EIGEN_NUMPY_ALIGNED
)
PKG_CONFIG_APPEND_CFLAGS
(
"-DEIGENPY_ALIGNED"
)
PKG_CONFIG_APPEND_CFLAGS
(
"-DEIGENPY_ALIGNED"
)
...
...
This diff is collapsed.
Click to expand it.
unittest/CMakeLists.txt
0 → 100644
+
41
−
0
View file @
8e85b3fe
#
# Copyright (c) 2016 CNRS
#
# This file is part of eigenpy
# Pinocchio is free software: you can redistribute it
# and/or modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, either version
# 3 of the License, or (at your option) any later version.
# Pinocchio is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Lesser Public License for more details. You should have
# received a copy of the GNU Lesser General Public License along with
# Pinocchio If not, see
# <http://www.gnu.org/licenses/>.
MACRO
(
ADD_LIB_UNIT_TEST test PKGS
)
IF
(
BUILD_UNIT_TESTS
)
ADD_LIBRARY
(
${
test
}
SHARED
${
test
}
)
ELSE
(
BUILD_UNIT_TESTS
)
ADD_LIBRARY
(
${
test
}
SHARED EXCLUDE_FROM_ALL
${
test
}
)
ENDIF
(
BUILD_UNIT_TESTS
)
FOREACH
(
PKG
${
PKGS
}
)
PKG_CONFIG_USE_DEPENDENCY
(
${
test
}
${
PKG
}
)
ENDFOREACH
(
PKG
)
TARGET_LINK_LIBRARIES
(
${
test
}
${
PROJECT_NAME
}
)
TARGET_LINK_BOOST_PYTHON
(
${
test
}
)
SET_TARGET_PROPERTIES
(
${
test
}
PROPERTIES PREFIX
""
)
IF
(
APPLE
)
# We need to change the extension for python bindings
SET_TARGET_PROPERTIES
(
${
test
}
PROPERTIES SUFFIX
".so"
)
ENDIF
(
APPLE
)
#ADD_TEST(test ${test} COMMAND ${test})
#ADD_DEPENDENCIES(check ${test})
ENDMACRO
(
ADD_LIB_UNIT_TEST
)
ADD_LIB_UNIT_TEST
(
matrix
"eigen3"
)
ADD_LIB_UNIT_TEST
(
geometry
"eigen3"
)
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