Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-07

Conditional dependencies on packages ?

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt

Hi,

How can I make (if at all possible) package dependencies conditional ?

Specifically:
Depending on a compiler define, a program will depend on the LCL or not.

Michael.

Reply by email

Mattias Gaertner
to Michael Van Canneyt
Show quoted text 6 lines
Hi, How can I make (if at all possible) package dependencies conditional ? Specifically: Depending on a compiler define, a program will depend on the LCL or not.

Not yet implemented.

Only units can be loaded conditionally.

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 11 lines
On Wed, 27 Jul 2016 22:16:23 +0200 (CEST) Michael Van Canneyt wrote: > Hi, > > How can I make (if at all possible) package dependencies conditional ? > > Specifically: > Depending on a compiler define, a program will depend on the LCL or not. Not yet implemented.

I notice the 'yet', may I assume this can/is/will be planned ?

Only units can be loaded conditionally.

Indeed, I don't need packages for that :-)

Michael.

Reply by email

Mattias Gaertner
to Michael Van Canneyt
[...] > Not yet implemented. I notice the 'yet', may I assume this can/is/will be planned ?

Yes. Planned since a long time, so don't expect anything soon. Not sure about the details, because it can easily create hen-egg problems.

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 11 lines
On Thu, 28 Jul 2016 10:02:45 +0200 (CEST) Michael Van Canneyt wrote: > [...] > > Not yet implemented. > > I notice the 'yet', may I assume this can/is/will be planned ? Yes. Planned since a long time, so don't expect anything soon. Not sure about the details, because it can easily create hen-egg problems.

I'm a rooster, so not overly worried about hen-egg problems ;-)

Michael.

Reply by email

Luiz Americo Pereira Camara
to Michael Van Canneyt: How can I make (if at all possible) package dependencies conditional ? Specifically:…

2016-07-27 17:16 GMT-03:00 Michael Van Canneyt :

Show quoted text 9 lines
Hi, How can I make (if at all possible) package dependencies conditional ? Specifically: Depending on a compiler define, a program will depend on the LCL or not.

I hit the same issue.

Ended with a solution that, IMO, is good and powerful enough.

See what i did in VTV:
https://github.com/blikblum/VirtualTreeView-Lazarus/blob/lazarus_master/Source/virtualtreeview_package.lpk

Created a conditional that adds the package dependencies (multiloglaz) if a macro value is set.

Then defined a build macro (VirtualTreeView_Debug) that sets the value

In the project i set the macro value according to my need

Luiz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160728/f081ee6a/attachment.html>

Reply by email