This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS v 5.2: How to exclude-from-build multiple files at once of a project

A single file can be excluded from a build by right-clicking the file and selecting "Show Build Settings..", checking the "exclude from build" checkbox.

As soon as multiple files are selected, the "Show Build Settings.." is disabled.

Regards,

Ruud Pendavingh

  • According to:

    http://stackoverflow.com/questions/9236377/eclipse-c-exclude-multiple-files-from-build-at-once

    this is possible with Ecplise, however the context menu "Resource Configurations" is not available in the CCSv5.2 flavor.

    Regards,

    Ruud

     

  • Hi,

    Ruud Pendavingh said:
    this is possible with Ecplise, however the context menu "Resource Configurations" is not available in the CCSv5.2 flavor.

    In CCS 5.1 you cna use this option, even when selecting multiple files. It's strnge it doesn't exist in v 5.2, maybe the Eclipse version changed?

  • Hello,

    I just used the v5.3 beta, selected 3 files and did right Click ->Resource Configurations->Exclude from build.   

    Would trying that be something you are open to?  When I have a chance, I am going to look at v5.2 as well.

    Does this help?
    Best Regards,
    LIsa

  • HI,

    this option is indeed also there for you in v5.2.  What type of files are you selecting?  I did notice, for example, when I added a .cfg file to the mix this option went away, but otherwise was there.  I suspect one file you are bundling in to your multiple select, perhaps is not a valid option to to the resource congiguration.

    Please keep us informed.

    Best Regards,
    Lisa

  • I'm trying to exclude .cpp and .h files.

    By the way: all my source files are linked: does that make any difference?

    Regards,

    Ruud

  • Hi Ruud,

    I will try to dig into this a bit but a linked file should still be fine and in fact I just tried it myself.   Can you send further information?   If you try a subset (ie 4 files) does it work?  Can you send screen shots or further details?

    Best Regards,
    Lisa

  • Hi,

    Ruud Pendavingh said:
    I'm trying to exclude .cpp and .h files.

    In my case I can only exclude de .c and .cpp files, if I select the .h files the "Resource Configurations->Exclude from build" option disappears.

  • It's getting a bit clearer: I experience the same as Johannes:

    While having selected one ore more .cpp files: the "Resource Configurations -> Exclude from Build..." is present and can be used.

    As soon as one .h file is added to the selection, the "Resource Configurations -> Exclude from Build..." is not present anymore.

    The reason for adding .h files to a project was the hope that it would help the indexer to update automatically (on every save of .h file), which I couldn't get working even while playing with all kinds of indexer settings; but that should be another topic for this forum.

    Regards,

    Ruud

  • Hi Ruud,

    yes this is the behaviour we see as well.   I think this might be because it is assumed that header files are included or excluded in the c files.  Ie if you are not building including a header file this will be reflected in the c file includes.

    However, I understand the flexibility that is desired.

    Does this help clarify things?  Does the multiple c select make things at least a bit more efficient for you?

    Best Regards,
    Lisa

  • Hi Lisa,

    Sorry for the late reply: bugs kept me quite busy...

    The multiselect and exclude functionality is sufficient for me. I shouldn't have added all .h files to the project(s), but I did that to circumvent the inability of the indexer to update automatically after saving a modified .h file (auto-updating the index after a file save only seems to work for files which are part of the project)

    Thanks for the clarifications so far.

    Regards,

    Ruud

  • Hi Ruud,

    no worries, glad we were able to explain the behaviour.  All the best with development.

    Best Regards,
    Lisa