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

Miscellaneous build system improvements #340

Merged
merged 9 commits into from
Oct 4, 2024

Conversation

Twisol
Copy link
Collaborator

@Twisol Twisol commented Sep 24, 2024

  • Tickets addressed: N/A
  • Review: By commit
  • Merge strategy: Merge (no squash)

Description

This PR attempts to simplify the current CMake-based build process, as well as improve its reliability in invalidating all appropriate targets when rebuilding. The changes include:

  • Removing unnecessary NEW policy settings when cmake_minimum_required() already sets them to NEW;
  • Removing reliance on the sole remaining OLD policy by switching to the modern FindPython3 method of bringing the Python language components into scope;
  • Enabling automatically dependency-tracking through SWIG %includes, in the same way that C files already enjoy automatic tracking of #include dependencies;
  • Preventing build dirty-looping due to custom commands not properly declaring their outputs. (Dirty-looping is when, if you run two builds in succession with no intervening source changes, the latter build thinks it still has some work to do.)

along with some other formatting and style cleanups.

Verification

By CI.

Documentation

No documentation is invalidated by this change, as far as I am aware.

Future work

  • Our current collection of CMakeLists.txt could still use a lot of cleanup and reorganization.
  • The conan build command appears to check and re-check dependencies several times for no apparent reason.
  • The SWIG message payload interface generation step incurs a noticeable about of additional complexity, both in the build system (the .i.in wasn't considered a "dependency" before this PR) and at runtime (the generated .is often contain redundant code only necessary for one of them; but we have no way to add code to just one of them). Manually managing smaller, more tractable .i files for each message payload type would give us more clarity into the build and more control over what goes into each .i, while incurring a minimum of extra overhead (new messages also need their own new .i, but this can generally be copied from an adjacent message).

@Twisol Twisol requested a review from patkenneally September 24, 2024 23:10
@Twisol Twisol force-pushed the feature/build-improvements branch from 6120098 to 04647cb Compare September 24, 2024 23:19
Copy link
Collaborator

@patkenneally patkenneally left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. We're starting down the path to a sensible code base. Very exciting.

@Twisol Twisol force-pushed the feature/build-improvements branch 2 times, most recently from 8c27c38 to f306854 Compare September 25, 2024 20:58
@Twisol Twisol force-pushed the feature/build-improvements branch from f306854 to f76f79e Compare October 3, 2024 23:16
Twisol added 9 commits October 3, 2024 20:52
As part of the build, this script attempts to insert an extra
conditional at certain points in three specific SWIG output bindings.
However, inspecting those files after-the-fact reveals no such extra
conditional, nor the expected stimulus for that conditional to be
inserted. As a result, it is clear that this script is a complete and
utter no-op.
@patkenneally patkenneally force-pushed the feature/build-improvements branch from f76f79e to 55b5f60 Compare October 4, 2024 02:52
@patkenneally patkenneally merged commit 8de7205 into develop Oct 4, 2024
4 checks passed
@patkenneally patkenneally deleted the feature/build-improvements branch October 4, 2024 03:44
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.

2 participants