How to exclude source file from assembly in eclipse (C ++)?

I'm trying to follow some crazy complex steps to be able to create C ++ unit tests for C ++ code in eclipse (I am completely new to eclipse). These steps are to exclude the use of some source files in the embedded ones - which has meaning to me. However, in my eclipse, I do not see any option Exclude from built when I right-click on the source file. In addition, neither this answer nor this answer works, since I do not see the specified options in the list of things when I right-click on the source file.

So, how to exclude the source file from the built-in?

PS The eclipse version seems to be Luna 4.4.0.

(Or, even better: if someone knows an easier way to configure eclipse with ANY module testing module in SIMPLE form, or knows another Linux infrastructure to start developing C ++ projects with unit testing right away, without trying to try installing things in unknown and complex ways for several weeks before actually starting to encode something - ideas are VERY VERY welcome ...)

+5
source share
3 answers

I had a similar problem.

In the future, C / C ++ for Eclipse Luna (4.4) lacks the "Exclude from assembly" context menu.

I solve my problem with java-perpective:

  • Window → Open Perspective → Other ... → Java (default)
  • Browse to the file / folder you want to exclude
  • Right click -> Resource -> Exclude from Assembly

Then you can return to the C / C ++ CDT perspective

+5
source

I tried this and it worked on Eclipse: Right-click the file> Properties ...> Resources> Attributes: Derivatives.

(Eclipse Indigo) Hope this helps.

0
source

I am using the MARS version of eclipse.

You need to create an assembly configuration for each component that you build. Here's how to do it: multiple_execs

Then for each source file that you do not want to include in this assembly; you right-click on this source file, and then select “Resource Configuration” and select “Exclude from Assembly”. Then you select the checkbox of the assembly configuration created above so that you do not want the source to be part. Here is a YouTube video showing this: exclude files from assembly

0
source

Source: https://habr.com/ru/post/1207513/


All Articles