File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -233,7 +233,9 @@ function(pybind11_add_module target_name)
233233 endif ()
234234 endif ()
235235
236- if (NOT MSVC AND NOT ${CMAKE_BUILD_TYPE} MATCHES Debug|RelWithDebInfo)
236+ # Use case-insensitive comparison to match the result of $<CONFIG:cfgs>
237+ string (TOUPPER "${CMAKE_BUILD_TYPE} " uppercase_CMAKE_BUILD_TYPE)
238+ if (NOT MSVC AND NOT ${uppercase_CMAKE_BUILD_TYPE} MATCHES DEBUG|RELWITHDEBINFO)
237239 # Strip unnecessary sections of the binary on Linux/macOS
238240 pybind11_strip(${target_name} )
239241 endif ()
Original file line number Diff line number Diff line change @@ -208,7 +208,9 @@ function(pybind11_add_module target_name)
208208 endif ()
209209 endif ()
210210
211- if (NOT MSVC AND NOT ${CMAKE_BUILD_TYPE} MATCHES Debug|RelWithDebInfo)
211+ # Use case-insensitive comparison to match the result of $<CONFIG:cfgs>
212+ string (TOUPPER "${CMAKE_BUILD_TYPE} " uppercase_CMAKE_BUILD_TYPE)
213+ if (NOT MSVC AND NOT ${uppercase_CMAKE_BUILD_TYPE} MATCHES DEBUG|RELWITHDEBINFO)
212214 pybind11_strip(${target_name} )
213215 endif ()
214216
You can’t perform that action at this time.
0 commit comments