Skip to content

cmake: fix python version comparison due to whitespace#64

Open
katrinafyi wants to merge 1 commit intoGrammaTech:masterfrom
rina-forks:patch-1
Open

cmake: fix python version comparison due to whitespace#64
katrinafyi wants to merge 1 commit intoGrammaTech:masterfrom
rina-forks:patch-1

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