On Tue, Dec 08, 2009 at 09:27:42AM +0100, Matthias Moeller wrote: > Thank you for your help. Actually, I need it in the opposite way, that > is, each application (parent) adds the kernel directory. In the kernel's > CMakeLists.txt file a list of source files is generated and this list > should be passed to the top directory (i.e. the application).
The set (... PARENT_SCOPE) calls would be in the kernel CMakeLists so I don't know what you're saying here. > > Another common approach to this sort of setup is to deal with all the > > common kernel code in a top-level CMakeLists and then have that > > top-level CMakeLists do the add_subdirectory() calls into each appX > > subdirectory. > > > Wouldn't this mean that cmake always works on all applications each time > it is called? Yes. For most projects this is desirable. But you've gotten some better advice in this thread: make kernel a library and don't add the same CMakeLists multiple times. I guard my add_subdirectory() calls with if (NOT TARGET some_buildable) but YMMV since I don't know all the details of how your project is put together. tyler _______________________________________________ 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
