[CMake] CMake absolute path

Tony-Alexandru Dincu tony-alexandru.dincu at ubisoft.com
Wed Jan 22 12:05:07 EST 2014


Hello!

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.

Thanks,

Tony-Alexandru Dincu
Software Developer
Ubisoft Craiova


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


More information about the CMake mailing list