mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 06:35:12 +00:00
fix pybind11Tools.cmake typo causing Unknown arguments (#4327)
* fix pybind11Tools.cmake typo causing Unknown arguments CMake Error at pybind11/tools/pybind11Tools.cmake:217 (if): if given arguments: "NOT" "MSVC" "AND" "NOT" "TEST" "MATCHES" "DEBUG|RELWITHDEBINFO" Unknown arguments specified https://github.com/pybind/pybind11/issues/4325 * Apply the same fix in tools/pybind11NewTools.cmake Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
This commit is contained in:
parent
1f04cc7062
commit
88b019a8a5
@ -235,7 +235,7 @@ function(pybind11_add_module target_name)
|
|||||||
|
|
||||||
# Use case-insensitive comparison to match the result of $<CONFIG:cfgs>
|
# Use case-insensitive comparison to match the result of $<CONFIG:cfgs>
|
||||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
||||||
if(NOT MSVC AND NOT ${uppercase_CMAKE_BUILD_TYPE} MATCHES DEBUG|RELWITHDEBINFO)
|
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()
|
||||||
|
@ -214,7 +214,7 @@ function(pybind11_add_module target_name)
|
|||||||
|
|
||||||
# Use case-insensitive comparison to match the result of $<CONFIG:cfgs>
|
# Use case-insensitive comparison to match the result of $<CONFIG:cfgs>
|
||||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
||||||
if(NOT MSVC AND NOT ${uppercase_CMAKE_BUILD_TYPE} MATCHES DEBUG|RELWITHDEBINFO)
|
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