[CMake] CMake absolute path

Bogdan Cristea cristeab at gmail.com
Wed Jan 22 12:21:59 EST 2014


On 01/22/2014 06:05 PM, Tony-Alexandru Dincu wrote:
>
> We are trying to build a complex solution which has a path 72 
> characters long with CMake 2.8.12, but the build fails saying that 
> some files can't be found.
>
> I investigated the problem and I saw that the problem is from relative 
> path. With CMake 2.8.8 the solution builds, but with CMake 2.8.9 no.
>
> I saw that *CMAKE_USE_RELATIVE_PATHS *isn't working very well 
> (http://public.kitware.com/Bug/view.php?id=12563) and I tried to 
> replace this line from cmVisualStudio10TargetGenerator.cxx
>
> std::string sourceFile = this->ConvertPath(sf->GetFullPath(), false);
>
> with this one
>
> std::string sourceFile = sf->GetFullPath();
>
> in order to force absolute path.
>
> Now the projects are building correctly, but I'm not sure that this is 
> the best solution. What do you recommend us to do in order to solve 
> this problem? It would be nice if there were a way to do this without 
> modifying CMake.
>

Hi

Could you show us a diff between the old project files and the new ones, 
with your modification ? AFAIK there seems to be something wrong with 
the project generator for Visual Studio 2010.

regards
Bogdan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140122/fe6e18dd/attachment.html>


More information about the CMake mailing list