barcaroller wrote:
This is a follow up to the message ("Setting variables in CMakeLists.txt") that I posted on April 30th, 2009.

I am now using cmake 2.8.0 and the CMAKE_USE_RELATIVE_PATHS variable still does not work. It does work for in-source builds (when I build the object files inside the 'src' directory) but it does not work for out-of-source builds.

The cmake documentation does specify that CMAKE_USE_RELATIVE_PATHS may not work in complex projects but my project could not be simpler (see below).

  project
     |
     +--- src     <- contains CMakeLists.txt
     |
     +--- build   <- cmake ../src ; make


All directories reside on a local disk. When I build from the build directory, the gcc compiler uses absolute pathnames no matter what value the CMAKE_USE_RELATIVE_PATHS variable is set at. This means that the __FILE__ macro uses absolute pathnames, which totally screws up the log files.

Will this ever be fixed or should I give up on out-of-source builds?



You should give up on CMAKE_USE_RELATIVE_PATHS , and we should deprecate it from CMake. It just does not work, and frustrates people.

-Bill
_______________________________________________
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