[CMake] [Cmake] Absolute paths in .cmake, .txt files

Eric NOULARD eric.noulard at gmail.com
Thu Sep 4 10:08:42 EDT 2008


Le Thu, 4 Sep 2008 09:13:31 -0400,
"Bo Huang" <BHuang at xrite.com> a écrit :

> I observed that in .cmake, .txt, .depend, .sln, .vcproj files, paths
> are always absolute when generated. Is there anyway to automatically
> make them relative or set a global path? So far I can only change the
> Visual Studio paths using macros such as $(SolutionDir).

I think this has already been discussed on the list,
(but I cannot find the reference)
and the answer was CMake has good reason to use absolute path, among
others you can not expect tools/lib/etc... found with FIND_PROGRAM,
FIND_PACKAGE etc...
to be found in the same place for different machine, or
even to find any.

> I wish to do this so my co-workers can run via my pre-generated Visual
> Studio project on their machines. 

You may try to 
SET(CMAKE_SUPPRESS_REGENERATION YES)

but I don't know how well it works.

May be you can only share the source tree and teach them
how to easilly configure their local build tree with an hopefully
easy CMake run?


-- 
Erk


More information about the CMake mailing list