I think this is being misunderstood, partially because of the self-claim that this is a build system. The CMake DSL is utter garbage. From my understanding, this converts TOML that follows the same/similar naming as CMake commands/options to CMake DSL. Allowing for total compatibility with CMake while avoiding the pain of actually interacting directly with a CMakeLists.txt. Most people agree that CMake is not a good…
There are plenty of options other than cmake. Ideally: 1. read the GNU Make manual 2. Write a tiny build system with Make or use any of the precanned ones. I use this: https://github.com/dkogan/mrbuild/ but there are many others In any case, learning how to actually use Make is a prerequisite to having an opinion here.
Cmkr – a modern build system based on CMake and TOML
21–30 of 30 posts
Re: Cmkr – a modern build system based on CMake and TOML
#22I think Cmkr fails to state its value proposition by focusing on how it works. Any system like CMake that wraps boatloads of complexity is going to have unexpected interactions and inscrutable failures. The question for any developer who doesn't want to become a build system guru is whether they can take a happy path far from any gotcha's. That's when people start defining conventions to solve classes of problems: fo…
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 wit…
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.
Re: Cmkr – a modern build system based on CMake and TOML
#23Re: Cmkr – a modern build system based on CMake and TOML
#24Re: Cmkr – a modern build system based on CMake and TOML
#25I think this is being misunderstood, partially because of the self-claim that this is a build system. The CMake DSL is utter garbage. From my understanding, this converts TOML that follows the same/similar naming as CMake commands/options to CMake DSL. Allowing for total compatibility with CMake while avoiding the pain of actually interacting directly with a CMakeLists.txt. Most people agree that CMake is not a good…
There are plenty of options other than cmake. Ideally: 1. read the GNU Make manual 2. Write a tiny build system with Make or use any of the precanned ones. I use this: https://github.com/dkogan/mrbuild/ but there are many others In any case, learning how to actually use Make is a prerequisite to having an opinion here.
4. Follow its advice until you hit the end of where it is useful. (i.e., you can no longer count the number of $ escapes in your own code).
Re: Cmkr – a modern build system based on CMake and TOML
#26Just my two cents but most of my time spent with build systems isn't on the basics. Most of my time is spent scripting things: probing for dependencies, build hooks, packaging, code signing, and other misc tasks. Right now cmkr doesn't appear to support scripting. I'm unsure a declarative language like TOML will suffice. Might I recommend you research premake which is a build system based on Lua. Lua is a good choice because of its scripting flexibility.
Re: Cmkr – a modern build system based on CMake and TOML
#27Omg another C++ build system. Who woulda thought we needed another.
I almost think there's no way to make a good build system...without making it far harder when you need to do something slightly different. Rust has a simple build system, but it really depends on the package manager, and custom build setup is a build script in Rust...so the build system has to build the build script...
Re: Cmkr – a modern build system based on CMake and TOML
#28Earlier quoted context omitted.
There are plenty of options other than cmake. Ideally: 1. read the GNU Make manual 2. Write a tiny build system with Make or use any of the precanned ones. I use this: https://github.com/dkogan/mrbuild/ but there are many others In any case, learning how to actually use Make is a prerequisite to having an opinion here.
cmake is not just another way to get a Makefile. If you have a cross platform project and want to work in multiple IDEs for specific platforms (xcode/visual studio), cmake or some other build system generator is a huge time saver
Re: Cmkr – a modern build system based on CMake and TOML
#29Earlier quoted context omitted.
There are plenty of options other than cmake. Ideally: 1. read the GNU Make manual 2. Write a tiny build system with Make or use any of the precanned ones. I use this: https://github.com/dkogan/mrbuild/ but there are many others In any case, learning how to actually use Make is a prerequisite to having an opinion here.
3. Read “Recursive make considered harmful” 4. Follow its advice until you hit the end of where it is useful. (i.e., you can no longer count the number of $ escapes in your own code).
If you truly need a lot of complexity, you can end up with unreadable Makefiles, as you say. Most projects don't need a lot of build logic, though. I have lots of projects using mrbuild, and their builds are clear and easily maintainable. If you truly need a lot more, then Make might not be the best choice. And you can do much better than cmake
Re: Cmkr – a modern build system based on CMake and TOML
#30Earlier quoted context omitted.
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 wit…
At least the find_package documentation is simple: 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 a…