Hm, yes, sorry $(ProjectOpts) may not work. Not sure where I picked it up, but I had it as a left over.

If you want to push changed project options, down into the used packages, then that is going to be tricky. (Dependencies normally do not go that way)

IIRC ( I do no longer have my example, but I did have it working once)
You can define "IDE Macro" or values, in the project (they should be able to depend on build mode)

In the package, under IDE macros, you add (in the lower field "conditionals"

    if defined(MACRONAME) then
       CustomOptions := ' -O-1 ';



There is a wiki page about that too (sorry havent got the link). It is a big page, and a lot to read.


On 13/04/2013 20:05, Zaher Dirkey wrote:
Not worked for me, i Added $(ProjectOpts) to custom options in SynEdit package (same with my packages but i will take SynEdit as example)
What i have
I Have 2 build mode (Debug, Release) i want when use Debug all compiler option passed to SynEdit package and have debug info and so on, When use Release same.

I have tested all adding $(ProjectOpts) or $(IDEBuildOptions) but debug not added to the sources.


On Sat, Apr 13, 2013 at 6:06 PM, Martin <[email protected] <mailto:[email protected]>> wrote:

    1) If you want a single package only, open the package and edit
    the options  like for a project.

    2) Do add the same settings as for the IDE (from "configure build
    IDE")
    http://imagebin.org/253861
    Add $(IDEBuildOptions) to the custom options

    Or for the options from the project: $(ProjectOpts)

    Check the compiler output ("test" button) for the order it applies.

    If one setting has -O1 and the other -O2 then the order matters.
    The order can not be changed.

    Afaik (please verify, not sure) an -O1 does NOT undo a -O2.
    But a -O-1 does undo a -O2

    3) For (almost) all packages.
    Check package-graph for dependencies on FCL (includes indirect
    dependency)

    http://imagebin.org/253862





--
I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3

Best Regards
Zaher Dirkey


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to