Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
dynamic-graph-python
Commits
7c44de53
Commit
7c44de53
authored
Oct 11, 2019
by
Guilhem Saurel
Browse files
[CMake] move headers in include, and lib at its place
parent
24d3a745
Changes
22
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
7c44de53
...
...
@@ -37,6 +37,6 @@ SEARCH_FOR_BOOST()
SEARCH_FOR_EIGEN
()
ADD_SUBDIRECTORY
(
src
)
ADD_SUBDIRECTORY
(
include
)
ADD_SUBDIRECTORY
(
include
/
${
CUSTOM_HEADER_DIR
}
)
ADD_SUBDIRECTORY
(
doc
)
ADD_SUBDIRECTORY
(
unitTesting
)
include/CMakeLists.txt
→
include/
dynamic-graph/python/
CMakeLists.txt
View file @
7c44de53
# Copyright 2010-2019, Florent Lamiraux, Guilhem Saurel, LAAS-CNRS
SET
(
${
PROJECT_NAME
}
_HEADERS
dynamic-graph/python/api.hh
dynamic-graph/python/exception-python.hh
api.hh
convert-dg-to-py.hh
dynamic-graph-py.hh
exception.hh
exception-python.hh
interpreter.hh
signal-wrapper.hh
)
CONFIG_FILES
(
link-to-python.hh
)
src
/convert-dg-to-py.hh
→
include/dynamic-graph/python
/convert-dg-to-py.hh
View file @
7c44de53
File moved
src
/dynamic-graph-py.hh
→
include/dynamic-graph/python
/dynamic-graph-py.hh
View file @
7c44de53
...
...
@@ -180,7 +180,7 @@ __attribute__((unused)) static struct PyModuleDef dynamicGraphModuleDef = {
NULL
,
NULL
};
#define GETSTATE(m) ((struct dynamicgraph::python::module_state*)PyModule_GetState(m))
#define DGPYERROR GETSTATE(PyState_FindModule(&
dynamicgraph::python::
dynamicGraphModuleDef))->dgpyError
#define DGPYERROR GETSTATE(PyState_FindModule(&dynamicGraphModuleDef))->dgpyError
#define INITERROR return NULL
#else
__attribute__
((
unused
))
static
struct
module_state
_state
;
...
...
src
/exception.hh
→
include/dynamic-graph/python
/exception.hh
View file @
7c44de53
...
...
@@ -3,6 +3,8 @@
#ifndef DYNAMIC_GRAPH_PYTHON_EXCEPTION
#define DYNAMIC_GRAPH_PYTHON_EXCEPTION
#include
"dynamic-graph/python/dynamic-graph-py.hh"
/// \brief Catch all exceptions which may be sent when C++ code is
/// called.
#define CATCH_ALL_EXCEPTIONS() \
...
...
src
/link-to-python.hh.in
→
include/dynamic-graph/python
/link-to-python.hh.in
View file @
7c44de53
File moved
src
/signal-wrapper.hh
→
include/dynamic-graph/python
/signal-wrapper.hh
View file @
7c44de53
File moved
src/CMakeLists.txt
View file @
7c44de53
# Copyright 2010 - 2019, Florent Lamiraux, Thomas Moulard, Guilhem Saurel, JRL, CNRS/AIST, LAAS-CNRS
#
# Python
#
INCLUDE_DIRECTORIES
(
SYSTEM
${
Boost_INCLUDE_DIRS
}
)
LINK_DIRECTORIES
(
${
Boost_LIBRARY_DIRS
}
${
PYTHON_LIBRARY_DIRS
}
)
#
#
# Python interpreter
#
#
SET
(
LIBRARY_NAME
${
PROJECT_NAME
}
)
ADD_LIBRARY
(
${
LIBRARY_NAME
}
SHARED
interpreter.cc
)
ADD_LIBRARY
(
${
LIBRARY_NAME
}
SHARED interpreter.cc
)
TARGET_LINK_LIBRARIES
(
${
LIBRARY_NAME
}
${
PYTHON_LIBRARY
}
)
TARGET_LINK_LIBRARIES
(
${
LIBRARY_NAME
}
${
PYTHON_LIBRARY
}
)
TARGET_LINK_BOOST_PYTHON
(
${
LIBRARY_NAME
}
)
IF
(
UNIX
)
...
...
@@ -29,8 +20,7 @@ ENDIF(UNIX)
SET_TARGET_PROPERTIES
(
${
LIBRARY_NAME
}
PROPERTIES SOVERSION
${
PROJECT_VERSION
}
)
PKG_CONFIG_USE_DEPENDENCY
(
${
LIBRARY_NAME
}
dynamic-graph
)
INSTALL
(
TARGETS
${
LIBRARY_NAME
}
DESTINATION lib
)
INSTALL
(
TARGETS
${
LIBRARY_NAME
}
DESTINATION lib
)
#
#
...
...
@@ -38,36 +28,7 @@ INSTALL(TARGETS ${LIBRARY_NAME}
#
#
SET
(
PYTHON_MODULE wrap
)
ADD_LIBRARY
(
${
PYTHON_MODULE
}
MODULE
convert-dg-to-py.cc
debug-py.cc
dynamic-graph-py.cc
entity-py.cc
exception-python.cc
factory-py.cc
pool-py.cc
signal-base-py.cc
signal-caster-py.cc
signal-wrapper.cc
)
# Remove prefix lib
SET_TARGET_PROPERTIES
(
${
PYTHON_MODULE
}
PROPERTIES PREFIX
""
)
PKG_CONFIG_USE_DEPENDENCY
(
${
PYTHON_MODULE
}
dynamic-graph
)
CONFIG_FILES
(
link-to-python.hh
)
INCLUDE_DIRECTORIES
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
#
# Installation
#
INSTALL
(
TARGETS
${
PYTHON_MODULE
}
DESTINATION
${
PYTHON_SITELIB
}
/dynamic_graph
)
ADD_SUBDIRECTORY
(
dynamic_graph
)
SET
(
PYTHON_SOURCES
__init__.py
...
...
src/dynamic_graph/CMakeLists.txt
0 → 100644
View file @
7c44de53
# Copyright 2010 - 2019, Florent Lamiraux, Thomas Moulard, Guilhem Saurel, JRL, CNRS/AIST, LAAS-CNRS
SET
(
PYTHON_MODULE wrap
)
ADD_LIBRARY
(
${
PYTHON_MODULE
}
MODULE
convert-dg-to-py.cc
debug-py.cc
dynamic-graph-py.cc
entity-py.cc
exception-python.cc
factory-py.cc
pool-py.cc
signal-base-py.cc
signal-caster-py.cc
signal-wrapper.cc
)
# Remove prefix lib
SET_TARGET_PROPERTIES
(
${
PYTHON_MODULE
}
PROPERTIES PREFIX
""
)
PKG_CONFIG_USE_DEPENDENCY
(
${
PYTHON_MODULE
}
dynamic-graph
)
INSTALL
(
TARGETS
${
PYTHON_MODULE
}
DESTINATION
${
PYTHON_SITELIB
}
/dynamic_graph
)
src/convert-dg-to-py.cc
→
src/
dynamic_graph/
convert-dg-to-py.cc
View file @
7c44de53
// Copyright 2010, Florent Lamiraux, Thomas Moulard, LAAS-CNRS.
#include
"../src/convert-dg-to-py.hh"
#include
<iostream>
#include
<sstream>
...
...
@@ -8,6 +7,8 @@
#include
<dynamic-graph/signal.h>
#include
<dynamic-graph/signal-caster.h>
#include
"dynamic-graph/python/convert-dg-to-py.hh"
namespace
dynamicgraph
{
using
::
dynamicgraph
::
SignalBase
;
...
...
src/debug-py.cc
→
src/
dynamic_graph/
debug-py.cc
View file @
7c44de53
...
...
@@ -12,10 +12,10 @@
#include
<dynamic-graph/pool.h>
#include
<dynamic-graph/entity.h>
#include
<vector>
#include
"exception.hh"
#include
"
dynamic-graph/python/
exception.hh"
#include
<boost/shared_ptr.hpp>
#include
"dynamic-graph-py.hh"
#include
"dynamic-graph
/python/dynamic-graph
-py.hh"
typedef
boost
::
shared_ptr
<
std
::
ofstream
>
ofstreamShrPtr
;
...
...
src/dynamic-graph-py.cc
→
src/dynamic
_graph/dynamic
-graph-py.cc
View file @
7c44de53
...
...
@@ -9,9 +9,9 @@
#include
<dynamic-graph/exception-factory.h>
#include
<dynamic-graph/signal-base.h>
#include
"exception.hh"
#include
"dynamic-graph-py.hh"
#include
"signal-wrapper.hh"
#include
"
dynamic-graph/python/
exception.hh"
#include
"dynamic-graph
/python/dynamic-graph
-py.hh"
#include
"
dynamic-graph/python/
signal-wrapper.hh"
namespace
dynamicgraph
{
namespace
python
{
...
...
@@ -117,7 +117,7 @@ void initwrap(void)
if
(
module
==
NULL
)
INITERROR
;
struct
dynamicgraph
::
python
::
module_state
*
st
=
GETSTATE
(
module
);
DGPYERROR
=
PyErr_NewException
(
const_cast
<
char
*>
(
"dynamic_graph.dgpyError"
),
NULL
,
NULL
);
st
->
dgpyError
=
PyErr_NewException
(
const_cast
<
char
*>
(
"dynamic_graph.dgpyError"
),
NULL
,
NULL
);
if
(
st
->
dgpyError
==
NULL
)
{
Py_DECREF
(
module
);
INITERROR
;
...
...
src/entity-py.cc
→
src/
dynamic_graph/
entity-py.cc
View file @
7c44de53
...
...
@@ -11,9 +11,9 @@
#include
<dynamic-graph/pool.h>
#include
<dynamic-graph/linear-algebra.h>
#include
"dynamic-graph-py.hh"
#include
"convert-dg-to-py.hh"
#include
"exception.hh"
#include
"dynamic-graph
/python/dynamic-graph
-py.hh"
#include
"
dynamic-graph/python/
convert-dg-to-py.hh"
#include
"
dynamic-graph/python/
exception.hh"
// Ignore "dereferencing type-punned pointer will break strict-aliasing rules"
// warnings on gcc caused by Py_RETURN_TRUE and Py_RETURN_FALSE.
...
...
src/exception-python.cc
→
src/
dynamic_graph/
exception-python.cc
View file @
7c44de53
...
...
@@ -7,7 +7,7 @@
*
*/
#include
<
dynamic-graph/python/exception-python.hh
>
#include
"
dynamic-graph/python/exception-python.hh
"
#include
<dynamic-graph/debug.h>
#include
<stdarg.h>
#include
<cstdio>
...
...
src/factory-py.cc
→
src/
dynamic_graph/
factory-py.cc
View file @
7c44de53
...
...
@@ -4,7 +4,7 @@
#include
<iostream>
#include
<dynamic-graph/factory.h>
#include
"dynamic-graph-py.hh"
#include
"dynamic-graph
/python/dynamic-graph
-py.hh"
using
dynamicgraph
::
Entity
;
using
dynamicgraph
::
ExceptionAbstract
;
...
...
src/pool-py.cc
→
src/
dynamic_graph/
pool-py.cc
View file @
7c44de53
...
...
@@ -4,9 +4,9 @@
#include
<dynamic-graph/pool.h>
#include
<dynamic-graph/entity.h>
#include
<vector>
#include
"exception.hh"
#include
"dynamic-graph-py.hh"
#include
"dynamic-graph/python/exception.hh"
#include
"dynamic-graph/python/dynamic-graph-py.hh"
namespace
dynamicgraph
{
namespace
python
{
...
...
src/signal-base-py.cc
→
src/
dynamic_graph/
signal-base-py.cc
View file @
7c44de53
...
...
@@ -12,10 +12,10 @@
#include
<dynamic-graph/pool.h>
#include
<dynamic-graph/factory.h>
#include
"dynamic-graph-py.hh"
#include
"convert-dg-to-py.hh"
#include
"exception.hh"
#include
"signal-wrapper.hh"
#include
"dynamic-graph
/python/dynamic-graph
-py.hh"
#include
"
dynamic-graph/python/
convert-dg-to-py.hh"
#include
"
dynamic-graph/python/
exception.hh"
#include
"
dynamic-graph/python/
signal-wrapper.hh"
using
dynamicgraph
::
SignalBase
;
...
...
src/signal-caster-py.cc
→
src/
dynamic_graph/
signal-caster-py.cc
View file @
7c44de53
...
...
@@ -6,7 +6,7 @@
#include
<dynamic-graph/signal-caster.h>
#include
"dynamic-graph-py.hh"
#include
"dynamic-graph
/python/dynamic-graph
-py.hh"
namespace
dynamicgraph
{
namespace
python
{
...
...
src/signal-wrapper.cc
→
src/
dynamic_graph/
signal-wrapper.cc
View file @
7c44de53
// Copyright (c) 2018, Joseph Mirabel
// Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
#include
"signal-wrapper.hh"
#include
<Python.h>
#include
<dynamic-graph/factory.h>
#include
<dynamic-graph/command-bind.h>
#include
"dynamic-graph/python/signal-wrapper.hh"
namespace
dynamicgraph
{
namespace
python
{
namespace
signalWrapper
{
...
...
src/interpreter.cc
View file @
7c44de53
...
...
@@ -4,7 +4,7 @@
#include
<iostream>
#include
"dynamic-graph/debug.h"
#include
"dynamic-graph/python/interpreter.hh"
#include
"link-to-python.hh"
#include
"
dynamic-graph/python/
link-to-python.hh"
#include
<boost/python/errors.hpp>
#include
<boost/python/object.hpp>
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment