[CMake] project() and SLN files

Robert Dailey rcdailey at gmail.com
Fri Jul 3 17:02:22 EDT 2009


On Fri, Jul 3, 2009 at 3:44 PM, James Bigler <jamesbigler at gmail.com> wrote:

>
> I was under the impression that project() created some kind of scope that
> allows you to reset certain variables.  Subdirectories allow you to create a
> new scope, but you inherit all the values from the parent.  I believe
> project() reset some variables (like for example the list of targets), so
> you can have a newish "top" CMakeLists.txt.  I've never done this.  Again, I
> just setup one project and do a bunch of targets each with unique names like
> you described with foo1, foo2, etc..
>

Hmmm... sounds fishy to me. Absolutely none of this is documented in
anything I've read. Would be great to get some answers from a developer. For
so long I thought that project() was required before add_library() or
add_executable() was called, but now I'm finding out that I'm wrong. I
really don't know what the heck project() does anymore.

What you're saying doesn't make much sense to me. I mean, I understand it,
but I am not sure I agree with it just because logically it doesn't sound
like enough to give project() a meaning.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090703/6abb6e0f/attachment.htm>


More information about the CMake mailing list