On 04/21/2015 12:17 PM, Andrey Pokrovskiy wrote:
> I understand that, but I still don't understand why there is a need in
> file-level dependencies at all. When target level dependency will not
> be enough?

Each step of an external project has a timestamp file to track whether
it is up to date or not.  The "configure" step of an external project
gets a dependency on the "done" timestamp file of the EP's dependencies.
This way when an external project is updated and re-built then its
dependents get a chance to reconfigure and rebuild too.

> And what if I want to have a dependency on external project target in
> my code? Do I need to apply the same hack to also add a file-level
> dependency?

Often the ordering dependency is enough.  If you depend on library
files created by the external project then you can add dependencies
on them through other mechanisms like an IMPORTED library target.

-Brad

-- 

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-developers

Reply via email to