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

cmake: fix python version comparison due to whitespace #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

katrinafyi
Copy link

@katrinafyi katrinafyi commented Feb 6, 2024

Previously, there were warnings such as:

CMake Warning at CMakeLists.txt:131 (message):
  /usr/bin/python3.11 --version is 3.11.7

  , which is less then the minimum required, 3.5.2; disabling building of
  API.

The presence of whitespace turns VERSION_LESS into a lexicographic comparison, so python versions >=3.10 incorrectly compare less.

This change should fix this.

(using cmake 3.28.1)

Previously, there was warnings such as:
```
CMake Warning at CMakeLists.txt:131 (message):
  /usr/bin/python3.11 --version is 3.11.7

  , which is less then the minimum required, 3.5.2; disabling building of
  API.
```
The presence of whitespace turned VERSION_LESS into a lexicographic comparison, so python versions >=3.10 would incorrectly compare less.

This change should fix this.
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.

1 participant