开发者

Exclude Qt and Boost includes from CMake dependencies

Does someone know a way how 开发者_JS百科to exclude all Qt and Boost dependencies from a CMake project?


I use command include_regular_expression("^([^b]|b[^o]|bo[^o]|boo[^s]|boos[^t]|boost[^/]).*$") to skip all includes starting with "boost/" (if somebody knows a simpler regex - please add a comment). Certainly, it may be extended to Qt headers.


I set INCLUDE_REGULAR_EXPRESSIONS ("\.h$"), because my project's header files all end with .h. As Boost ends its header files with .hpp, this excludes the Boost header files. It also helps with Qt at least partially, because Qt has not suffixes at all for the public header files, but uses .h for internally included header files. However excluding Boost header files gave a huge performance improvement, when scanning header dependencies

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜