[cmake-developers] Review Request: Topic ExternalProject-independent-step-targets

Daniele E. Domenichelli daniele.domenichelli at gmail.com
Mon Dec 9 07:51:18 EST 2013


On 05/12/13 15:00, Brad King wrote:
> However, I do not like having to update all the existing calls

I'm trying to fix this, but I'm having some issues with ninja, and I
don't know anything about...

Instead of using

> +set_property(DIRECTORY PROPERTY EP_INDEPENDENT_STEP_TARGETS update)
> +INDEPENDENT_STEP_TARGETS ""

 I'm trying to do

  set_property(DIRECTORY PROPERTY EP_INDEPENDENT_STEP_TARGETS download update)

And then adding an explicit dependency for each project that requires it

  add_dependency(${proj}-download SetupLocalXXXRepository)


AFAIK this should wait for SetupLocalXXXRepository to be finished
before starting ${proj}-download, and it seems to be working using
Unix Makefiles, but for some reason it does not work as expected
with Ninja generator...
Having a look at the build.ninja file, for each proj there is
something like this:


#############################################
# Utility command for ${proj}-download

build ${proj}-download: phony CMakeFiles/${proj}-download CMakeExternals/Stamp/${proj}/${proj}-download CMakeExternals/Stamp/${proj}/${proj}-mkdir SetupLocalXXXRepository

#############################################
# Phony custom command for CMakeFiles/${proj}-download

build CMakeFiles/${proj}-download: phony CMakeExternals/Stamp/${proj}/${proj}-download || SetupLocalXXXRepository

#############################################
# Custom command for CMakeExternals/Stamp/${proj}/${proj}-download

build CMakeExternals/Stamp/${proj}/${proj}-download: CUSTOM_COMMAND <...>
  COMMAND = <cmd> && <build_dir>/cmake -E touch <build_dir>/Tests/ExternalProject/CMakeExternals/Stamp/${proj}/${proj}-download
  DESC = <desc>



Do you know why this isn't working? Am I missing something?



Cheers,
 Daniele



More information about the cmake-developers mailing list