-
Notifications
You must be signed in to change notification settings - Fork 250
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
Optimize making HOG files #637
Conversation
Nice, that was quick! It looks good to me in principle but there are some issues when building with Ninja Multi-Config. As far as I understand the
for the HogMaker calls changed in these patches. E.g. for
It's similar for the search path, it changed
As a result HogMaker can't find any of the It's a similar issues for the other hog files, the build and search paths changed there to. Besides this good work! |
Ah, I see why you changed the build and search paths. The evaluation of the generator expression Maybe a (more verbose) solution would be to drop the MakeHog function and write the |
I've tested writing |
There still issues on mutli-config environment, I need additional time to fix it. |
Don't force building HOG files if dependency files are up-to-date. Simplify building libraries by copying them into Descent3 directory.
ac08491
to
39b205b
Compare
Add CMAKE_CROSSCOMPILING conditional for HogMaker that makes it "external" tool in cross-compile environment, so we can use native HogMaker for cross-compiled targets.
Remove configure-time dependency get_git_hash that cause to rebuild whole graph of dependencies (like HOG files).
Fixed building on multi-config environment, added support for cross-compiling (#465), disabled rebuilding HogMaker on every commit which cause to rebuild all HOG-files with it. |
Very nice, the build output of repeated builds is very clean now! I'm a bit uncomfortable with the
Here's a proposal for a possible solution:
|
This is great. I've been trying to get a cross-compiled ARM64 build to validate the workflow. Setting |
I have (to annoy you with) another proposal. But it's a good one, I've tested it here and it works just fine.
The custom command I've added in the
Note the If you don't want to change the current solution, I can prepare another PR as a follow up to this PR with this approach. |
|
b78e9c8
to
6d9ef64
Compare
Reworked project to use |
That's nice. Only now all the libraries and executables end up in Using the Makefile generator, the build directory now looks like this
which is bloated. The culprit is this
which is a too broad approach IMO. IMO only
should go into For this I wouldn't set the broad only on the targets that actually should go to the For the Descent3 target that is this:
and for the netgames targets this:
We would also get rid of the |
Umm, I found one more issue.
This removal is fine because we build the libraries in the final location.
|
6d9ef64
to
88f0563
Compare
Changed set_target_properties only for Descent3 target. Other targets depends on it's location and get placed into correct directory. Also fixed naming of netgames according to it's names on Steam installation. |
I've tested this with the Makefile and the Ninja Multi-Config generators and it all looks good now. |
Building works fine now (as mentioned above) but I found errors in BUILD.md and in USAGE.md.
|
This solves problem of inability determine generated output directory of libraries targets. Now `add_custom_command()`, used on HOG generation, correctly locates all needed paths and not depends on generated variables.
Using names as defined in Steam installation.
88f0563
to
44806e7
Compare
The formatting is nice! Unfortunately the paths in USAGE.md are now wrong in an other way.
|
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.
Pull Request Type
Description
Optimizing HOG files building by using
add_custom_command
instead ofadd_custom_target
, which not enforces always rebuilding HOGs. In result this reduces incremental build time and optimize building process.Related Issues
Fixes #635.
Screenshots (if applicable)
Checklist
Additional Comments