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

FPP CMake integration #1629

Merged
merged 3 commits into from
Sep 19, 2022
Merged

Conversation

tiffany1618
Copy link
Contributor

Change Description

  • Add parameterGENERATED_SOURCES, a list of sources generated by previous autocoders, to the _filter_sources function in cmake/autocoder/autocoder.cmake
  • Change the ai_xml_is_supported function in cmake/autocoder/ai_xml.cmake to also filter sources against previously generated sources. This means that XML autocoder will only receive Ai.xml files whose corresponding Ac.cpp and Ac.hpp files have not already been generated by the FPP autocoder, preventing it from overwriting those files.

Rationale

This change is necessary to support FPP v1.1.0, which will include C++ code generation for FPP enums, arrays, and structs, intended to replace the XML autocoder's C++ code generation for enums, arrays, and structs.

@LeStarch LeStarch self-requested a review August 20, 2022 00:52
Copy link
Collaborator

@LeStarch LeStarch left a comment

Choose a reason for hiding this comment

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

This looks good to me. I'd like to test cmake 3.13, and see what happens.

@LeStarch
Copy link
Collaborator

This code works as expected in CMake 3.21+, but breaks on CMake 3.13-3.16. The reason is that the code that replicates the cmake_language CALL functionality supports a maximum number of arguments.

An easy fix should be to switch from ARGN to ARG2 and pass GENERATED_FILES as a list rather than unrolling it. I'll go ahead and try this fix.

@LeStarch
Copy link
Collaborator

The changes worked, so I pushed a commit to this branch. Once CI is done I will merge!

@LeStarch LeStarch merged commit 3c23396 into nasa:devel Sep 19, 2022
@tiffany1618 tiffany1618 deleted the fpp-cmake-integration branch October 13, 2022 20:59
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