It is useful to have a separate directory for storing object files. However, it gprbuild
will complain if the directory does not exist yet. I use hg
version control, which does not allow you to track empty directories (AFAIK this also applies git
), but even if that were the case, it would be useless to clutter up the repository with an empty directory. gprbuild
has an option --create-missing-dirs
(short form -p
) that does exactly what it says on tin. This is extremely helpful. However, I would like to know if there is a way to set this in a file .gpr
. It is disgusting to remind my users to compile with a parameter -p
instead of just starting it gprbuild project
. Unfortunately, the docs for gprguild
have the following:
By default, GPRbuild checks to see if the project files, libraries, and exec specified in the project files exist. The switch -p
instructs GPRbuild to try to create the missing directories. Please note that these switches can be specified in the Builder package of the main project, but they are useless there, because either directories already exist or the processing of the project files failed before evaluating the Builder switches, because there is at least one missing directory.
Is there really a way to do what I am describing?
source
share