facebookincubator/oomd

A few improvements to build definition files

Closed this issue · 1 comments

The meson.build file has a couple of common antipatterns. Fixing them would reduce the amount of code and make it more portable and "mesonic" for lack of a better term.

The system adds . as an include path. This is not necessary as in Meson the current source and build dirs are always added to the include path.

Setting the C++ version should not be done with custom args, but instead by setting the language standard option. Most projects do it with something like default_options: ['cpp_std=c++14'] kwarg in the project call.

Adding -g should not be needed. There is a toggle option and it is enabled automatically in debug and debugoptimized build types (the former is the default one).

Instead of adding the -rdynamic flag you should set the export_dynamic kwarg in the executable target.

Instead of copying the fixture data to the build dir you might consider passing a command line argument to the test program to tell it to use the data from the source dir (usually using something like meson.current_source_dir()).

Thanks for the tips; the clean ups are on my todo list now.