[Cmake] CMake and amd (NFS automounter)

Amitha Perera perera at cs.rpi.edu
Thu Aug 16 12:01:57 EDT 2001


I'm trying to get CMake and amd work nicely. The issue, essentially,
is that calls to getcwd and pwd need to be replaced by calls to "amq
-w", which will return a path that is valid system-wide, as opposed to
just on local disk.

I've done this by having a cache variable CMAKE_AMQ and, in
GetCurrentWorkingDirectory(), using this to get current directory. The
problem occurs when cmake is run for the first time in a new
project. At this point, there is no cache, so the CMAKE_AMQ is not
set. Therefore, the home (source and binary) directories are not
amd-paths, they are just regular paths. cmake then runs it's usual
initialisation and finds amq, but it is too late: the wrong paths for
the home directories have been recorded.

Can anyone think of a clean way to solve this issue? One possibility
is to hard-code knownledge into cmake, so that cmake is compiled with
amq or it is not. I was hoping to have a more dynamic approach, where,
when a new project is started, cmake will determine if amd is being
used on the system or not, and react appropriately.

Thanks,
Amitha.




More information about the CMake mailing list