开发者

Exclude Qt and Boost includes from CMake dependencies

开发者 https://www.devze.com 2023-02-04 16:59 出处:网络
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[^/]).*$\")

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

精彩评论

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