Question

I am generating doxygen documentation for my (fairly small) project on each build. I did the following to accomplish this:

  1. Added the index.html, which doxygen generates, to the project
  2. Specified a Custom Build Step for this file (not the whole project)
    • Command line: doxygen ../doc/Doxyfile
    • Outputs: ..doc/html/index.html
    • Additional Dependencies: '../bin/foo.exe'

The problem with this is, that I need to build twice until VS stops telling me that my project is out of date.
How can I fix this?

Was it helpful?

Solution

When working out whether to build anything, Visual Studio looks to see if the output file is older than the input file.

You added index.html as an input file, when it's actually an output file. Adding Doxyfile won't work either, because it won't change that often. This is why rebuilding the project works (because it ignores the age of the files and does the build anyway).

It's changes in the C++ files that you want to catch. If (as I suspect) doxygen does incremental builds anyway, you'd be better off simply adding the doxygen step as a Post-build event.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top