[LLVMdev] [cfe-dev] Testing and CMake

Óscar Fuentes ofv at wanadoo.es
Thu Jan 15 11:38:36 PST 2009


Patrick Boettcher <pb at linuxtv.org> writes:

>> For development, CMake is working great for me. I rarely get build
>> errors related to the project file being out-of-date.
>>
>> Is it true that CMake only generates absolute paths? Any idea on the
>> difficulty of generating relative paths? I consider this a pretty big
>> obstacle...
>
> I did not follow the full-thread, just reading this Email and I hope I'm 
> getting it right:
>
> We had the same problem (relative paths) and it turned out to be 
> relatively (got the language joke here? ;)) easy, at least with cmake 2.6, 
> in a local project.
>
> set(CMAKE_USE_RELATIVE_PATHS ON)
>
> It works well for vcproj-generation. In Linux I could not test it 
> comprehensively yet (as to why it is possible to copy a repository and 
> build it in its new place w/o re-cmaking.)

Hmmm...

  CMAKE_USE_RELATIVE_PATHS
       Use relative paths (May not work!).

       If this is set to TRUE, then the CMake will use relative paths between
       the source and binary tree.  This option does not work for more
       complicated projects, and relative paths are used when possible.  In
       general, it is not possible to move CMake generated makefiles to a
       different location regardless of the value of this variable.


> In addition we are setting
>
> set(CMAKE_SUPPRESS_REGENERATION ON)
>
> in order to not have a dependency on the CMakeLists when creating the 
> vcproj-file.

This looks like asking for trouble. Why are you doing this?

-- 
Oscar




More information about the llvm-dev mailing list