GrammaTech / gtirb

Intermediate Representation for Binary analysis and transformation
https://grammatech.github.io/gtirb/
Other
305 stars 36 forks source link

cmake: fix python version comparison due to whitespace #64

Open katrinafyi opened 7 months ago

katrinafyi commented 7 months ago

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)