Skip to content

Commit 88b019a

Browse files
gitartpianorwgk
andauthored
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 #4325 * Apply the same fix in tools/pybind11NewTools.cmake Co-authored-by: Ralf W. Grosse-Kunstleve <[email protected]>
1 parent 1f04cc7 commit 88b019a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/pybind11NewTools.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ function(pybind11_add_module target_name)
235235

236236
# Use case-insensitive comparison to match the result of $<CONFIG:cfgs>
237237
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
238-
if(NOT MSVC AND NOT ${uppercase_CMAKE_BUILD_TYPE} MATCHES DEBUG|RELWITHDEBINFO)
238+
if(NOT MSVC AND NOT "${uppercase_CMAKE_BUILD_TYPE}" MATCHES DEBUG|RELWITHDEBINFO)
239239
# Strip unnecessary sections of the binary on Linux/macOS
240240
pybind11_strip(${target_name})
241241
endif()

tools/pybind11Tools.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ function(pybind11_add_module target_name)
214214

215215
# Use case-insensitive comparison to match the result of $<CONFIG:cfgs>
216216
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
217-
if(NOT MSVC AND NOT ${uppercase_CMAKE_BUILD_TYPE} MATCHES DEBUG|RELWITHDEBINFO)
217+
if(NOT MSVC AND NOT "${uppercase_CMAKE_BUILD_TYPE}" MATCHES DEBUG|RELWITHDEBINFO)
218218
pybind11_strip(${target_name})
219219
endif()
220220

0 commit comments

Comments
 (0)