mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-11 08:03:55 +00:00
fix(cmake): use case-insensitive CMAKE_BUILD_TYPE comparisons (#4078)
This commit is contained in:
parent
29f4940cd4
commit
8a4bca8216
@ -233,7 +233,9 @@ function(pybind11_add_module target_name)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT MSVC AND NOT ${CMAKE_BUILD_TYPE} MATCHES Debug|RelWithDebInfo)
|
# Use case-insensitive comparison to match the result of $<CONFIG:cfgs>
|
||||||
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
||||||
|
if(NOT MSVC AND NOT ${uppercase_CMAKE_BUILD_TYPE} MATCHES DEBUG|RELWITHDEBINFO)
|
||||||
# Strip unnecessary sections of the binary on Linux/macOS
|
# Strip unnecessary sections of the binary on Linux/macOS
|
||||||
pybind11_strip(${target_name})
|
pybind11_strip(${target_name})
|
||||||
endif()
|
endif()
|
||||||
|
@ -208,7 +208,9 @@ function(pybind11_add_module target_name)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT MSVC AND NOT ${CMAKE_BUILD_TYPE} MATCHES Debug|RelWithDebInfo)
|
# Use case-insensitive comparison to match the result of $<CONFIG:cfgs>
|
||||||
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
||||||
|
if(NOT MSVC AND NOT ${uppercase_CMAKE_BUILD_TYPE} MATCHES DEBUG|RELWITHDEBINFO)
|
||||||
pybind11_strip(${target_name})
|
pybind11_strip(${target_name})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user