On 11/04/2011 06:39 PM, Paul Hansen wrote: > Hi > > I have several small projects. Some of them may include another project. > I have one big project that includes all small projects. > File structure: > projects > - p1.cmake (add_subdirectory(dir_project1)) > - p2.cmake (add_subdirectory(dir_project2)) > - dir_project1 > - dir_project2 > > Some of these pX.cmake may be called twice meaning that > add_subdirectory(dir_projectX) is called twice. > And the above warning appears. > > Is there a way to handle this. E.g > - with guards like in C header files (tried something like that but did not > work) > - checking if the resulting library exists, if yes: don't add:subdirectory() > > Just wandering if there is a defacto or smart way to handle that a > subproject may be included several times > > Thanks > Paul
Recently, there has been an interesting discussion about some related topics that affects this particular one, too; see [1]. Regards, Michael [1] http://www.mail-archive.com/cmake@cmake.org/msg38990.html -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake