[CMake] out of source command line flag
Alexander Neundorf
a.neundorf-work at gmx.net
Fri Sep 4 15:58:02 EDT 2009
On Sunday 09 August 2009, Roman Shtylman wrote:
> I have been meaning to try and create such a patch for a while. The
> idea behind the patch is that you can specify the location of the out
> of source build directory on the command line. By itself, this really
> isn't all that useful save having to type mkdir 'some dir', cd 'some
> dir', and 'cmake ..'
>
> I think the use in this feature comes from being able to do something
> like the following from WITHIN the source tree
>
> $> cmake -B ./debug -DDebug=1 .
> $> cmake -B ./release -DRelease=1 .
>
> This will create directories 'debug' and 'release' in the source tree
> where it will put all of the cmake cache files and whatnot from the
> build. Each directory will then be using the appropriate things
> triggered by having set the -D ... note... this is just a simple
> example
>
> I used the -B flag (as it was already there and I couldn't tell what
> else it was currently doing) ... but pardon me if it actually had a
> previous purpose.
>
> This patch is not meat to be exhaustive (as I might have missed a
> usage scenario with cache files or whatnot), but it does demonstrate
> the capability I am looking for.
>
> Feedback is welcome...or if you think this feature is utterly
> worthless let me know :) I wanna hear why it can't work (don't just
> say...well, you could have just made the directory and done all that
> within it...yea...I know...but the point is that I didn't have to :) )
Hmm, from my POV this patch doesn't add functionality to cmake, and it adds a
second way to do one thing. Personally I wouldn't vote for including the
patch.
Don't know what the others say.
Documentation is missing.
Alex
More information about the CMake
mailing list