[CMake] Invoking CMakle outside of the build/source dir.

Kishore kitts.mailinglists at gmail.com
Mon Jun 6 10:41:20 EDT 2011


On Monday 06 Jun 2011 12:38:33 PM Campbell Barton wrote:
> Hi, A handful of times I would have found it useful to run cmake
> without having to be in the build dir, mostly there is some way to
> change the CWD or write a shell wrapper, nevertheless it could still
> be useful when launching builds from scripts or more limited
> environments.
> 
> Is there some way to do this?:
> cmake /some/source/dir /some/build/dir

... I guess not. Instead just invoke it as 

"cd /some/build/dir && cmake /some/source/dir ; cd -"

which should bring you back to the current dir.

> ... rather than
> cd /some/source/dir ; cmake /some/build/dir

Reversed paths! :P
-- 
Cheers!
Kishore


More information about the CMake mailing list