Page 1 of 1

per-config exclude from build

Posted: Sun Sep 21, 2014 5:22 am
by marksibly
Hi,

It'd be very useful if there was a per-config exclude from build feature.

Currently, when you exclude a file from building, it's excluded from all configs. This means that when building for different platforms, you need to maintain entirely different workspaces if you have files that are only applicable for a subset of platforms.

For example, I'm using codelite to build glfw which has win32_window.c, win32_input.c etc files for win32, and macos_window.c, macos_input.c files for macos. There's currently no easy way to build this for different platforms without resorting to multiple workspaces.

Or am I missing something? Is there some other way to deal with this?

Bye!
Mark

Re: per-config exclude from build

Posted: Sun Sep 21, 2014 12:53 pm
by eranif
I just tested it with trunk and it seems to be working fine:

Code: Select all

<VirtualDirectory Name="src">
    <File Name="main.cpp"/>
    <File Name="incl.h"/>
    <File Name="Makefile"/>
    <File Name="makefile"/>
    <File Name="test.cpp" ExcludeProjConfig="Debug;Release"/>
  </VirtualDirectory>
When you right click a file and select 'Exclude from build' its per build configuration
See the above code snippet taken from the 'HelloWorld' sample project it keeps a list of configurations from which this file is excluded

And this is the case since Sep, 2013: https://github.com/eranif/codelite/comm ... 0417ef73aa
Can you confirm this?

1. Right click a file in the tree-view and select 'Exclude from build'
2. Change the workspace configuration and confirm that the file is included

So, the interesting question is: which version of codelite are you using?

Eran

Re: per-config exclude from build

Posted: Mon Sep 22, 2014 1:43 am
by marksibly
I think you're right, it is working, great news!

The problem is that the gui isn't updating - the label in the workspace tree remains greyed (or non greyed) when you change configs or even collapse/expand the tree node, ie: it's visual state seems to be stuck on whatever you last selected.

Checking the right mouse menu does seem to indicate the correct state via the 'exclude from build' menu item though.

I'm using codelite 6.1.1 on macos 10.10.

A couple of other little issues:

* Copy/paste/select-all etc shortcut keys don't seem to work on the project settings dialogs, which makes it hard to copy around linker/compiler options etc. I suspect this is just a macos thing, but it's kinda annoying.

* It'd be nice to have a list of projects somewhere in the project settings dialog, so you don't have to close it/select different project/open settings again when you're doing config settings tweaks. Perhaps the single 'config' combo at the top of the project settings dialog could be made to work like the split project/config combos at the top of the workspace tree?

* Cmd-F5 'run' shortcut doesn't work on macos, it triggers a system 'voice over' plugin. I use Cmd-F9 anyway so it's not a biggy, just thought you should know.

Anyway, these are minor grumbles. Now that I've got my head around the project config stuff I'm well pleased - best $25 I've spent on software for a while!