0

Is it possible to let meson be silent if configuring a directory that has already been configured before?

Meson currently complains

Directory already configured.

Just run your build command (e.g. ninja) and Meson will regenerate as necessary.
(...)

I would like to chain the configure and build commands and don't worry if configuration has already been done before. Does maybe a silencing flag exist?

Aart Stuurman
  • 3,188
  • 4
  • 26
  • 44

1 Answers1

0

The current version 0.52 doesn't seems to have it[1]. In fact Meson thinks that it's an error (by raising an exception).

Meson doesn't require you to configure a directory once you have done. Care to share your use case?

[1] https://github.com/mesonbuild/meson/blob/master/mesonbuild/msetup.py#L139

Yasushi Shoji
  • 4,028
  • 1
  • 26
  • 47
  • My team is used to using Make. To accomodate for this there is a Makefile that simply wraps the project that uses meson by providing `build` and `clean` targets. Our other projects don't require configuring, so that would be something new for my colleagues. I prefer to hide that step. – Aart Stuurman Nov 20 '19 at 11:08
  • 1
    There are two options. 1) Remove the build dir everytime. It's simple but unable to do incremental build. 2) check to see `build.ninja` exist in the build dir. This works if you are using Ninja backend. If it's there, you can skip `meson setup` and just do `ninja`. – Yasushi Shoji Nov 21 '19 at 04:40