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

Make finding python version more robust #1927

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ option(ONNX_MLIR_SUPPRESS_THIRD_PARTY_WARNINGS "Suppress warning in third_party

set(CMAKE_CXX_STANDARD 17)

# New in cmake 3.15:
# https://cmake.org/cmake/help/latest/policy/CMP0094.html
# Stops python lookup as soon as a version satisfying version constraints
# is found.
if (POLICY CMP0094)
cmake_policy(SET CMP0094 NEW)
endif()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this requires 3.15, the minimum required cmake version (currently 3.13.4) should be bumped up to 3.15.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gongsu832 would it be fine to bump to 3.15? Or are we help back to lower version because of some dependence?

@nhat-nguyen would you be willing to try moving us up to 3.15 if appropriate? Tx

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

definitely, i can try moving us up to 3.15

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we currently use 3.13.4 because that's what llvm uses. There is a comment in llvm that starting from llvm 17 they will require cmake 20.2 and they suggested to move up to 20.2 directly. This would require we move our Ubuntu base docker image from focal to jammy. I will create a PR to do that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gongsu832 please link the PR so @nhat-nguyen will know when we may proceed with this one, thanks


# On systems that still have legacy lib64 directories (e.g., rhel/fedora,
# etc.), by default some components (e.g., cmake) install into lib while
# others (e.g., python) install into lib64.
Expand Down