[CMake] Force target to always run last?
David Cole
DLRdave at aol.com
Wed May 17 17:26:49 EDT 2017
The way I know how to do this is to add it last at the bottom of the
top-level CMakeLists.txt file, and then use add_dependencies to make
it depend on all other targets. (Or at least all other "leaf" targets,
which further depend on others, ... the sum of which is "all other
targets" besides the new "last" target.)
So it's not pretty, but it's possible.
HTH,
David C.
On Wed, May 17, 2017 at 11:36 AM, Robert Dailey
<rcdailey.lists at gmail.com> wrote:
> I have a custom target that must meet the following requirements:
>
> * It must always run, regardless of what subset of other targets are being built
> * It must always be the very last thing run. In parallelized builds,
> it must wait until all other targets are done building before
> starting, so that it is the very last target run, and should not run
> in parallel with others.
>
> Is this possible? I'm willing to use hackery if needed...
>
> Running CMake 3.8.0. Thanks!
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
More information about the CMake
mailing list