-
Notifications
You must be signed in to change notification settings - Fork 65
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
Checkout PyNE submodule as part of CMake #734
Conversation
5aaee81
to
22b0035
Compare
Did the command-line change for newer version of git? The 18.04 image is using git 2.17.1 and the 16.04 image is using git 2.7.4. The former fails on the submodule and the latter is successful. |
Huh, no I don't think it has. I'll dig into it right now. |
badc5d8
to
db1b907
Compare
I think you need a https://cliutils.gitlab.io/modern-cmake/chapters/projects/submodule.html |
db1b907
to
8aad1e9
Compare
8aad1e9
to
04b4672
Compare
Thanks for putting that reference in here btw. That's where this pattern came from. |
I believe, the git error is: |
I saw ‘4’ as the failing pathspec before on the first failure!?! |
The strange thing is that it works fine on 16.04 |
Right! It's pretty strange. It seems like something extra is getting added to the command. |
9e8e4ee
to
d817f7f
Compare
Installed a newer version of CMake in CI to get the exact command being run. Not super helpful...
|
c4ddd68
to
f9754de
Compare
f9754de
to
3f0e4c7
Compare
Wow. I can hardly believe what the problem was. Apparently having the
And it fails with the same error. The The fix I've added in 3f0e4c7 is just temporary. I think a better long-term solution is to update the |
Though now that I say that... if we find that updating the docker images will take some time I wouldn't mind getting this solution in sooner as it's holding up some downstream progress elsewhere. |
Wild!!! check out this file (search for "jobs") from the official git repo: https://github.com/git/git/blob/3a0b884caba2752da0af626fb2de7d597c844e8b/git-submodule.sh |
I think we should also remove the |
I'm working on rebuilding docker images now, by the way. |
Thanks @pshriwise |
Description
Adds an option (default ON) to checkout the PyNE submodule as part of the CMake configuration step.
Motivation and Context
The addition of this submodule in DAGMC makes updates of PyNE in DAGMC more elegant, but it also requires an extra manual step in DAGMC installation (
git submodule update --init
). There are many build scripts/CI scripts out there that don't include this step and will break as a result.Changes
This PR incorporates the submodule initialization and update into the CMake step, meaning that no external build scripts will need to change due to the use of PyNE as a submodule.
Behavior
As mentioned above, a section has been added to
CMakeLists.txt
that will checkout the PyNE submodule automatically. Ifgit
is found on the system, the optionGIT_SUBMODULE
is added with a default value ofON
. This option can be turned off for development with new versions of PyNE in DAGMC (another benefit of using the submodule as opposed to the previous approach). Ifgit
is not available, then this option will not appear in the CMake configuration and we will expect that the PyNE submodule is already present in the DAGMC source.