Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
ndcurves
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
loco-3d
ndcurves
Commits
3315e87e
Commit
3315e87e
authored
5 years ago
by
Guilhem Saurel
Browse files
Options
Downloads
Patches
Plain Diff
[CMake] clean
parent
223915f6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+16
-13
16 additions, 13 deletions
CMakeLists.txt
python/CMakeLists.txt
+9
-12
9 additions, 12 deletions
python/CMakeLists.txt
tests/CMakeLists.txt
+3
-2
3 additions, 2 deletions
tests/CMakeLists.txt
with
28 additions
and
27 deletions
CMakeLists.txt
+
16
−
13
View file @
3315e87e
cmake_minimum_required
(
VERSION 2.6
)
project
(
curve
)
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.6
)
INCLUDE
(
cmake/base.cmake
)
INCLUDE
(
cmake/boost.cmake
)
INCLUDE
(
cmake/test.cmake
)
INCLUDE
(
cmake/python.cmake
)
INCLUDE
(
cmake/hpp.cmake
)
...
...
@@ -13,26 +14,28 @@ SET(PROJECT_DESCRIPTION
# Disable -Werror on Unix for now.
SET
(
CXX_DISABLE_WERROR True
)
SET
(
CMAKE_VERBOSE_MAKEFILE True
)
find_package
(
Eigen3 REQUIRED
)
include_directories
(
${
EIGEN3_INCLUDE_DIR
}
)
SETUP_HPP_PROJECT
()
ADD_REQUIRED_DEPENDENCY
(
eigen3
)
SET
(
BOOST_COMPONENTS unit_test_framework
)
OPTION
(
BUILD_PYTHON_INTERFACE
"Build the python binding"
ON
)
IF
(
BUILD_PYTHON_INTERFACE
)
# search for python
F
IN
DPYTHON
(
2.7 REQUIRED
)
find_package
(
PythonLibs 2.7 REQUIRED
)
include_directories
(
${
PYTHON_INCLUDE_DIRS
}
)
FINDPYTHON
()
IN
CLUDE_DIRECTORIES
(
SYSTEM
${
PYTHON_INCLUDE_DIRS
}
)
STRING
(
REGEX REPLACE
"-"
"_"
PY_NAME
${
PROJECT_NAME
}
)
find_package
(
Boost COMPONENTS python REQUIRED
)
include_directories
(
${
Boost_INCLUDE_DIR
}
)
ADD_REQUIRED_DEPENDENCY
(
"eigenpy"
)
SET
(
BOOST_COMPONENTS
${
BOOST_COMPONENTS
}
python
)
add_subdirectory
(
python
)
ADD_SUBDIRECTORY
(
python
)
ENDIF
(
BUILD_PYTHON_INTERFACE
)
SEARCH_FOR_BOOST
()
INCLUDE_DIRECTORIES
(
SYSTEM
${
Boost_INCLUDE_DIRS
}
)
ADD_SUBDIRECTORY
(
include/curve
)
ADD_SUBDIRECTORY
(
tests
)
...
...
This diff is collapsed.
Click to expand it.
python/CMakeLists.txt
+
9
−
12
View file @
3315e87e
STRING
(
REGEX REPLACE
"-"
"_"
PY_NAME
${
PROJECT_NAME
}
)
ADD_REQUIRED_DEPENDENCY
(
"eigenpy"
)
SET
(
${
PY_NAME
}
_BINDINGS_SOURCES
curve_python.cpp
python_variables.cpp
python_variables.h
)
# Define the wrapper library that wraps our library
add_library
(
${
PY_NAME
}
SHARED curve_python.cpp python_variables.cpp python_variables.h
)
#~ target_link_libraries( centroidal_dynamics ${Boost_LIBRARIES} ${PROJECT_NAME} )
# don't prepend wrapper library name with lib
set_target_properties
(
${
PY_NAME
}
PROPERTIES PREFIX
""
)
ADD_LIBRARY
(
${
PY_NAME
}
SHARED
${${
PY_NAME
}
_BINDINGS_SOURCES
}
)
SET_TARGET_PROPERTIES
(
${
PY_NAME
}
PROPERTIES PREFIX
""
)
PKG_CONFIG_USE_DEPENDENCY
(
${
PY_NAME
}
eigenpy
)
IF
(
APPLE
)
# We need to change the extension for python bindings
SET_TARGET_PROPERTIES
(
${
PY_NAME
}
PROPERTIES SUFFIX
".so"
)
ENDIF
(
APPLE
)
PKG_CONFIG_USE_DEPENDENCY
(
${
PY_NAME
}
eigenpy
)
INSTALL
(
TARGETS
${
PY_NAME
}
DESTINATION
${
PYTHON_SITELIB
}
)
INSTALL
(
TARGETS
${
PY_NAME
}
DESTINATION
${
PYTHON_SITELIB
}
)
ADD_PYTHON_UNIT_TEST
(
"python-curve"
"python/test/test.py"
"python"
)
This diff is collapsed.
Click to expand it.
tests/CMakeLists.txt
+
3
−
2
View file @
3315e87e
ADD_UNIT_TEST
(
curve_tests Main.cpp
)
curve_tests Main.cpp
)
PKG_CONFIG_USE_DEPENDENCY
(
curve_tests 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