Skip to content

Commit e0c3750

Browse files
committed
Comment out "hidden" in cmake files, setup_helpers.py, disable PYBIND11_WERROR
1 parent 0ec9e31 commit e0c3750

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

pybind11/setup_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
149149
if WIN:
150150
cflags += ["/EHsc", "/bigobj"]
151151
else:
152-
cflags += ["-fvisibility=hidden"]
152+
# cflags += ["-fvisibility=hidden"]
153153
env_cflags = os.environ.get("CFLAGS", "")
154154
env_cppflags = os.environ.get("CPPFLAGS", "")
155155
c_cpp_flags = shlex.split(env_cflags) + shlex.split(env_cppflags)

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ function(pybind11_enable_warnings target_name)
387387
-Wnon-virtual-dtor)
388388
endif()
389389

390-
if(PYBIND11_WERROR)
390+
if(PYBIND11_WERROR AND NOT PYBIND11_WERROR) # SILLY TRICK TO TURN OFF
391391
if(MSVC)
392392
target_compile_options(${target_name} PRIVATE /WX)
393393
elseif(PYBIND11_CUDA_TESTS)

tools/pybind11NewTools.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,13 @@ function(pybind11_add_module target_name)
208208
# py::module_local). We force it on everything inside the `pybind11`
209209
# namespace; also turning it on for a pybind module compilation here avoids
210210
# potential warnings or issues from having mixed hidden/non-hidden types.
211-
if(NOT DEFINED CMAKE_CXX_VISIBILITY_PRESET)
212-
set_target_properties(${target_name} PROPERTIES CXX_VISIBILITY_PRESET "hidden")
213-
endif()
211+
# if(NOT DEFINED CMAKE_CXX_VISIBILITY_PRESET)
212+
# set_target_properties(${target_name} PROPERTIES CXX_VISIBILITY_PRESET "hidden")
213+
# endif()
214214

215-
if(NOT DEFINED CMAKE_CUDA_VISIBILITY_PRESET)
216-
set_target_properties(${target_name} PROPERTIES CUDA_VISIBILITY_PRESET "hidden")
217-
endif()
215+
# if(NOT DEFINED CMAKE_CUDA_VISIBILITY_PRESET)
216+
# set_target_properties(${target_name} PROPERTIES CUDA_VISIBILITY_PRESET "hidden")
217+
# endif()
218218

219219
# If we don't pass a WITH_SOABI or WITHOUT_SOABI, use our own default handling of extensions
220220
if(NOT ARG_WITHOUT_SOABI AND NOT "WITH_SOABI" IN_LIST ARG_UNPARSED_ARGUMENTS)

tools/pybind11Tools.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,13 @@ function(pybind11_add_module target_name)
188188
# py::module_local). We force it on everything inside the `pybind11`
189189
# namespace; also turning it on for a pybind module compilation here avoids
190190
# potential warnings or issues from having mixed hidden/non-hidden types.
191-
if(NOT DEFINED CMAKE_CXX_VISIBILITY_PRESET)
192-
set_target_properties(${target_name} PROPERTIES CXX_VISIBILITY_PRESET "hidden")
193-
endif()
191+
# if(NOT DEFINED CMAKE_CXX_VISIBILITY_PRESET)
192+
# set_target_properties(${target_name} PROPERTIES CXX_VISIBILITY_PRESET "hidden")
193+
# endif()
194194

195-
if(NOT DEFINED CMAKE_CUDA_VISIBILITY_PRESET)
196-
set_target_properties(${target_name} PROPERTIES CUDA_VISIBILITY_PRESET "hidden")
197-
endif()
195+
# if(NOT DEFINED CMAKE_CUDA_VISIBILITY_PRESET)
196+
# set_target_properties(${target_name} PROPERTIES CUDA_VISIBILITY_PRESET "hidden")
197+
# endif()
198198

199199
if(ARG_NO_EXTRAS)
200200
return()

0 commit comments

Comments
 (0)