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

cmake: Track etmain dependencies #2581

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

Vorschreibung
Copy link
Contributor

@Vorschreibung Vorschreibung commented May 27, 2024

Static files packed into 'legacy_*.pk3' were not tracked as dependencies
by CMake.

This meant that e.g. changing 'etmain/ui/main.menu' would not cause
cause a rebuild of the 'legacy_*.pk3' if it has been built prior without
rerunning CMake or cleaning the build tree.

This was done by globbing twice, one time with 'GLOB_RECURSE' which is
used for 'DEPENDS', and once with 'GLOB' which is used for the arguments
to 'cmake -E tar'.

This is a workaround due to the fact that shelling out to 'cmake -E tar'
with the 'GLOB_RECURSE' LIST would provide more arguments than Windows
can handle and also due to 'cmake -E tar' not having implemented the
'-T'/'--files-from' option that GNU tar provides.

'file(ARCHIVE_CREATE ...)' would require a CMake version bump and
further does not seem to work with files outputted by targets.

@Vorschreibung Vorschreibung force-pushed the cmake-track-etmain branch 2 times, most recently from c0df469 to dc2c3b1 Compare June 7, 2024 11:34
Static files packed into 'legacy_*.pk3' were not tracked as dependencies
by CMake.

This meant that e.g. changing 'etmain/ui/main.menu' would not cause
cause a rebuild of the 'legacy_*.pk3' if it has been built prior without
rerunning CMake or cleaning the build tree.

This was done by globbing twice, one time with 'GLOB_RECURSE' which is
used for 'DEPENDS', and once with 'GLOB' which is used for the arguments
to 'cmake -E tar'.

This is a workaround due to the fact that shelling out to 'cmake -E tar'
with the 'GLOB_RECURSE' LIST would provide more arguments than Windows
can handle and also due to 'cmake -E tar' not having implemented the
'-T'/'--files-from' option that GNU tar provides.

'file(ARCHIVE_CREATE ...)' would require a CMake version bump and
further does not seem to work with files outputted by targets.
@Vorschreibung
Copy link
Contributor Author

Should work now across all platforms, read to review again 🫶

Copy link

sonarcloud bot commented Jun 7, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@Aranud Aranud merged commit 6dcd164 into etlegacy:master Jun 7, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants