I was experimenting with cmake to see if it is useful for mold,
but it looks like using cmake doesn't make much sense for us.
So I'm undoing all changes that I did for cmake.
cmake is definitely better than autoconf, and it is also useful
if your program is cross-platform. However, neither of the benefits
don't apply to mold; mold doesn't need a complex feature detection,
and it currently supports only ELF-based Unix-like systems.
I think Makefile is a lingua-franca, while CMakeLists.txt isn't.
The good ol' Makefile works just fine for mold.
In the future, mold might become a cross-platform product, and if
that happens, we might want to re-introduce cmake.
You can now build mold with the following commands:
$ mkdir -p out/debug
$ cd out/debug
$ cmake -GNinja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug ../..
$ ninja
To run tests, use the following commands:
$ cd out/debug
$ ctest -j$(nproc)