[cmake-developers] PRE_BUILD misconception
Sebastian Holtermann
seblist at xwmw.org
Thu Aug 24 08:04:20 EDT 2017
Am Donnerstag, 24. August 2017, 07:48:48 CEST schrieb Brad King:
> On 08/23/2017 05:56 PM, Sebastian Holtermann wrote:
> > It seems that in CMake 3.9/AUTOGEN the VS generator uses the *_autogen
> > target more often than necessary (it could use PRE_BUILD instead).
> >
> > Let's assume a target `B` that depends on
> >
> > - a *GENERATED* file `FA`
> > - a linked library `LA`
> > - a utility target `TA` (via `add_dependencies()`)
> >
> > Using the VS generator, will `FA`, `LA` and `TA` be built completely
> > before
> > target B executes it's PRE_BUILD?
>
> Target-level dependencies will be completely finished, including their
> POST_BUILD if any, before the PRE_BUILD of a dependent target begins.
> In your list above, `LA` and `TA` will definitely be built before `B`
> starts. For the generated file `FA`, it depends whether the custom
> command is attached to `B` or not. If it is inside `B` then it won't
> generate until after PRE_BUILD is done.
Okay, thanks.
That will help to fix https://gitlab.kitware.com/cmake/cmake/issues/17205
-Sebastian
More information about the cmake-developers
mailing list