HaxeFoundation / hashlink

A virtual machine for Haxe
https://hashlink.haxe.org/
MIT License
808 stars 152 forks source link

Which and when should I use `cmake` or `make` to build HashLink? #633

Open shinmili opened 9 months ago

shinmili commented 9 months ago

I'm trying to write a Gentoo ebuild for HashLink. This repository has both Makefile and CMakeLists.txt with slight(?) differences, and both of them seems to be ready to use. README describes how to build with make for Linux, but cmake has richer tests and looks better as far as I can see. I don't know which should be used in my ebuild.

Do they have their different intended usages?

fuzhouch commented 9 months ago

I'm a user not contributor, but I can give my 2 cents. Anyone could just correct me if I'm wrong.

  1. Makefile is a good fit for VM developers/hacks. If offers a quick way working on most Linux distributions + macOS. I can quickly modify the build flags for testing. However, it hardcodes many paths, which breaks on my Manjaro Linux and macOS until I fixed my installation paths.
  2. CMake is a better choice for release purpose. It allows tests, samples, and manages build versions. With the power of CMake, it's also good for possible cross-toolchain or cross-platform development.

Since you use ebuild, I suppose your scenario is we deliver a package installer for a distro. If I were you, I may prefer CMake. Makefile can be used too, if you prefer its simplicity and feel fine to maintain the build path and patch the Makefile (It's quite common in AUR that a pacman package also hosts some patches.)