On Tue, Oct 15, 2013 at 10:56 AM, Petr Kmoch <petr.km...@gmail.com> wrote: > Hi Magnus. > > I am afraid that's not really possible (safely). CMake uses absolute paths > all over the place (by design), so all output file paths etc. are hardcoded > in the .sln and .vc[x]proj files to the paths applicable where they were > generated. You can experiment with the variable CMAKE_USE_RELATIVE_PATHS, > but even its documentation warns that it's unreliable.
Well, my quick test suggests that CMAKE_USE_RELATIVE_PATHS is fairly good, but since the documentation is worded that way there are probably corner cases that I don't hit :) However, one thing that I didn't notice before is that the use of the CMake executable is deeply embedded in the solution+project files--`cmake -E` is used very widely for obvious reasons. Also the path to the CMake executable is absolute and unaffected by the use of CMAKE_USE_RELATIVE_PATHS. I think I'll just have to give up on the idea and dig in my heels in preparation for the inevitable discussion/complaint when introducing CMake ;) /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake