[Cmake] Searching for CMAKE_ROOT

Amitha Perera perera at cs.rpi.edu
Tue May 22 09:44:23 EDT 2001


With the out-of-source CMake, would it be possible to search for
CMAKE_ROOT in a well defined place in the project source directory?
Currently, it looks at where the executable is, then at a "share"
directory. It could look for it in the source directory first,
perhaps, since large projects (vxl) have their own modules and
templates and such--ones that may not be installed as part of the
"system".

I know it will look at the environment variable first, but the point
is that if that variable is not set, then it will use the system
installed configure script, CMakeSystem.cmake, etc. This means a small
mistake could potentially alter all kinds of cache values.

The goal, I think, has been to have CMake provide all necessary
modules and templates as part of the CMake distribution, but I don't
think that is possible for larger projects. So, I think it is better
to search in the source directory for the temlates and modules first,
and then the system. Add on that it is much easier to change templates
and such in a source directory than in an installed, shared directory.

[At RPI, I intend to install cmake system-wide and make it another
tool like gmake and gcc.]

Amitha.




More information about the CMake mailing list