views:

459

answers:

2

We have a makefile that is built last in our build process using Visual Studio to launch our unit tests. Unfortunately if the build fails the makefile is still processed and we have extra (annoying) errors. Any way to prevent that?

Example Project A : build dummy.exe Project B (makefile) : build command is : run dummy.exe /unittest

We want Project B to skip its build command when Project A has build errors. Thanks!

A: 

Go to Project Properties. I assume you already have something in the "Post-Build event command line" box? There is a "Run the post-build event" combobox, set it to "On successful build".

Is that what you're looking for?

xero
Unfortunately it's not a post-build, it's a makefile project
Enigme
Is there a way to get your makefile to do nothing if the other project's output hasn't been updated in the last 20 seconds? It's a hack but might work.
xero
+1  A: 

Set Project B (your makefile project) to be dependant on Project A. This way Project B will always try to build Project A before it builds.

Joseph Daigle
I had great hope for this simple solution but even with compiling 1 project at a time it still fails (makefile is launched)
Enigme