I&#39;m using cmake (through the GUI) on Windows (version 2.8.5).<div><br></div><div>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:</div>
<div><br></div><div>if I have two targets, A and B, and A depends on B, if B specified &quot;C:\foo&quot; as its source include directory, then target A will have an additional include directory of &quot;C:\foo&quot; to get to B&#39;s source code.</div>
<div><br></div><div>Right now I&#39;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 &quot;C:\foo&quot; in it, and target &quot;A&quot; would use this variable to add include directories to itself.</div>
<div><br></div><div>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?</div>
<div><br></div><div>Thanks in advance.<br clear="all"><div><br></div><div>---------</div>Robert Dailey<br>
</div>