[Lazarus] Compiler Options - Conditionally add a package dependency?
silvioprog
silvioprog at gmail.com
Thu Jul 9 21:05:44 CEST 2015
>
> On Thu, Jul 9, 2015 at 2:58 PM, Michael Van Canneyt michael at freepascal.org
> wrote:
[...]
> We have support for dotted unit names. The only thing missing is a
> namespace directive.
Is there any plan for implementing the -NS[1] compiler parameter? This
option allows to use scoped unit names, that is very good for dotted unit
names, e.g:
MyCompany.SysUtils; // <scope>.<unitname>
...
uses
SysUtils; // this is an 'alias' for my 'MyCompany.SysUtils' unit ...
$ fpc -NSMyCompany (it could be enabled via Lazarus package too)
This option also enables the 'UseUnitScopeNames' directive, so you can use
a unit declaration like 'uses {$IFNDEF
UseUnitScopeNames}MyCompany.{$ENDIF}SysUtils'.
P.S.: you can pass two or more scopes via this options, e.g:
-NSMyCompany;OtherCompany;SomeLib
[1] http://docwiki.embarcadero.com/RADStudio/XE8/en/Delphi_Compiler
--
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150709/57eef27c/attachment-0003.html>
More information about the Lazarus
mailing list