On 05/05/2012 07:25 AM, Dave Abrahams wrote:
> 
> I need to preserve the built-but-not-yet-installed state of some
> projects, and the tool I'm driving CMake with moves the result of every
> build step from a read-write build directory into a readonly cache.  The
> result is that the generated cmake_install.cmake files no longer work,
> because they are full of absolute paths.  I wrote a simple program to
> adjust the paths in the cmake_install.cmake files as a postprocessing
> step, replacing $CWD, where it is found, with a cmake variable.  The
> only problem: on my Mac, /tmp is a symlink to /private/tmp, and in some
> scenarios the absolute path in cmake_install.cmake is the short one
> wheras while $CWD is the long one.  No match :(
> 
> I started to write some code to address this problem, but it's getting
> complex to the point where it seems like "there must be a better way."
> So I ask: is there?
> 
> Thanks in advance,
> 

I'm afraid that the answer is no. There is the variable
CMAKE_USE_RELATIVE_PATHS, but that is broken and does not work in
general. Just out of curiosity: Why do you need to cache the build tree
in the first place? Would it be enough to "make install
DESTDIR=/path/to/cache"?

Michael
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to