-
Notifications
You must be signed in to change notification settings - Fork 629
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
Build-time options for where to get Imath #944
Conversation
It's super convenient that the openexr build will automatically download and incorporate Imath. But what if you want to test a specific Imath PR, experimental changes in your own repo, or simply want to sync to a particular commit or branch that is different than what's hard coded? This patch adds cmake options that let you set the repo and the tag for the Imath auto-build. Of course, they default to the official ASWF Imath repo and the master branch (which will be changed to a release tag, when it exists). Signed-off-by: Larry Gritz <[email protected]>
@@ -246,6 +246,11 @@ endif() | |||
####################################### | |||
|
|||
# Check to see if Imath is installed outside of the current build directory. | |||
set(IMATH_REPO "https://github.com/AcademySoftwareFoundation/Imath.git" CACHE STRING | |||
"Repo for auto-build of Imath") | |||
set(IMATH_TAG "master" CACHE STRING |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to pin it to a specific version instead of using master?
What happens if I check out this state in one year - may be in the meanwhile something has changed which breaks the build, because the future Imath master does not work with this version - I would suggest pinning it to a specific version - same is done here: https://github.com/AcademySoftwareFoundation/openexr/blob/master/bazel/third_party/openexr.bzl
The Bazel build could also use master for Imath - but this would make also testing in the CI random
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what the comment says right after that -- that it's "master" but needs to be changed by the release, so point to a specific tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 253:
#TODO: ^^ Release should not clone from master, this is a place holder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry - I should read everything ;)
The other thing that this patch enables is to make it easy for our CI to test openexr versus different Imath versions. In particular, while we usually will build against the latest Imath release, we can have one test always build against Imath master ("has anything gone into imath recently that breaks openexr?"). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
is it also possible to point to a local working copy of Imath to build from? That would help when modifying Imath and immediately testing the changes in OpenEXR. Otherwise, it would be necessary to reinstall Imath before rebuilding OpenEXR, or else doing a commit and push to a git repo, each time there was a change |
@peterhillman I'm pretty sure that already works, with |
Oh, I see what you mean. Just make OpenEXR pick it up from your other checkout, not that you have to build/install first. |
@peterhillman I think that's a good idea, but possibly a bigger change to the build logic. |
It's super convenient that the openexr build will automatically download
and incorporate Imath. But what if you want to test a specific Imath
PR, experimental changes in your own repo, or simply want to sync to a
particular commit or branch that is different than what's hard coded?
This patch adds cmake options that let you set the repo and the tag
for the Imath auto-build. Of course, they default to the official
ASWF Imath repo and the master branch (which will be changed to a release
tag, when it exists).
Signed-off-by: Larry Gritz [email protected]