[CMake] Making sure dependent projects are up-to-date

J Decker d3ck0r at gmail.com
Sat Jan 13 10:28:17 EST 2018


maybehttps://cmake.org/cmake/help/v3.2/module/ExternalProject.html

BUILD_ALWAYS 1No stamp file, build step always runs

On Fri, Jan 12, 2018 at 7:41 PM, Saad Khattak <saadrustam at gmail.com> wrote:

> Hi,
>
> Let's say I have several CMake enabled libraries that have their own
> respective build directories and have been installed:
>
> LibA
> LibB (depends on A)
> LibC
> LibD (depends on LibC and LibA)
>
> I then create a new executable project ProjExe that depends on LibD. Now,
> I am working on LibA, LibB, LibC, LibD and ProjExe simultaneously (e.g.
> building up functionality in the libraries that the executable uses, fixing
> bugs etc.).
>
> What I would like, is a way to ensure that when ProjExe is built, it first
> checks whether LibD is up-to-date (i.e. does it have any out of source
> build files?), if not, it builds LibD first. But LibD depends on LibC and
> LibA, and then LibD ensures that LibC and LibA are up-to-date before
> building itself.
>
> Is something like this possible in CMake? This is  similar to the
> 'solution' concept in Visual C++ where a 'solution' can have several
> projects. ProjExe in the solution can be dependent on external libraries
> (like the above) and they are part of the 'solution' and are checked to be
> up-to-date before ProjExe is compiled/linked.
>
> Thanks,
> Saad
>
> --
>
> 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:
> https://cmake.org/mailman/listinfo/cmake
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180113/3d875c7c/attachment.html>


More information about the CMake mailing list