[CMake] Visual Studio build question

2009-01-12 Thread James Bigler
So when I have a project that builds a library (call it libprovides) and I
have another project that uses that library (libuses), CMake creates a build
dependency between the two projects.  I can see them when I open the Project
Dependencies dialog and notice that there are check marks next to the
libprovides library project.

The issue I'm seeing, is that if libprovides library project fails to build,
VS decides to try and build the libuses library anyway, and then complains
that libprovides isn't there.

Is this the intended behavior of VS, or did I perhaps set something up wrong
in my CMakeLists.txt?

Using:
 VS 2005 SP1
CMake 2.6.3R5
WinXP 64

Thanks,
James
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Visual Studio build question

2009-01-12 Thread John Drescher
On Mon, Jan 12, 2009 at 3:27 PM, James Bigler  wrote:
> So when I have a project that builds a library (call it libprovides) and I
> have another project that uses that library (libuses), CMake creates a build
> dependency between the two projects.  I can see them when I open the Project
> Dependencies dialog and notice that there are check marks next to the
> libprovides library project.
>
> The issue I'm seeing, is that if libprovides library project fails to build,
> VS decides to try and build the libuses library anyway, and then complains
> that libprovides isn't there.
>
> Is this the intended behavior of VS, or did I perhaps set something up wrong
> in my CMakeLists.txt?
>

This is the intended feature of VS. I see that in my non cmake projects as well.

John
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Visual Studio build question

2009-01-12 Thread David . Karr
> The issue I'm seeing, is that if libprovides library project fails
> to build, VS decides to try and build the libuses library anyway,
> and then complains that libprovides isn't there.
>
> Is this the intended behavior of VS, or did I perhaps set something
> up wrong in my CMakeLists.txt?

This feature was added to VS a few years ago.  I first noticed it when I
started building code in VS .NET 2003 (version 7.1).  In VS 6.0, the
build stopped after the first failure.

This is actually a good feature if you want to go do something else
rather than watch your project being compiled.  The compiler did useful
work on the libuses library, because it build all the OBJ files
correctly.  It just couldn't link them.  When you come back and find the
build failed, and you fix the error in libprovides, you can then finish
the build relatively quickly, because the compiler and linker have
already done almost all the work that they needed to do after building
libprovides.  All they have to do really is link the libraries or
executables that depended on libprovides.  Depending on your project, VS
may in fact have correctly compiled AND linked a whole bunch of
libraries after libprovides.

On the other hand, if you want to sit and watch the compiler, you can
always stop the build after you see errors start to occur.  So I hardly
see a downside to this feature.

But of course this is really a VS feature, NOT a CMake feature after
all.

David

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Visual Studio build question

2009-01-12 Thread James Bigler
On Mon, Jan 12, 2009 at 2:45 PM,  wrote:

> > The issue I'm seeing, is that if libprovides library project fails
> > to build, VS decides to try and build the libuses library anyway,
> > and then complains that libprovides isn't there.
> >
> > Is this the intended behavior of VS, or did I perhaps set something
> > up wrong in my CMakeLists.txt?
>
> This feature was added to VS a few years ago.  I first noticed it when I
> started building code in VS .NET 2003 (version 7.1).  In VS 6.0, the
> build stopped after the first failure.
>
> This is actually a good feature if you want to go do something else
> rather than watch your project being compiled.  The compiler did useful
> work on the libuses library, because it build all the OBJ files
> correctly.  It just couldn't link them.  When you come back and find the
> build failed, and you fix the error in libprovides, you can then finish
> the build relatively quickly, because the compiler and linker have
> already done almost all the work that they needed to do after building
> libprovides.  All they have to do really is link the libraries or
> executables that depended on libprovides.  Depending on your project, VS
> may in fact have correctly compiled AND linked a whole bunch of
> libraries after libprovides.
>
> On the other hand, if you want to sit and watch the compiler, you can
> always stop the build after you see errors start to occur.  So I hardly
> see a downside to this feature.
>
> But of course this is really a VS feature, NOT a CMake feature after
> all.
>
> David
>

Thanks for the insight.  Glad to know it's VS and not CMake.  I've been used
to Makefiles for so many years now that I take certain behavior for granted.

Thanks,
James
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake