Workspace shared between Windows and Linux

General questions regarding the usage of CodeLite
ColinTaylor
CodeLite Expert
Posts: 152
Joined: Fri Jul 15, 2011 2:49 pm
Genuine User: Yes
IDE Question: C++
Contact:

Workspace shared between Windows and Linux

Post by ColinTaylor »

OS: Windows 7, 8 & Ubuntu 12.04
Codelite 5.3
wxWidgets 2.8.5
MinGW 4.7.1

Look for some advice on Workspace management

I have a Workspace that I share (synchronise is a better term) between Windows and Linux
For each project I have Debug and Release builds for Windows and LinuxDebug and LinuxRelease builds for Ubuntu
All works pretty well, but I do have a small number of Windows-only projects in the Workspace

Is there a way to "instruct" Linux-Codelite not to build certain projects? i.e. not try to build them at all?

At present I add the following directive into the "Main.h" file

Code: Select all

#ifndef __WINDOWS__
#error "This is a windows only application"
#endif
and this does work, but it does add an error to the build log, and I'd rather Codelite didn't even try and build the project in the first place.
I've also tried setting the "Compiler not needed" and "Linker not needed" flags in the LinuxDebug and LinuxRelease but Codelite still processes these projects rather than ignoring them completely.

Cheers for any suggestions, Colin
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Workspace shared between Windows and Linux

Post by eranif »

You can do what I am doing:
Basically, I have a "main" project which defines the build order (for example, for codelite the project LiteEditor is the 'Active Project')
Now, I usually defines the build order by right click on the project and select 'Build Order'
This tells codelite that whenever you hit F7, it will build the list of porjects before building the 'Active Project'
You can setup a different build order for every build configuration

If we will look at codelite again, the project 'Mac Bundler' is obvisouly unchecked in the build order so codelite will not attempt to build it when building LiteEditor

Hope it was clear,
Eran
Make sure you have read the HOW TO POST thread
ColinTaylor
CodeLite Expert
Posts: 152
Joined: Fri Jul 15, 2011 2:49 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Workspace shared between Windows and Linux

Post by ColinTaylor »

Hi Eran, yes your answer is clear, unfortunately I don't have a single 'main' project that I can build in the way you describe. (My workspace contains many separate projects and the build order is defined for each one, and in case you are tempted to ask, there are reasons why I don't want to split the workspace into n smaller ones!).

This isn't a major issue in any way, I can certainly live with it as it stands.

Thanks for the suggestion, Colin
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Workspace shared between Windows and Linux

Post by eranif »

You can always add a dummy project, name it "Build-All" and set the build order on it
Or, file a feature request to allow disable project build in a certain build configuration

Eran
Make sure you have read the HOW TO POST thread
ColinTaylor
CodeLite Expert
Posts: 152
Joined: Fri Jul 15, 2011 2:49 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Workspace shared between Windows and Linux

Post by ColinTaylor »

Thanks, both are sensible suggestions, I may do both :-)
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Workspace shared between Windows and Linux

Post by eranif »

ColinTaylor wrote:Thanks, both are sensible suggestions, I may do both
Note that FR http://sourceforge.net/p/codelite/feature-requests/638/ is now implemented

Will thank you if you can test it

Eran
Make sure you have read the HOW TO POST thread
ColinTaylor
CodeLite Expert
Posts: 152
Joined: Fri Jul 15, 2011 2:49 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Workspace shared between Windows and Linux

Post by ColinTaylor »

Thanks for making this change. 8-)
Unfortunately I don't take git updates, I only install from the full releases that you make, but I certainly will test it once the full release is available.
Cheers, Colin
Post Reply