Lazarus

Using the Lazarus IDE => General => Topic started by: Grahame Grieve on October 01, 2020, 01:07:56 am

Title: Managing Multiple Targets
Post by: Grahame Grieve on October 01, 2020, 01:07:56 am
I have a project that compiles for win32, win64, linux/64, and OSX (64bit). I want to routinely switch between these platforms to make sure that it compiles for all of them. Right now, I have to go to project options, and change 3 things: the Target OS. the target CPU family, and the LCL widget set.

Of course I can keep doing this, but is there a quicker way? One where I create combinations of these 3 and just switch between them?
Title: Re: Managing Multiple Targets
Post by: josh on October 01, 2020, 02:22:28 am
If you create different build modes for each target /widgetset/cpu and give each build mode taget exe a slightly different name, you can then either compile each one, or compile many builds at the same time.

So
Project Options->Compiler OPtions you will see the build modes drop down at the top click the button to the right to create as many build modes as you want.
In each build mode if you click the Project Options->Compiler Options->Paths you will see an entry for Target File Name, place here the name you want to give the compiled exe ( please do not use spaces, they will come back to bite you).

Once you have set you build modes, you can quickly switch to build modes by selecting the build from the drop down arrow by the green run arrow button.

If you want to build many choose. Run->Compile Many Modes  a box will appear with all your build modes, select the ones you want to build.

Hope I got it right.
Title: Re: Managing Multiple Targets
Post by: Grahame Grieve on October 02, 2020, 09:18:49 am
Awesome - that was exactly what I was looking for, thanks
TinyPortal © 2005-2018