Open Timmmm opened 11 hours ago
You can do 1 already in Make if you write the file properly, we have that in sail-cheri-riscv.
3 and 4 don’t seem very relevant, there’s no IDE for Sail, and the C is extremely basic, it doesn’t warrant an IDE.
That leaves 2, for which using CMake seems a bit overkill?
You can do 1 already in Make if you write the file properly, we have that in sail-cheri-riscv.
Ah you mean this? We should do that in this repo if we don't move to CMake at least. Still it is definitely easier in CMake (just do a loop over the architectures).
the C is extremely basic, it doesn’t warrant an IDE.
I would like to use an IDE with it please! I don't feel like I should not have nice tools just because it's only 2k lines of code (so far).
That leaves 2, for which using CMake seems a bit overkill?
I still think the other benefits are significant. We've been using CMake internally and it's a much nicer experience. Are there any downsides (apart from having to run cmake
)?
I also think this would be nice.
CTest is a bit awkward to use but having a real test driver is definitely worthwhile.
I also use CLion for the sail C code and it has basic syntax highlighting for sail if you import the sail syntax files (https://github.com/rems-project/sail?tab=readme-ov-file#editor-support).
I think point 2 is a strong enough reason and I am definitely supportive of this change.
I think we should switch from Make to CMake. This would have a number of benefits:
you can do
which is less redundant and confusing, and also easier to do in parallel (this would half CI time).
compile_commands.json
for IDEs is one line, as is enabling LTO, PIC, etc. It supports splitting your build config into multiple files in a sane way.