How to get a list of C++ project that were compiled with incremental build on big codebase using MSBuild?

  c++, cl, compilation, msbuild

I am using VS 2017 as base coding platform. I have a big codebase with C#, F# and C++ projects. I have incremental build run on CI for each commit. As part of the CI build I want to run tests only for the projects that were compiled during that build. To do that I want MSBuild to output file with full projects paths to projects that were compiled during build. I will later process that file for my use case.

I was able to do that for C# and F# projects thanks to this answer. For now I still need a solution for C++ projects. This answer tell me that I would need postprocessing with CLCompile, rather than preprocessing I am doing with CoCompile. There is no solution that I can use for my problem there as author’s problem was more strict than mine.

How can I get a list of C++ projects (or all projects if it’s easier) that were compiled without having to modify each project?

Source: Windows Questions C++

LEAVE A COMMENT