Thanks J.

That requires me to use ExternalProject_Add. However, in my case, I have
all Libraries generated/built independently. Should I just start using
ExternalProject_Add for dependencies? If yes, what is the best way to do
that in conjunction with 'find_package(...)'?

On Sat, Jan 13, 2018 at 10:28 AM J Decker <d3c...@gmail.com> wrote:

> 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 <saadrus...@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
>>
>>
>
-- 

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

Reply via email to