I known you meaning. In our project. We have lots of subprojects. For example: We have some framework projects and some common projects. When I build finally project, I need build there support projects. I add there support projects' header file to finally projects' pch.This doesn't mean that nobody work on framework projects. When somebody modify one of framework projects. I update code, and then I want pch file rebuild automatically.
----- 原邮件 ----- 发件人: Pedro Lopez-Cabanillas <pedro.lopez.cabanil...@gmail.com> 收件人: cmake@cmake.org 抄送: 发送日期: 2011年12月9日, 星期五, 下午 6:28 主题: Re: [CMake] How to detect & set dependences when build-time(not when cmake)? On Friday 09 December 2011, 持重 金 wrote: > Hello every one. > > > Recently, I try to rewrite a large project's building system by using cmake. > I meet a difficult point, how to detect & set dependences when build-time. > > I have lot of this requirement, and currently I solve it with some terrible ways. I want some refined ways. For example: > > Using precompiled header file. > > Cmake do not support pch directly and can not detect a header's dependences as a source file. > > I can't set pch's dependences when cmake-time because it's changed frequently and it's dependences is tree structures. If your PCH changes frequently, then you probably aren't using it correctly. The pre-compiled headers should include only stable headers that do not change often (for instance: system and 3rd party library headers), because pre- compiling the PCH file consumes a lot of time and disk space. Regards, Pedro -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake