"Philip Lowman" <[email protected]> wrote in message 
news:[email protected]...
>
> Which version of CMake are you using?
>

I was using cmake 2.6.3.  I have installed cmake 2.6.4 but the problem is 
still there.  Looking at the makefiles in the generated build/CMakeFiles 
confirms that only absolute pathnames are being generated.

However, when I use in-source builds (i.e. when I build inside the 'src' 
directory instead of the 'build' directory), all of this work perfectly as 
long as I use CACHE BOOL ""

    SET(CMAKE_VERBOSE_MAKEFILE    ON CACHE BOOL "")
    SET(CMAKE_USE_RELATIVE_PATHS  ON CACHE BOOL "")

In other words, relative and absolute paths are generated properly based on 
the CMAKE_USE_RELATIVE_PATHS variable (with CACHE BOOL "")

    > cd src     (instead of 'cd build')
    > cmake .    (instead of 'cmake ../src')
    > make       (generated relative pathnames; see below)

    /usr/bin/c++    -I. -I.. -I../.. -I/usr2/include/boost   -g -Wall -ansi  
-o CMakeFiles/myprogram.dir/myprogram.cpp.o  -c myprogram.cpp


So, to recap:

   If I use in-source builds, with CACHE BOOL "", it works
   If I use out-of-source builds, it does not work (with or without CACHE 
BOOL "")


I'm at a loss to explain this.  Given that cmake is being successfully used 
by KDE and Boost, I'm assuming that I'm doing something wrong.




_______________________________________________
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