[cmake-developers] CMake command line options -H and -B

Brad King brad.king at kitware.com
Mon Sep 3 10:00:59 EDT 2012


On 09/02/2012 11:03 AM, Benjamin Eikel wrote:
> I have a question concerning the command line options "-H" and "-B". The usage 
> information says that "-H" shows the help, which is true when "-H" does not 
> receive any parameters (see cmDocumentation.cxx:1120ff). But when there is a 
> parameter, it sets the source directory (see cmake.cxx:663ff). This is not 
> documented when calling "cmake --help" and is somehow ambiguous. Furthermore 
> the "-B" option is not documented there. I encountered the options by looking 
> at the "rebuild_cache" make target. Are they hidden with intent?

They are ancient internal implementation details.  Their usage by
builtin targets like "rebuild_cache" could probably be replaced
by something that "cd"s to the top of the build tree and runs
CMake pointing it at the source tree.

-Brad



More information about the cmake-developers mailing list