On 6/6/2011 11:33 AM, Yuri Timenkov wrote:
I guess there are cases when you can't do this.
For example, on Windows you can't simply call "cd -" or you may have
other kind of script than sh one (for example ant).

Also both source dir and binary dir may be relative to current
directory, therefore you don't know neither absolute nor relative to
bindir source path. And determining it may be quite cumbersome (again,
in ant this can be done using property and property names are global and
they're evaluated only once per script, so you can't easily wrap cmake
call into macro).

There is sort of a backdoor...

You can use -H and -B on the command line like this:
cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)

This is what cmake does inside makefiles. It has been this way but un-documented for some time. I suppose we could just document it. I don't see a reason to stop support for it some day...

-Bill
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to