[CMake] Using the "Visual Studio 10 Win64" CMake generator of CMake 2.8.12.2, is there a way to get .vcxproj including the TrackFileAccess property set to false.

Dominique Ledit Dominique.Ledit at PDGM.com
Thu Sep 25 12:55:55 EDT 2014


Hi

I use CMake 2.8.12.2 and the "Visual Studio 10 Win64" generator to generate the solution/projects I use to build my application.
My Windows development platform is a Win 7 machine with Visual Studio 10 installed on it.

I'm currently trying to address an issue that makes many .dll/.exe being linked on Windows platform, using msbuild, even if they should not do.  I've read a lot of articles and done a lot of tests on small projects and
it seems that, using msbuild, the dependencies are managed by the build system itself through the use of Tracker.exe that parses the link command lines to retrieve the dependencies.

1.       The library dependencies in the VS solution generated by CMake are correct. At least they are consistent with what Microsoft thinks is the right way to build a product on their platform. The .dll/.exe depend on the .lib (import lib) of their direct dependencies.
2.       In debug builds I perform incremental links. This means that the build of a library doesn't necessary result in a change of the .lib: Assuming there were no changes in the symbol table (no changes in the library API) the .lib is left unchanged. So, typically, as far as we don't change the API (.h) the .dll is changed but the .lib is left unchanged. So theoretically a change that doesn't affect the API will result in the library being rebuilt, but the .lib is left unchanged, and the products that depend on this library (through the .lib) are not re-built. This is close to the behavior on Linux, where there is no dependencies between .so, but the builds are triggered if the API changes because basically some .h changed, which triggers some .o builds in the dependent libraries, hence the libs rebuild.
3.       So basically everything looks consistent and neat.
Now here is the issue as far as I understand: whenever a library has to rebuild because one of the .lib it depends on changed, the incremental link is disabled, a full link is performed and, as a consequence, the .lib (import lib) is changed, even if there is no reason for it to change (the API has not changed). And then all the libraries that depend on it are rebuilt, with incremental link disabled, which cascades again and results in all the dependent libs (direct and indirect) rebuilding.
The trick I've found is to disable the tracker, by setting the TrackFileAccess property to "false" (I add <PropertyGroup><TrackFileAccess>false</ TrackFileAccess></ PropertyGroup>) in each .vcxproj generated at configuration time. Of course this has to be done after each CMake configure.
So my question is:
is there a way to make the "Visual Studio 10 Win64" generator set this property to false, in all .vcxproj at generation time?

Thank you very much

Dominique
------------------- This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140925/34505b8d/attachment-0001.html>


More information about the CMake mailing list