mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 13:15:12 +00:00
parent
690a115d84
commit
4bf60c609a
@ -233,11 +233,13 @@ function(pybind11_add_module target_name)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Use case-insensitive comparison to match the result of $<CONFIG:cfgs>
|
if(DEFINED CMAKE_BUILD_TYPE) # see https://github.com/pybind/pybind11/issues/4454
|
||||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
# Use case-insensitive comparison to match the result of $<CONFIG:cfgs>
|
||||||
if(NOT MSVC AND NOT "${uppercase_CMAKE_BUILD_TYPE}" MATCHES DEBUG|RELWITHDEBINFO)
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
||||||
# Strip unnecessary sections of the binary on Linux/macOS
|
if(NOT MSVC AND NOT "${uppercase_CMAKE_BUILD_TYPE}" MATCHES DEBUG|RELWITHDEBINFO)
|
||||||
pybind11_strip(${target_name})
|
# Strip unnecessary sections of the binary on Linux/macOS
|
||||||
|
pybind11_strip(${target_name})
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
|
@ -212,10 +212,12 @@ function(pybind11_add_module target_name)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Use case-insensitive comparison to match the result of $<CONFIG:cfgs>
|
if(DEFINED CMAKE_BUILD_TYPE) # see https://github.com/pybind/pybind11/issues/4454
|
||||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
# Use case-insensitive comparison to match the result of $<CONFIG:cfgs>
|
||||||
if(NOT MSVC AND NOT "${uppercase_CMAKE_BUILD_TYPE}" MATCHES DEBUG|RELWITHDEBINFO)
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
||||||
pybind11_strip(${target_name})
|
if(NOT MSVC AND NOT "${uppercase_CMAKE_BUILD_TYPE}" MATCHES DEBUG|RELWITHDEBINFO)
|
||||||
|
pybind11_strip(${target_name})
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
|
Loading…
Reference in New Issue
Block a user