[CMake] cmake trouble

Rolf Eike Beer eike at sf-mail.de
Mon Oct 22 13:47:45 EDT 2012


Eric Clark wrote:
> > From: Andreas Pakulat [mailto:apaku at gmx.de]
> > On Mon, Oct 22, 2012 at 6:04 PM, Eric Clark <eclark at ara.com> wrote:

> > > First off, you cannot call both add_executable and add_library in the
> > > same CMakeLists file.
> > 
> > I think there's something missing here, but its perfectly possible to have
> > one or more library and executable targets specified in the same cmake
> > file. So this works just fine:
> > 
> > add_library(foo bar.cpp)
> > add_executable(bar foo.cpp) 
> 
> 
> Sorry, me again, but I have a question... If I do use the above code using a
> Visual Studio generator, will this create to separate projects in Visual
> Studio?

You will have one solution file, but 2 projects in it.

Eike
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121022/89858f0f/attachment.pgp>


More information about the CMake mailing list