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
精彩评论