Skip to content

Commit cd58be7

Browse files
committed
Remove visibility=hidden build/install separation
1 parent dbd24fb commit cd58be7

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ if(NOT (CMAKE_VERSION VERSION_LESS 3.0)) # CMake >= 3.0
9292
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
9393
target_compile_options(pybind11 INTERFACE $<BUILD_INTERFACE:${PYBIND11_CPP_STANDARD}>)
9494
if(NOT MSVC)
95-
target_compile_options(pybind11 INTERFACE $<BUILD_INTERFACE:-fvisibility=hidden>)
95+
target_compile_options(pybind11 INTERFACE -fvisibility=hidden)
9696
endif()
9797

9898
add_library(module INTERFACE)

tools/pybind11Config.cmake.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,6 @@ if(NOT TARGET ${PN}::pybind11)
9191
endif()
9292

9393
set_property(TARGET ${PN}::pybind11 APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "${PYBIND11_CPP_STANDARD}")
94-
if(NOT MSVC)
95-
set_property(TARGET ${PN}::pybind11 APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "-fvisibility=hidden")
96-
endif()
9794

9895
get_property(_iid TARGET ${PN}::pybind11 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
9996
get_property(_ill TARGET ${PN}::module PROPERTY INTERFACE_LINK_LIBRARIES)

0 commit comments

Comments
 (0)