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

fix pybind11Tools.cmake typo causing Unknown arguments #4327

Merged
merged 2 commits into from Nov 12, 2022
Merged

fix pybind11Tools.cmake typo causing Unknown arguments #4327

merged 2 commits into from Nov 12, 2022

Conversation

gitartpiano
Copy link
Contributor

@gitartpiano gitartpiano commented Nov 11, 2022

Description

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

The code that needs the fix was introduced with PR #4078.

Suggested changelog entry:

Fixed: A bug in two pybind11/tools cmake scripts causing "Unknown arguments specified" errors.

CMake Error at pybind11/tools/pybind11Tools.cmake:217 (if):
  if given arguments:
    "NOT" "MSVC" "AND" "NOT" "TEST" "MATCHES" "DEBUG|RELWITHDEBINFO"
  Unknown arguments specified
#4325
@rwgk
Copy link
Collaborator

rwgk commented Nov 11, 2022

@ddinu could you please help reviewing this PR? — I don't know much about cmake, in particular the rules for using quotes.

@ddinu
Copy link
Contributor

ddinu commented Nov 11, 2022

This looks ok to me, but please make the same change in the pybind11NewTools.cmake file too.

@henryiii
Copy link
Collaborator

I guess it's triggering a keyword TEST instead of "TEST" the string. Agree, same change in both places.

@rwgk
Copy link
Collaborator

rwgk commented Nov 12, 2022

The CI run sets a new record for the number of clearly unrelated flakes:

  • CI / 🐍 pypy-3.9 • windows-2022 • x64 — PyPy refcount mismatch (occasional flake)
  • CI / 🐍 3.6 • macos-latest • x64 — Fatal Python error: This thread state must be current when releasing (only seen since we introduced -DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON, root cause unknown)
  • CI / 🐍 3 • almalinux:8 • x64 — almalinux.org Yum repo downloading error

Rerunning these is pointless, the cmake changes are more than certainly covered.

I'll go ahead and merge this PR.

Thanks @ddinu for the review. Thanks @gitartpiano for the fix.

@rwgk rwgk merged commit 88b019a into pybind:master Nov 12, 2022
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Nov 12, 2022
rwgk added a commit that referenced this pull request 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 <rwgk@google.com>
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Dec 20, 2022
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

Successfully merging this pull request may close these issues.

None yet

4 participants