Skip to content

Commit

Permalink
fix pybind11Tools.cmake typo causing Unknown arguments (#4327)
Browse files Browse the repository at this point in the history
* 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
#4325

* Apply the same fix in tools/pybind11NewTools.cmake

Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
  • Loading branch information
gitartpiano and rwgk committed Nov 18, 2022
1 parent e76293d commit 4625adc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/pybind11NewTools.cmake
Expand Up @@ -235,7 +235,7 @@ function(pybind11_add_module target_name)

# 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)
if(NOT MSVC AND NOT "${uppercase_CMAKE_BUILD_TYPE}" MATCHES DEBUG|RELWITHDEBINFO)
# Strip unnecessary sections of the binary on Linux/macOS
pybind11_strip(${target_name})
endif()
Expand Down
2 changes: 1 addition & 1 deletion tools/pybind11Tools.cmake
Expand Up @@ -214,7 +214,7 @@ function(pybind11_add_module target_name)

# 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)
if(NOT MSVC AND NOT "${uppercase_CMAKE_BUILD_TYPE}" MATCHES DEBUG|RELWITHDEBINFO)
pybind11_strip(${target_name})
endif()

Expand Down

0 comments on commit 4625adc

Please sign in to comment.