Fwd: [CMake] Error adding rule for c:/dev/blah/../blah/CMakeLists.txt

Phillip Hellewell sshock at gmail.com
Mon Jun 5 17:08:44 EDT 2006


On 6/5/06, Brad King <brad.king at kitware.com> wrote:
>
> The bug fix will just tell you to use this signature of ADD_SUBDIRECTORY
> in this situation.  The problem is that you are specifying a path to a
> source tree that is outside the top-level source tree on which CMake is
> run (myproj in your test case).  CMake is unwilling to try to guess
> where to put the binary tree for this case, so it wants you to tell it
> where.


Ok, it is starting to make more sense why the problem occurs, but I still
have to question why it is not be a bug.

The reason why I question it is because:

1. The layout works fine with VS.Net generator on windows.
2. The layout works fine with VS.Net and gcc on linux, if I use an older
version of cmake (2.0.6).

If all libraries have to be in the tree hierarchy of my project, it would
make things more difficult for me.  I actually have several projects that
use the same library projects, and I can't have those libraries as
subdirectories of all those different projects, or else I would have several
copies of the library.  And moving the CMakeLists.txt up to a parent
directory that is a parent of the libraries and the projects would force me
to use the same CMakeLists.txt to build all my projects.

So for now I think I will go with the first solution you proposed, which is
to specify the binary directory for my libraries, so that the outputs will
be in the tree of the project, even if the sources aren't.

Thanks,
Phillip Hellewell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20060605/cbf56cb1/attachment.htm


More information about the CMake mailing list