<div class="gmail_quote">On Thu, May 21, 2009 at 12:00 AM, Robert Dailey <span dir="ltr"><<a href="mailto:rcdailey@gmail.com">rcdailey@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div class="gmail_quote"><div><div></div><div class="h5">On Wed, May 20, 2009 at 9:38 PM, Philip Lowman <span dir="ltr"><<a href="mailto:philip@yhbt.com" target="_blank">philip@yhbt.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>On Wed, May 20, 2009 at 9:40 PM, Robert Dailey <span dir="ltr"><<a href="mailto:rcdailey@gmail.com" target="_blank">rcdailey@gmail.com</a>></span> wrote:<br>> I'm still looking to figure out how a single project can be configured to generate multiple executables. Can anyone clarify?<br>
<br></div>A Visual Studio project file is limited to one target (executable, library, etc.) as far as I know. If this is what you're asking.<br><br>At work what we do is clump our unit tests for each class (in a library) into a single unit test executable. In this way we minimize the number of executables linked and the number of tests that run and show up in Visual Studio.<br>
<br>We use gtest but the same principals apply with cxxtest, cppunit, etc.</blockquote><div><br></div></div></div><div>This idea would work perfectly if I did not have compile time unit tests. For example, some unit tests pass if they fail to compile, or pass if they compile successfully. It's the former case that makes this idea impossible to use. </div>
</div></div>
</blockquote></div><br>Ah yes, I'm sorry I forgot that part of the thread.<br><br>So these are the two solutions people have come up with for this:<br>1. Selectively enable the failure tests only during nightly builds<br>
2. Try to keep the failure tests isolated from the rest of your projects by giving them names that put them on the bottom of the list of projects (zz_foo_fail)<br><br>I don't have an example of this, but it might be possible to have your test run a script which configures and builds a small CMake test project which compiles against your current code. This test project would of course fail to compile by design. Then you could monitor for this failure and expect it?<br>
<br><br>-- <br>Philip Lowman<br>