Skip to content

Switch to CMake #551

@Timmmm

Description

@Timmmm

I think we should switch from Make to CMake. This would have a number of benefits:

  1. We can easily make the arch part of the targets instead of a Make parameter. I.e. instead of
ARCH=RV32 make c_emulator/riscv_sim_RV32
ARCH=RV64 make c_emulator/riscv_sim_RV64

you can do

make -j2 c_emulator/riscv_sim_RV32 c_emulator/riscv_sim_RV64

which is less redundant and confusing, and also easier to do in parallel (this would half CI time).

  1. We can use CTest. This allows running tests in parallel, uploading JUnit results to Github, etc.
  2. CMake - while pretty shit on an absolute scale - is much nicer to use than Make. E.g. generating a 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.
  3. CMake is pretty much a de facto standard at this point and has native support from lots of IDEs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions