[CMake] Undefine a project()
Robert Dailey
rcdailey.lists at gmail.com
Tue May 22 14:49:11 EDT 2012
Hi,
I was wondering if there is a way to undefined a project(). I want to do
this to prevent projects from being included in a solution when I generate
for Visual Studio. Example:
project( A )
add_executable( A a.cpp )
project( B )
add_executable( B b.cpp )
add_executable( C c.cpp )
I don't want B to be in A's solution when I open A.sln. I'm assuming this
is the behavior, unless project(B) call cancels out project(A)?
Also, I don't want project C to appear in either A or B solutions.
The reason why I'm doing this is because I have setup my CMake scripts to
allow a solution file to be generated for executables (so I can open each
executable solution in different instances of visual studio, with ONLY that
executable + dependency projects in it). However, since sometimes multiple
executable projects can be defined in the same directory, or other
libraries that aren't a dependency of that executable, I do not want those
to be included in the project().
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120522/0a4f1f42/attachment-0001.htm>
More information about the CMake
mailing list