Skip to content

Suppress CMake version warning coming from Pybind11#789

Merged
mhucka merged 3 commits into
masterfrom
mh-suppress-cmake-warning
Jun 21, 2025
Merged

Suppress CMake version warning coming from Pybind11#789
mhucka merged 3 commits into
masterfrom
mh-suppress-cmake-warning

Conversation

@mhucka
Copy link
Copy Markdown
Collaborator

@mhucka mhucka commented Jun 19, 2025

When building using cibuildwheel, the following warning is printed:

 CMake Deprecation Warning at .../pybind11-src/CMakeLists.txt:13
 (cmake_minimum_required):
    Compatibility with CMake < 3.10 will be removed from a future
    version of
    CMake.

    Update the VERSION argument <min> value.  Or, use the
    <min>...<max> syntax to tell CMake that the project requires
    at least <min> but has been updated to work with policies
    introduced by <max> or earlier.

The warning is coming from Pybind11's CMake files, not ours. We can't do anything about it, and we end up wasting time looking for the cause in qsim's files.

The change in this PR suppresses deprecation warnings around the part where Pybind11 is included.

This change should be reverted when Pybind11 updates the minimum required CMake version to a number that doesn't trigger the warning.

When building using cibuildwheel, the following warning is printed:

```
 CMake Deprecation Warning at .../pybind11-src/CMakeLists.txt:13
 (cmake_minimum_required):
    Compatibility with CMake < 3.10 will be removed from a future
    version of
    CMake.

    Update the VERSION argument <min> value.  Or, use the
    <min>...<max> syntax to tell CMake that the project requires
    at least <min> but has been updated to work with policies
    introduced by <max> or earlier.

```

This is coming from Pybind11's CMake files. We can't do anything about
it, and our devs end up wasting time looking for the cause in qsim's
files.

The change here suppresses deprecation warnings around the part where
Pybind11 is included.

This change should be reverted when Pybind11 updates the minimum
required CMake version to a number that doesn't trigger the warning.
@mhucka mhucka marked this pull request as ready for review June 19, 2025 22:01
@mhucka mhucka enabled auto-merge (squash) June 20, 2025 23:49
@mhucka mhucka merged commit 1bdb936 into master Jun 21, 2025
48 checks passed
@mhucka mhucka deleted the mh-suppress-cmake-warning branch June 21, 2025 00:06
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.

2 participants