Problem
New Developers unable to quickly get up and going in their IDE
The current build system is very brittle and the custom tailored nature of it leaves the development team having to address constant breaking changes and new architectures etc. It also leaves new comers to the project in a state of despair when they realize that the current IDE cannot pick up the project.
For example in this issue #13694 , the user asked "where I could find the guide on how to install an IDE and debug the code?" because his top of the line IDE, CLion works by using CMake. The other well known C/C++ IDEs that are currently used are able to and appear to prefer the CMake build system. Sadly, the sarcastic response (i hope) from @sipa was "Most developers don't use IDEs as far as I know".
For the Windows users out there, in issue #14118 , the issue got alot of support to the idea of adding CMake, as one is able to quickly work on C/C++ projects given Visual Studio's and VSCode support for CMake projects.
Improve ecosystem by having option to build shared libraries
This last point will be a simple theory, but if CMake is added, one could imagine that the ecosystem to grow and flourish and bring in new support and tooling with it. For instance, if i wanted to instead wrap around the C++ code using CFFI and call directly from Python/JS/Whatever I am unable to as where would I even begin to get started on compiling a library as opposed to the executable in a neat manner? Right now the best way to interact with bitcoin is via the rpc it seems, but why not directly ?
The other direct benefits of having a "simple" CMake build system is we can undo the tight coupling of what should be the "build" with the source code. When developing, the sanitizers can be added and help ensure there is strong checks with proper memory usage and addressing etc.
Proper sanitizing and bug catching
For instance, I found a buffer overflow in the tests within the ctaes library (inside crypto) which was found trivially after setting up a proper standalone CMake file for it. This was found within hours of me poking around and was there for a number of years. Makes one wonder how many other bugs are simple low hanging fruit, just waiting to be picked.
Solution
According to The Developer Ecosystem in 2020: How C++ is Doing , the C++ community is moving with conviction to CMake as their build system of choice. Over the last couple years its gone from 34% to 53% of developers choosing it over Makefiles or Visual Studio. If the trend continues, it is imperative the project invests in improving the current status quo.
Begin adding CMake files to cover the major OSs Windows, OSX, Linux on the major processors x86_64. Then expand out to ARM and the smaller targets like Raspberry Pis and the like. Eschew the many optimizations and custom-tailored functions/modules for specific architectures and just add the generic standard library versions until the entire project builds and tests properly.
While this is a "monumental task" as noted by @sipa , the hardest part will be decoupling of the many build steps with source code, but thats more tedious and repetitive than anything.
I can and already have a couple CMake files for some modules like crypto and ctaes to start off. What I am not sure of exactly is the flow of direction between the libraries in the "bitcoin-core" project and this one. Which one follows which?