Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-xt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
ag-ohlberger
dune-community
dune-xt
Commits
f516eb63
Unverified
Commit
f516eb63
authored
7 years ago
by
René Milk
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #5 from dune-community/visibility_updates
Visibility updates
parents
ffc998a5
3c0e3746
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!10
Fix compilation with new clang
,
!6
Merge pybind
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmake/modules/DunePybindxiUtils.cmake
+20
-0
20 additions, 0 deletions
cmake/modules/DunePybindxiUtils.cmake
dune/pybindxi/interpreter.hh
+3
-1
3 additions, 1 deletion
dune/pybindxi/interpreter.hh
pybind11/tools/FindPythonLibsNew.cmake
+1
-0
1 addition, 0 deletions
pybind11/tools/FindPythonLibsNew.cmake
with
24 additions
and
1 deletion
cmake/modules/DunePybindxiUtils.cmake
+
20
−
0
View file @
f516eb63
...
@@ -113,6 +113,8 @@ function(dune_pybindxi_add_module target_name)
...
@@ -113,6 +113,8 @@ function(dune_pybindxi_add_module target_name)
# namespace; also turning it on for a pybind module compilation here avoids
# namespace; also turning it on for a pybind module compilation here avoids
# potential warnings or issues from having mixed hidden/non-hidden types.
# potential warnings or issues from having mixed hidden/non-hidden types.
set_target_properties
(
${
target_name
}
PROPERTIES CXX_VISIBILITY_PRESET
"hidden"
)
set_target_properties
(
${
target_name
}
PROPERTIES CXX_VISIBILITY_PRESET
"hidden"
)
set_target_properties
(
${
target_name
}
PROPERTIES VISIBILITY_INLINES_HIDDEN TRUE
)
if
(
WIN32 OR CYGWIN
)
if
(
WIN32 OR CYGWIN
)
# Link against the Python shared library on Windows
# Link against the Python shared library on Windows
...
@@ -179,3 +181,21 @@ function(dune_pybindxi_add_module target_name)
...
@@ -179,3 +181,21 @@ function(dune_pybindxi_add_module target_name)
endif
()
endif
()
endif
()
endif
()
endfunction
()
endfunction
()
macro
(
dxt_add_make_dependent_bindings
)
add_custom_target
(
dependent_bindings
)
if
(
TARGET bindings AND NOT DXT_NO_AUTO_BINDINGS_DEPENDS
)
add_dependencies
(
bindings dependent_bindings
)
endif
()
foreach
(
_mod
${
ARGN
}
)
dune_module_path
(
MODULE
${
_mod
}
RESULT
${
_mod
}
_binary_dir
BUILD_DIR
)
set
(
tdir
${${
_mod
}
_binary_dir
}
)
if
(
IS_DIRECTORY
${
tdir
}
)
add_custom_target
(
${
_mod
}
_bindings
COMMAND
${
CMAKE_COMMAND
}
--build
${
tdir
}
--target bindings
)
add_dependencies
(
dependent_bindings
${
_mod
}
_bindings
)
endif
()
endforeach
()
endmacro
()
This diff is collapsed.
Click to expand it.
dune/pybindxi/interpreter.hh
+
3
−
1
View file @
f516eb63
...
@@ -15,6 +15,8 @@
...
@@ -15,6 +15,8 @@
#include
<map>
#include
<map>
#include
<string>
#include
<string>
#include
<dune/common/visibility.hh>
#include
"embed.h"
#include
"embed.h"
namespace
Dune
{
namespace
Dune
{
...
@@ -33,7 +35,7 @@ private:
...
@@ -33,7 +35,7 @@ private:
std
::
map
<
std
::
string
,
pybind11
::
module
>
modules_
;
std
::
map
<
std
::
string
,
pybind11
::
module
>
modules_
;
};
// class ScopedInterpreter
};
// class ScopedInterpreter
ScopedInterpreter
&
GlobalInterpreter
();
DUNE_EXPORT
ScopedInterpreter
&
GlobalInterpreter
();
}
// namespace PybindXI
}
// namespace PybindXI
}
// namespace Dune
}
// namespace Dune
...
...
This diff is collapsed.
Click to expand it.
pybind11/tools/FindPythonLibsNew.cmake
+
1
−
0
View file @
f516eb63
...
@@ -177,6 +177,7 @@ SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
...
@@ -177,6 +177,7 @@ SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
dune_register_package_flags
(
dune_register_package_flags
(
INCLUDE_DIRS
${
PYTHON_INCLUDE_DIRS
}
INCLUDE_DIRS
${
PYTHON_INCLUDE_DIRS
}
LIBRARIES
${
PYTHON_LIBRARIES
}
LIBRARIES
${
PYTHON_LIBRARIES
}
COMPILE_OPTIONS -fvisibility-inlines-hidden -fvisibility=hidden
)
)
find_package_message
(
PYTHON
find_package_message
(
PYTHON
...
...
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