[cmake-developers] Bug in Visual Studio generators

Josh Green inbilla at gmail.com
Tue Apr 8 04:58:46 EDT 2014

Hi fellow developers,

I've got an issue with Cmake
The Visual Studio Generators do not abide by the

This means that cmake always attempts to generate relative paths when
inserting filenames into projects, and means that the infamous 260
character max path limit is hit on relatively short

I've cloned CMAKE locally, and looked into why this happens.

It appears that the issue is inside the following function:


It calls LocalGenerator->Convert using the default parameter for
'optional' (which is false).
This means that these calls will always end up converting the path to relative.
I have resolved the issue and verified it by supplying a simple "true" instead.

This means that the internals of LocalGenerator->Convert will end up
checking "CMAKE_USE_RELATIVE_PATHS" and behave appropriately.

Is it possible to get this into a new version of 2.8.12?

Thanks for your time


More information about the cmake-developers mailing list