Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.extension
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
bob
bob.extension
Commits
82fe0d0a
Commit
82fe0d0a
authored
10 years ago
by
Manuel Günther
Browse files
Options
Downloads
Patches
Plain Diff
**Disabled** the RPATH for bob libraries; they have to import their libraries themselves now
parent
c92378eb
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
bob/extension/__init__.py
+5
-3
5 additions, 3 deletions
bob/extension/__init__.py
bob/extension/cmake.py
+2
-1
2 additions, 1 deletion
bob/extension/cmake.py
with
7 additions
and
4 deletions
bob/extension/__init__.py
+
5
−
3
View file @
82fe0d0a
...
...
@@ -285,7 +285,7 @@ class Extension(DistutilsExtension):
parameters
=
{
'
define_macros
'
:
generate_self_macros
(
name
,
version
),
'
extra_compile_args
'
:
[
'
-std=c++0x
'
],
#synonym for c++11?
'
library_dirs
'
:
bob_library_dirs
,
'
library_dirs
'
:
[]
,
'
libraries
'
:
bob_libraries
,
}
...
...
@@ -392,6 +392,9 @@ class Extension(DistutilsExtension):
kwargs
[
'
runtime_library_dirs
'
]
+=
kwargs
[
'
library_dirs
'
]
kwargs
[
'
runtime_library_dirs
'
]
=
uniq
(
kwargs
[
'
runtime_library_dirs
'
])
# .. except for the bob libraries
kwargs
[
'
library_dirs
'
]
+=
bob_library_dirs
# Run the constructor for the base class
DistutilsExtension
.
__init__
(
self
,
name
,
sources
,
**
kwargs
)
...
...
@@ -541,7 +544,7 @@ class build_ext(_build_ext):
2. adds the according include and library directories so that other Extensions can find the newly generated libs
.. note::
This function
**does not**
add the library itself.
This function
also
add
s
the library itself.
To link the generated library into another Extension, add this lib in the list of ``libraries``.
3. compiles the remaining extensions using the default extension mechanism
...
...
@@ -572,7 +575,6 @@ class build_ext(_build_ext):
for
ext
in
self
.
extensions
:
ext
.
libraries
=
libs
+
(
ext
.
libraries
if
ext
.
libraries
else
[])
ext
.
library_dirs
=
lib_dirs
+
(
ext
.
library_dirs
if
ext
.
library_dirs
else
[])
ext
.
runtime_library_dirs
=
lib_dirs
+
(
ext
.
runtime_library_dirs
if
ext
.
runtime_library_dirs
else
[])
ext
.
include_dirs
=
include_dirs
+
(
ext
.
include_dirs
if
ext
.
include_dirs
else
[])
# call the base class function
...
...
This diff is collapsed.
Click to expand it.
bob/extension/cmake.py
+
2
−
1
View file @
82fe0d0a
...
...
@@ -16,7 +16,7 @@ HEADER = (
'
\n
'
'
# Force __LP64__ scheme on Mac OSX
\n
'
'
if(APPLE)
\n
'
'
set(CMAKE_MACOSX_RPATH FALSE CACHE BOOL
"
Enables the MACOS_RPATH feature for MacOSX builds
"
FORCE)
\n
'
'
set(CMAKE_MACOSX_RPATH FALSE CACHE BOOL
"
Enables the MACOS_RPATH feature for MacOSX builds
"
FORCE)
\n
'
'
set(COMMON_FLAGS
"
${COMMON_FLAGS} -m64
"
)
\n
'
'
endif(APPLE)
\n
'
'
\n
'
...
...
@@ -106,6 +106,7 @@ class CMakeListsGenerator:
for
directory
in
self
.
system_includes
:
f
.
write
(
'
include_directories(SYSTEM %s)
\n
'
%
directory
)
# add link directories
# TODO: handle RPATH and Non-RPATH differently (don't know, how, though)
for
directory
in
self
.
library_directories
:
f
.
write
(
'
link_directories(%s)
\n
'
%
directory
)
# add defines
...
...
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