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

Reimplement CMake-based build system #48

Merged
merged 4 commits into from
Aug 14, 2023

Conversation

erichte-ibm
Copy link
Collaborator

The original CMake build implementation allowed for easier packaging, so for the same reason, re-implement the CMake build now that some of the architectural problems with guest/host code has been sorted out.

The goals for this implementation are as follows:

  • provide an alternative for simple builds to the Makefile
  • easier integration into packaging systems (e.g. rpmbuild)

This is NOT intended to be feature-parity with the Makefile, as (at the moment), running tests and other pseudo-targets are much easier done with simple make rules.

Marking as a draft for now, since I'm assuming there's features missing still. Please take a look and see if there are any critical missing features.

At the moment, the following features are not implemented, and may not be for the scope of this PR:

  • Crypto backend selection (same as Makefile, TBD)
  • Guest/host backend selection
  • Running test cases, or anything involving tests
  • Pseudo build targets like cppcheck, format, etc

@erichte-ibm erichte-ibm marked this pull request as draft August 8, 2023 18:23
@nick-child-ibm
Copy link
Collaborator

Build is working and passes test. Can't think of anything else it needs other than what is in your list. At this point, non essesntial build targets like cppcheck, generate tests and format don't really need to be mirrored to CMake at all. For now, lets just think in terms of what could be useful when packaging. In those circumstances, I really only would like to see crypto and guest/host selection but that seems dependent on libstb-secvar and still needs Makefile implementation. So I would be fine merging this. LMK

@nick-child-ibm
Copy link
Collaborator

Also reimplement CI checks for cmake builds

…e tested

Previously, it would explicitly depend on the pseudotarget
secvarctl-dbg, so that running `make check` would ensure that the debug
binary was up-to-date on each invocation. However, this is a bit
inflexible for running the tests against another binary (particularly
in the case of a CMake build).

Instead, have the check target depend on the binary pointed to by
SECVAR_TOOL, and set the default value to the original debug binary.
This allows for the regular default make check behavior to remain the
same, but also has the added benefit of testing another binary path
while also implicitly checking that the binary exists due to dependency
requirements.

Signed-off-by: Eric Richter <[email protected]>
@erichte-ibm erichte-ibm marked this pull request as ready for review August 10, 2023 15:47
@erichte-ibm erichte-ibm force-pushed the erichte/cmake branch 3 times, most recently from 96694e2 to 470809d Compare August 10, 2023 15:50
@nick-child-ibm nick-child-ibm merged commit 48cf477 into open-power:guest-devel Aug 14, 2023
@erichte-ibm erichte-ibm mentioned this pull request Sep 27, 2023
3 tasks
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