[CMake] add_subdirectory and build directory

Pierre-Julien Villoud PVilloud at movea.com
Fri Sep 11 09:12:51 EDT 2009


Hi everyone,

After unsuccessfully looking for an answer on Google, I contact you.
I have a question regarding the use of add_subdirectory. When a project A is depending on a project B, I add the following in A's CMakeLists.txt :

Add_subdirectory(B Path/To/B/Build/Directory)

It does build B before A. But when I build B in its build directory and I build A after, it builds B again whereas it should not since B is up to date.

Anyone sees what's wrong ?

Thanks in advance

Pierre-Julien VILLOUD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090911/4227912a/attachment.htm>


More information about the CMake mailing list