Closed twogood closed 2 years ago
@bwrsandman Very interesting! Does this CMakePresets.json work nicely with CLion?
Btw I hadn't heard of ninja until I googled up lukka/run-cmake and I still don't really know what it is ;)
Ninja is an alternative to makefiles that work on all platforms and does parallel builds automatically. I've only ever used it with cmake preset because you can write the one preset and it works everywhere
Newer versions of clion will automatically detect presets and will pop a dialog to enable them. I've been using clion and presets for a few months and it works great. Visual studio and vscode also support presets.
@kratz00 what do you think about this option?
Looks like a cool thing to have 😄 It also takes the matrix build approach (like https://github.com/twogood/unshield/pull/145) but leveraging existing features (CMakePresets.json) and tooling (https://github.com/lukka/run-cmake) which makes it better maintainable. I will have a seconds look and give it a shot.
The next big step would be to have the tests executable on all platforms too. The test data could be stored as Git LFS objects instead of downloading them all the time. We can use up to 1 GB of storage without purchasing a data pack (https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-storage-and-bandwidth-usage). The tests can then be executed by ctest, I already have a PoC, which I will share soon (needs some more polishing).
@kratz00 Test data in LFS sounds like a great idea!
Going with #145 instead
If you're willing to add
CMakePresets.json
to the repo, you can make use of https://github.com/lukka/run-cmake to automatically run your config, build and tests for the different build types and platforms you want to support.Presets also are supported by a lot of IDEs and make it easier to configure in an IDE, you just select the config, build and test presets and all cmake defines and configs are set.
An example
CMakePresets.json
for this test:Then in the workflow you can make use of test matrices