Sign in Join

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

Mailing lists / lazarus / 2014-07

Custom defines don't work?

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Reinier Olislagers

Hi list,

Laz trunk, fpc trunk x86, Win.

I'm trying to set up some defines based on the FPC version [1]:

In project options,compiler options,other,conditionals I add this:

// Optimize hash functions for FPC trunk
// FPC 2.6.x does not support -OoUSEEBP
if FPC_FULLVERSION>=20701 then
begin
  UsageCustomOptions += '-OoUSEEBP -dOPTIMIZESHA1 -dOPTIMIZEMD5'
end;

However, -OoUSEEBP etc don't show up in the options when I click Show Options

1. Am I doing something wrong or is this a bug?
2. Is there an easier way of doing this?

Thanks.

[1]
Entire project at
https://bitbucket.org/reiniero/flocate

Reply by email

Mattias Gaertner
to Reinier Olislagers
Show quoted text 11 lines
Hi list, Laz trunk, fpc trunk x86, Win. I'm trying to set up some defines based on the FPC version [1]: In project options,compiler options,other,conditionals I add this: // Optimize hash functions for FPC trunk // FPC 2.6.x does not support -OoUSEEBP if FPC_FULLVERSION>=20701 then

The conditionals have only these predefined variables/functions: http://wiki.lazarus.freepascal.org/Macros_and_Conditionals#Predefined_Variables

Maybe FPC_FULLVERSION can be added.

Mattias

Reply by email

Mattias Gaertner
to Reinier Olislagers
Show quoted text 9 lines
On 23/07/2014 14:10, Mattias Gaertner wrote: > The conditionals have only these predefined variables/functions: > http://wiki.lazarus.freepascal.org/Macros_and_Conditionals#Predefined_Variables Ah, thanks. > > Maybe FPC_FULLVERSION can be added. Yes, I would really like that ;)

I added the IDE macro FPC_FULLVERSION and I added to conditionals the function GetProjValue. The function only works in packages. At the moment it supports only one parameter:
GetProjValue('FPC_FULLVERSION').

Mattias

Reply by email