Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » "Exclude from build", then how to bring "excluded" files back?
"Exclude from build", then how to bring "excluded" files back? [message #207343] Sun, 30 December 2007 17:51 Go to next message
Eclipse UserFriend
Originally posted by: reply.to.newsgroup.nospam.no

I have a project with a file tree that looks like this:

TheProject
Includes
Sources
Option1
Option2
CommonStuff

The "Includes" directory is where all the .h files are (naturally...).

Sources->Option1 and Sources->Option2 contain .c files for one or
another option. Only one or the other is compiled into the
executable, never both.

Sources->CommonStuff contains .c files that are used in both Option1
and Option2.

When I presented all of this to Eclipse, using the means provided for
registering a source file tree that's not part of a project and isn't
kept under CVS, Eclipse registered both Option1 and Option2
directories and the compiler compiled them, and presented me with
eleventy gazillion errors.

So, I right-clicked on Option2 and selected "Exclude from build"; now
Eclipse compiles Option1 and ignores Option2 and all is well.

Except... now if I want to compile Option2 and not Option1, I can't
figure out how to bring Option2 back into the build again.

Also, a related question... When I first established this project
under Eclipse, Eclipse provided me with a "Debug" configuration and a
"Release" configuration. Is there a way to create, say, a "Debug1"
configuration that includes the Option1 directory, and a "Debug2"
configuration that includes the Option2 directory?

Thanks...

(PS: I know there are better ways to arrange things than to have
separate "Option1" and "Option2" directories for different
configurations. This directory structure has been presented to me and
is what I have to work with. I cannot change it.)
Re: "Exclude from build", then how to bring "excluded" files back? [message #207348 is a reply to message #207343] Mon, 31 December 2007 21:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: porges.comcast.net

"Rick" <reply.to.newsgroup@nospam.no> wrote in message news:culfn3hke3to8vuohm8aqkcqiphjabrtbg@4ax.com...
>
> I have a project with a file tree that looks like this:
>
> TheProject
> Includes
> Sources
> Option1
> Option2
> CommonStuff
>
> The "Includes" directory is where all the .h files are (naturally...).
>
> Sources->Option1 and Sources->Option2 contain .c files for one or
> another option. Only one or the other is compiled into the
> executable, never both.
>
> Sources->CommonStuff contains .c files that are used in both Option1
> and Option2.
>
> When I presented all of this to Eclipse, using the means provided for
> registering a source file tree that's not part of a project and isn't
> kept under CVS, Eclipse registered both Option1 and Option2
> directories and the compiler compiled them, and presented me with
> eleventy gazillion errors.
>
> So, I right-clicked on Option2 and selected "Exclude from build"; now
> Eclipse compiles Option1 and ignores Option2 and all is well.
>
> Except... now if I want to compile Option2 and not Option1, I can't
> figure out how to bring Option2 back into the build again.
>
> Also, a related question... When I first established this project
> under Eclipse, Eclipse provided me with a "Debug" configuration and a
> "Release" configuration. Is there a way to create, say, a "Debug1"
> configuration that includes the Option1 directory, and a "Debug2"
> configuration that includes the Option2 directory?
>
> Thanks...
>
> (PS: I know there are better ways to arrange things than to have
> separate "Option1" and "Option2" directories for different
> configurations. This directory structure has been presented to me and
> is what I have to work with. I cannot change it.)

Hi again...

The "Exclude from build" menu item should still be available, and you'll find
it's misleadingly named. Rather than just turning excluding the selected files,
it leads to a dialog in which you can control the exclusion, so you can get
back into it and de-exclude what you want.

Furthermore, it should give you a list of configurations and a checkbox for
each one, so you can do exactly what you describe with the configurations
and directories.
Re: "Exclude from build", then how to bring "excluded" files back? [message #207354 is a reply to message #207348] Mon, 31 December 2007 22:16 Go to previous message
Eclipse UserFriend
Originally posted by: reply.to.newsgroup.nospam.no

On Mon, 31 Dec 2007 16:34:34 -0500, "Don Porges" <porges@comcast.net>
wrote:

>The "Exclude from build" menu item should still be available, and you'll find
>it's misleadingly named. Rather than just turning excluding the selected files,
>it leads to a dialog in which you can control the exclusion, so you can get
>back into it and de-exclude what you want.

Yup, that did it. Thanks, Don. :-)
Previous Topic:Can't build without clean first
Next Topic:project conversion
Goto Forum:
  


Current Time: Tue Apr 16 06:12:02 GMT 2024

Powered by FUDForum. Page generated in 0.03031 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top