WTF, CMake still cannot be arsed to support import std; in C++‽

Frankly, this is a complete joke and unacceptable for a modern build system! Like: “What would you say you are doing for a living?”-tiers level of unacceptable.

They are
actively holding back the evolution of C++ at this point!

Anyways, does anyone have a recommendation for a build system that meets the most basic requirements ever:

* Support for globs (So no, Meson is not a valid answer!), I do not consider having to manually edit the build-file each time I add a file acceptable.
* Parallel build, strongly prefered by default!
* Basic support of modules, in particular
import std; has to just work!

It is
insane that I have to even ask this at this point. C++ modules have been a thing since C++20! This is not just a hald decade old superseeded standard. The version that superseeded it has been superseeded again since this week! (Okay, technically national bodies still have a vote, but the committee has voted it out as completed!)

#cplusplus #modules #cmake
I had a small program that was creating a makefile; maybe I should get back to developing that and advertize it as the most advanced C++ build system, because it supports some of the really basic features that people need, instead of having 500 nobs for nonsense but lacking support to compile hello world.

@Fiona FWIW: I am in the makefile team. Like, I used it to know it by heart (now I forgot some quirks, and would need to go through docs to refresh the knowledge), I am aware of its limitations. And I honestly believe that for a lot of cases you can write a decent makefile ruleset to make an efficient buildsystem. You can call me old fashioned 😊

The cmake is not replacement for make. Cmake is a replacement for autotools, which is, indeed, more than make could offer. Bur if one needs only a dependency based build system, makefile is perfectly fine.

@agturcz I mean, I’m using make a lot to this day, my website is built with it and when I was still working at TU/e we always built LaTeX with makefiles.

It’s a very nice tool, but dependecy detection was at least non-obvious, where my own program came in…

@Fiona If in gcc (and compatible) world, -MD is useful for that.

There should be something more in the documentation, but I've found this old snippet I am finding useful:

%.o: %.cpp
ifneq ($(VERBOSE),1)
@echo "[g++] $<"
endif
$(VERBPREF)$(COMPILE.cpp) -MD -o $@ $<
@echo "$@: Makefile" >> $*.d; mv $*.d $(DEPDIR)

-include $(SRCS:%.cpp=$(DEPDIR)/%.d)