[CMake] source_group(): Which project is it added to?

cyril_wobow cyril at wobow.com
Mon Dec 1 11:52:25 EST 2008


Robert Dailey a écrit :
> On Tue, Nov 25, 2008 at 1:39 PM, Robert Dailey <rcdailey at gmail.com 
> <mailto:rcdailey at gmail.com>> wrote:
>
>     I'm having an issue right now where I'm trying to setup 2 projects
>     in 1 CMakeLists.txt file. Basically what I do is:
>
>     project( p1 )
>     add_executable()
>
>     project( p2 )
>     source_group()
>     add_library()
>
>     For project p1, the visual studio project that is output
>     (p1.vcproj) contains filters created by the source_group() call
>     several lines below it. Why does this happen? Only p2 should be
>     affected by source_group() correct?
>
>
> Bump. Can anyone explain this behavior?
> ------------------------------------------------------------------------
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
It's my understanding that you are trying to declare two "solutions" p1 
and p2 (using visual studio's terminology).
The source_group() calls affects the next "project" declaration (which 
is done with add_executable() or add_library()) in the cmake module 
where they occur .
HTH
Cyril


More information about the CMake mailing list