This information is available elsewhere but not consolidated to this particular use-case, hence I felt the need for a stackoverflow self-answer that I (and others) can refer to. Feel free to add your own answers if there is anything I have missed.
project some_project is
for Source_Dirs use ("src");
for Object_Dir use "obj";
for Main use ("main.adb");
package Compiler is
for Default_Switches ("ada") use ("-O1", "-gnatwae");
end Compiler;
end some_project;
I want to have this generate ../some_program_name.exe. How do I specify the name of the executable this gpr project will generate? Can it be in a directory above?
Add this to your gpr file:
Note that the
.exesuffix is added automatically if you are on windows.In the same
Builderpackage, only the extension can also be changedThe information was scattered across Adacore's docs for the GNAT Project Manager.