Hi everyone,
I lead a team of embedded C software engineers and we’re seeking a more suitable build system than what we have had grow organically over the years. I’ve been reading lots of CMake documentation, and testing how we’d implement some of our existing build system patterns in CMake. For the most part I’ve found a sensible mechanism for doing things.
We operate a mono repo, with our executables structured similar to:
- Product
- MCU
- Debug/Release
- MCU
There are a handful of bits of functionality that we currently utilise which I can’t see a direct mapping (or alternative) for CMake. These are:
- FILE_HASH - A SHA256 hash passed as a build define to each source file
- FILENAME_HASH - A SHA256 hash passed as a build define to each source file
- LOG_LEVEL - The log level for this file passed as a build define
Ultimately they’re all following a similar method of establish file state → set file build define. I see there are some ways to do this in CMake (set_source_file_properties), but they don’t feel like the “CMake way”.
I’m not necessarily looking to replicate our precise mechanisms in CMake, but I’d like a suitable substitute that suits the CMake paradigm.
Could someone point me towards some material that might help?
Thanks!