No, you have to do that manually.
One way of doing this is like so:
program testproject;
uses prgname; //unit that demo's the availability.
const
projectname:pchar = 'testproject'; export name 'projectname';
begin
end.
This constant is now visible in any unit, like so:
unit prgname;
interface
var projectname :Pchar external name 'projectname';
implementation
initialization
writeln(projectname);
end.
The reason for the export is that the constant would otherwise not be visible in the units. The exported name is - officially - Case sensitive, as with any other exports, although it does not seem to matter.
Two other options, both more cumbersome:
{$define}
resourcestring (but the resourcestring must be loaded by hand in other units. Or with a hackery trick)
The above is clean and precise.
The reason that I use a PChar is that it is not a refcounted string type. shortstring will likely also work.
Note that this technique would be very easy to implement in the compiler where it can expand to the filename that is already available to the compiler anyway. Maybe a feature request?
People such as Warfely implement this likely in seconds.. (hint, Frederic

)