Skip to content
Snippets Groups Projects
Verified Commit f6f9058b authored by René Fritze's avatar René Fritze
Browse files

[cmake] use and export to dependees correct visibility settings

parent aba646d3
No related branches found
No related tags found
2 merge requests!10Fix compilation with new clang,!6Merge pybind
...@@ -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
......
...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment