[CMake] Out of source dependencies.

Schwartz, Philip Philip.Schwartz at lexisnexis.com
Mon Jan 25 16:33:21 EST 2010


The current project that I am working on has multiple projects layered through subdirectories. The project was a conversion from traditional makefiles and when we do a cmake build from the root of the source tree all is done correctly. The issue comes to when we try and build a single component from a out of source build directory (we are requiring out of source builds).

I have found a temp solution for example

/trunk/a
/trunk/b
/trunk/c


a requires b and b requires c to build correctly. As long as they dont share dependencies, if I use add_subdirectory(src ${CMAKE_BINARY_DIR}/<project>) for each it works to build the deps as needed. The issue is if both a and c require the another dep pulled in the same way. The error that comes up is through a policy error of CMP0013.

Yes, I could disable the policy, but would prefer a more elegant solution for the issue. Any help would be appreciated.

--Philip

________________________________
This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100125/f5d4f298/attachment-0001.htm>


More information about the CMake mailing list