[英]eclipse cdt - how to “exclude resource from build” a specific suffix
In my build artifact folder(s), I generate pre-processed output of each .c
file *.pp
. 在我的构建工件文件夹中,我生成每个
.c
文件*.pp
预处理输出。 Once a build is done, if I go to my .c
file(s) and hit F3 (Open Declaration)
on a typedef
, the popup contains the original .h
or .c
file and all the *.pp
files that included the .h
. 构建完成后,如果我进入
.c
文件并在typedef
上单击F3 (Open Declaration)
,则弹出窗口将包含原始.h
或.c
文件以及所有包含.h
*.pp
文件.h
。
Obviously, I don't want that. 显然,我不想要那样。
Someone said to add all .*pp
files Resource > Resource Filters > Exclude all
有人说要添加所有
.*pp
文件Resource > Resource Filters > Exclude all
While this does result in the .pp
files not appearing in the list of places a symbol is defined . 虽然这确实会导致
.pp
文件没有出现在位置列表中,但已定义符号。 . 。 .
。 it also has the side-effect of removing the
.pp
files from view completely so that I can't see or open them at all. 它还具有从视图中完全删除
.pp
文件的副作用,因此我完全看不到或打开它们。
Of course another way to accomplish this is to Exclude From Build
the build output folder: Right click > Properties > C/C++ > Exclude Resource from build
. 当然,完成此操作的另一种方法是
Exclude From Build
构建输出文件夹: Right click > Properties > C/C++ > Exclude Resource from build
。 While this removes *.pp
from the search path for where is it defined searches AND does not make it disappear from view . 虽然这会将
*.pp
从搜索路径中删除,但它在何处定义了搜索,并且不会使其从视图中消失。 . 。 .
。 this applies to all items with the folder, some of which I might not want to
Exclude From Build
. 这适用于该文件夹中的所有项目,其中有些我可能不想
Exclude From Build
。
QUESTION 题
Is it possible to Exclude From Build
based on a suffix instead of a folder while at the same time having syntax highlighting ON for a given suffix? 是否可以基于后缀而不是文件夹
Exclude From Build
,同时将给定后缀的语法突出显示为ON ?
Yes, that's possible: 是的,这是可能的:
*.pp
is not added/registered in Window > Preferences: C/C++ > File Types *.pp
*.pp
file and choose Open With > Other... *.pp
文件,然后选择“ 打开方式”>“其他...”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.