I'm using cmake (through the GUI) on Windows (version 2.8.5). Currently I have a define_project() function that all 100 or so sub-directories use to define its project. This function calls add_executable(), sets target properties, and everything necessary to set it up properly to build in Visual Studio. Each project is also able to pass in a list of include directories that other targets shall use if they specify that target as a dependency. So for example:
if I have two targets, A and B, and A depends on B, if B specified "C:\foo" as its source include directory, then target A will have an additional include directory of "C:\foo" to get to B's source code. Right now I'm implementing this functionality using an internal cache variable. Each target defines a ${target}_SOURCEDIR cache variable. So I would have a B_SOURCEDIR variable with "C:\foo" in it, and target "A" would use this variable to add include directories to itself. The problem with this approach is that it requires projects to be processed by CMake in the order of their dependency. I would like to make the project definition order (the order I call define_project()) to not matter, so I was wondering if there was a built-in functionality for this kind of behavior or if there is a different implementation I could use. Can anyone help me out? Thanks in advance. --------- Robert Dailey
-- 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