From 7fa8ae794ac1de1b95dc094b0593386586376a28 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Fri, 4 Mar 2022 15:18:45 -0800 Subject: [PATCH] Docs: No Strip in Debug The docs were not 100% the same as we advertise with our tooling function: most users do not want to strip symbols in Debug builds. --- docs/compiling.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/compiling.rst b/docs/compiling.rst index 75608bd576..574dfe6e10 100644 --- a/docs/compiling.rst +++ b/docs/compiling.rst @@ -509,7 +509,10 @@ You can use these targets to build complex applications. For example, the target_link_libraries(example PRIVATE pybind11::module pybind11::lto pybind11::windows_extras) pybind11_extension(example) - pybind11_strip(example) + if(NOT MSVC AND NOT ${CMAKE_BUILD_TYPE} MATCHES Debug|RelWithDebInfo) + # Strip unnecessary sections of the binary on Linux/macOS + pybind11_strip(example) + endif() set_target_properties(example PROPERTIES CXX_VISIBILITY_PRESET "hidden" CUDA_VISIBILITY_PRESET "hidden")