[CMake] How to detect & set dependences when build-time(not when cmake)?
Pedro Lopez-Cabanillas
pedro.lopez.cabanillas at gmail.com
Fri Dec 9 05:28:33 EST 2011
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
More information about the CMake
mailing list