3 ms·
I always felt that for small setups, makefiles are much more concise and easy to understand. And more generic. Cmakefile.txt seems always really messy and intro
by kyberias 9y ago
I always felt that for small setups, makefiles are much more concise and easy to understand. And more generic.
Cmakefile.txt seems always really messy and introduce concepts such as project and exes and dlls. But of course Cmake is super-portable I know.
- brian-armstrong 9y agoEvery time I think this, I end up going back later and wishing I had just done Cmake. If you just want to compile all the .c files it's easy enough to GLOB and make a couple targets, then come back and make it more sophisticated later
- everheardofc 9y agoExcept with make most small setups are at least 20-40 lines of nontrivial code becaue you have to redo everything from scratch
- slrz 9y agoinclude std.mk TARGET=foo HFILES=bar.h OFILES=main.o foo.o baz.o include cmd.mk This is what Makefiles tend to look like in some places.
- jcelerier 9y agoIs project(my_software CXX) add_library(my_lib foo.cpp bar.cpp) target_include_directories(my_lib PUBLIC include/lib) add_executable(my_app bluh.cpp) target_link_libraries(my_app my_lib) really more complicated than the equivalent makefile ? Especially given that: * this can generate ninja files instead of make * it adds the common targets such as make help, make clean, make install * dependency graphs can be generated with cmake --graphviz * solutions for various IDEs * etc...