[CMake] CMake being too clever?

Brad King brad.king at kitware.com
Mon Jul 25 09:13:24 EDT 2005


Amitha Perera wrote:
> What I'm saying is that CMake should not suppose a relationship
> between the source tree and binary tree, whether that relationship be
> via relative or absolute paths, and should rely completely on what
> the user provided as the relationship. When CMake is first run, it is
> given the relationship between the binary directory and the source
> directory:
> 
>     /my/bin/path$ cmake /my/src/path
> 
> At this point, CMake knows that /my/bin/path (call it BIN) relates to
> /my/src/path (call it SRC). Each SUBDIRS command introduces further
> relationships: SUBDIRS( x ) implies SRC/x is related to BIN/x, and a
> SUBDIRS( y ) in x implies SRC/x/y/ is related to BIN/x/y. Now, to
> move between directories, CMake should only assume ".." relationships
> in the binary tree, which it fully controls.

Our current plan is to switch to using relative paths inside the build 
tree only.  This should avoid symlink and network mount problems.

-Brad


More information about the CMake mailing list