bakefile icon indicating copy to clipboard operation
bakefile copied to clipboard

Avoid duplicated dependencies in vs201x toolsets output

Open vadz opened this issue 6 years ago • 0 comments

Although nobody would arguably duplicate the dependencies on purpose, it was easy to do this unintentionally by inheriting a dependency from a base template and also adding it explicitly -- and this, in fact, happened in several places in real projects, resulting in not quite correct solution and project files being generated: such files could still be read by MSVS, but were rewritten by it to prune the duplicate dependencies, resulting in changes compared to the originally generated versions.

Avoid this by emitting the dependencies only once in both the solution and the project files: this requires duplicating the duplication pruning logic, but is better than trying to do it at the model level because the dependencies may result from the evaluation of expressions involving the toolset name and other variables, so this approach is much simpler to make work.

Also add a unit test verifying that this now behaves as expected.


This replaces #104.

vadz avatar Apr 19 '18 10:04 vadz