![]() ![]() CMake can be easily installed on Windows and Linux operating systems. Write your program, and then introduce the final build to this tool by introducing the storage of resources, headers, and other program-related libraries so that you do not have to execute all the link commands to change a line of code, for example. This program can be considering as a software project management tool. Meson uses a similar model, and if the world would switch to Meson instead of CMake, I would still be happy.Recommended Article: what is different between DNF and yum What is CMake?ĬMake is a software automation program that works independently of the compiler. I'm advocating the use of CMake the model. Last point, I'm not advocating the use of CMake the tool. There is no consensus in that discussion. I mean, why should I require having to install Tcl in order to compile my Gtk Bitcoin-monitoring app? Also the argument with "should be implemented in scripting language" is an opinion, which is heavily discussed when talking about wheter a build system's language should be turing-complete, or shouldn't. ![]() When changing the build system itself, I don't need to think in layers: first the M4 layer, then the bash layer (or was it sh?), then the /bin layer - "is my option passed to "cp" accepted on OpenBSD or is it a GNU extension? I better quickly install an OpenBSD VM and check it."īy the way, implementing the logic in CMake instead of an external scripting language may be in order to decrease the dependencies of the build system itself. I can create multiple configurations (release, debug, asan, clang, gcc, vs2019, vs2022), comple them all and run tests for all configs at the same time after each change, I can open it in Visual Studio, CLion, Xcode, Eclipse, or whatever, I can open the project in my favorite editor and I have clangd working automatically, I'm not saying it uses both build systems the best possible way, but I pick CMake build over Autotools any day. You can check out libarchive, which has support for both Autotools and CMake. And lots of the files from the directory you've pasted are there in order to interface with hard-to-interface autotools-based build systems. ![]() But then the Windows support would be dead. You have pasted a link to a complicated build system, which would be impossible to write and maintain in manual Make. It's like saying "A car is no better than a bicycle, because both have problems with tires when driving long enough". Putting an equal sign between CMake and Make, because the complexity increases in both, is pretty ignorant IMO. The point of a minimal example when reasoning about CMake is to show that you get much more free stuff than in Make, not that it always stays small. Is CMake harder to read if the build system increases in complexity? Yes. Does the number of lines increase when the project complexity increases? Yes. To be honest, I'm not sure what is your point. The docs state that the user should consider the output of the `make -p` command in order to see the rules, which gives me an impression that different implicit rules can exist on different Linux distros, depending on how `make` was compiled (not sure what is the de facto state). Even if we consider only one implementation, then default rules can be different to each platform. BSD make can have different rules than GNU make. Third issue is that it seems that implicit rules can be different by different implementations of make, i.e. So specifying the "exe" filename as the output seems to be already a custom rule, so it doesn't seem to work without manually calling the selected compiler.Īnother issue is that indeed, CC+CFLAGS is supported by default (implicit) rules, but as soon as the user tries to build a custom rule (which is 99% of the time), the support is lost unless explicitly adding it. It seems that in order to use the default rules, the target name needs to have the same name as the source file, e.g.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |