Skip to content

pybind11Tools.cmake - unknown argument specified #4325

Closed
@gitartpiano

Description

@gitartpiano

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions