Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pybind11Tools.cmake - unknown argument specified #4325

Closed
gitartpiano opened this issue Nov 10, 2022 · 2 comments
Closed

pybind11Tools.cmake - unknown argument specified #4325

gitartpiano opened this issue Nov 10, 2022 · 2 comments

Comments

@gitartpiano
Copy link
Contributor

The symptom:

CMake Error at vendor/pybind11/tools/pybind11Tools.cmake:217 (if):
  if given arguments:
    "NOT" "MSVC" "AND" "NOT" "TEST" "MATCHES" "DEBUG|RELWITHDEBINFO"
  Unknown arguments specified

The fix I have found:
Was:

if(NOT MSVC AND NOT ${uppercase_CMAKE_BUILD_TYPE} MATCHES DEBUG|RELWITHDEBINFO)

Changed to:

if(NOT MSVC AND NOT "${uppercase_CMAKE_BUILD_TYPE}" MATCHES DEBUG|RELWITHDEBINFO)

At:

if(NOT MSVC AND NOT ${uppercase_CMAKE_BUILD_TYPE} MATCHES DEBUG|RELWITHDEBINFO)

Please consider applying this fix, or suggesting a better solution to above error.

@gitartpiano
Copy link
Contributor Author

gitartpiano commented Nov 10, 2022

The version I have found the problem in: v2.10.1

rwgk pushed a commit that referenced this issue Nov 12, 2022
* 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]>
@Skylion007
Copy link
Collaborator

Closed by #4327

rwgk pushed a commit that referenced this issue Nov 18, 2022
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants