-
Notifications
You must be signed in to change notification settings - Fork 22
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
Use CMake FetchContent to support both stable and HEAD ghidra #15
Conversation
Quite a few changes that should hopefully be explained in the README
0c15a75
to
f188cf6
Compare
f188cf6
to
9ef7f8e
Compare
Added README directions if you want to get fancy. This also reduces maintenance and support effort.
Thanks, this is awesome. I had a problem switching to
It seems to be trying to apply the patch even though the Ghidra source hasn't been checked out to the I'll try to debug it tomorrow unless you get around to it by then. |
Ahh, yeah this is a known issue due to the way I implemented the logic. Basically, I used more cache variables for specifying the commit SHA and numeric Ghidra version number, which would also need to be changed accordingly upon re-configuration from a $ cmake -B build -S . -DSLEIGH_ENABLE_INSTALL=ON
...
$ cmake --build build -j
...
$ cmake -B build -S . -DSLEIGH_ENABLE_INSTALL=ON \
-DSLEIGH_GHIDRA_RELEASE_TYPE=HEAD \
-DSLEIGH_GHIDRA_VERSION=10.1 \
-DSLEIGH_GHIDRA_COMMIT=55b8fcf7d4aeaca37ffb5c947340915d69c84224
...
$ cmake --build build -j
... I think the workflow might be a matter of preference, but I'm happy to discuss. I see two options for resolving this:
I'm actually leaning towards option 2 because it reduces our pain of dependent cache variables and makes the configuration a bit more streamlined. If an end user wants to use their own arbitrary checkouts, then they should use the method supported by FetchContent to point to their own source directory. That method also makes it more obvious that what they're doing likely isn't officially supported. Furthermore, updating to a different Thoughts? Edit: You should now be able to reconfigure as you did in your original comment. cmake -B build -S . -DSLEIGH_ENABLE_INSTALL=ON
...
cmake --build build -j
...
cmake -B build -S . -DSLEIGH_ENABLE_INSTALL=ON -DSLEIGH_GHIDRA_RELEASE_TYPE=HEAD
...
cmake --build build -j |
This should make it easier to switch between stable and HEAD commits without having to specify other somewhat hidden cache variables
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! Thanks, this works great. Feel free to merge whenever you're ready.
closes #14
TODO:
FETCHCONTENT_BASE_DIR
)Would appreciate people testing it out and giving comments!
Another thing that would be nice to have eventually is weekly testing of new
HEAD
commits from Ghidra main repo. To be fully automated, I think we would have to do something similar to dependabot but update thesrc/setup-ghidra-source.cmake
line withWould also be nice to auto-generate the slaspec file listings.