Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shinmili opened this issue Nov 20, 2023 · 1 comment
Open

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

shinmili opened this issue Nov 20, 2023 · 1 comment

Comments

@shinmili
Copy link

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
Copy link

fuzhouch commented Dec 4, 2023

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants