> -----Original Message-----
> From: Andreas Pakulat [mailto:ap...@gmx.de]
> Sent: Monday, October 22, 2012 12:17 PM
> To: Eric Clark
> Cc: 张峰; cmake@cmake.org
> Subject: Re: [CMake] cmake trouble
> 
> Hi,
> 
> On Mon, Oct 22, 2012 at 6:04 PM, Eric Clark <ecl...@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?

> 
> There are build-systems that have such limitations, but cmake is not one.

> 
> Andreas
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to