Miscellaneous build system improvements #340
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
NEW
policy settings whencmake_minimum_required()
already sets them toNEW
;OLD
policy by switching to the modernFindPython3
method of bringing the Python language components into scope;%include
s, in the same way that C files already enjoy automatic tracking of#include
dependencies;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
CMakeLists.txt
could still use a lot of cleanup and reorganization.conan build
command appears to check and re-check dependencies several times for no apparent reason..i.in
wasn't considered a "dependency" before this PR) and at runtime (the generated.i
s 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).