3 ms·
What "boatloads of complexity" does CMake wrap and save me from handling myself? Turn on all warnings? Yeah, just check if your CC is MSVC or else and set the
by stefan_ 2y ago
What "boatloads of complexity" does CMake wrap and save me from handling myself?
Turn on all warnings? Yeah, just check if your CC is MSVC or else and set the flag!
Turn on sanitizers? Yeah, just include this 2000 line piece of CMake macro that checks your CC and turns on flags!
Find a package? Yeah, just write a FindFooCMake macro file that spells out the exact files to find in the filesystem and parses a header with more macro magic to determine the version. Maybe we decide to ship this shitty macro file with the default distribution later on and cause more conflicts and distress. By the way, we now have a superior C++ namespace inspired way of defining packages that we mix and match with the old stuff in our default distribution.
Can't you just use pkg-config files like everyone else? Yeah, just make sure to include another 3000 line CMake macro if you specifically want us to use pkg-config.
Cross compile my program for a different architecture? Of course CMake supports that, as long as you write a toolchain file that spells out the exact CC, CXX, sysroot, ... and all other things that could even get a maximally minimal Makefile to trivially cross compile. Make sure to force-overwrite some of the useless autoconfig inspired tests CMake will perform on your toolchain because they are broken with whatever cross compiler you are trying to use.
So while CMake does nothing to help with common things, their "CMakeCache" is the most powerful proof for "nothing is more complicated in programming than caching" the world has ever seen.
- throwway120385 2y agoI think the point is that every decade or so someone comes out with a new wrapper for the build systems that are wrapping the build systems that are wrapping make. And the developer inevitably makes something that works great for their specific usage of Make/CMake etc in the specific programming niche they occupy. Gradually over the coming decade the build system they created becomes more and more complex as it addresses more and more use cases until it begins to resemble autotools. At that point, someone comes out with a new wrapper and the whole process repeats itself.
- hedora 2y agoAt least the find_package documentation is simple: https://cmake.org/cmake/help/latest/command/find_package.html https://cmake.org/cmake/help/latest/command/find_package.htm... Sure, there are like 100 pages of useless details in there, but at least they didn’t waste space by explaining what side effects invoking it for a given package will have, or how to find out what package names your system recognizes. Also, they didn’t complicate stuff by defining any naming conventions around what variables finding a package will set up.
- throwway120385 2y agoYou know, actual important stuff that would be relevant to someone who wanted to use find_package to...find a package.