[CMake] out of source command line flag
Bill Hoffman
bill.hoffman at kitware.com
Sat Sep 5 10:59:09 EDT 2009
Alan W. Irwin wrote:
> On 2009-09-05 09:38+0200 Hendrik Sattler wrote:
>
>> The problem with how giving the build-dir/source-dir to cmake is
>> currently too
>> much dependent on other conditions:
>> cmake [options] <path-to-source>
>> cmake [options] <path-to-existing-build>
>>
>> The first only is true if no CMakeCache.txt exists there. This was
>> actually a
>> bad choice to have that as only possibility.
>> Being able to do an out-of-source build even if there was a previous
>> in-source
>> build would be much appreciated.
>
> I second that motion to drop the <path-to-existing-build> interpretation
> (subject to policy protection, of course, assuming there is at least some
> legitimate use case for <patch-to-existing-build>.)
>
> CMake newbie's natural tendency seems to be to try an in-source build
> first.
> Thus, I cannot count how many times PLplot and FreeEOS users out-of-source
> build experience has been silently messed up by their first build attempt
> which was in source. I have never heard of users actually using the
> <path-to-existing-build> interpretation except by mistake. However,
> assuming there is some legitimate use case, I suggest you make a POLICY to
> drop the <path-to-existing-build> interpretation. I would be happy to adopt
> such a policy for my different software projects simply to drop the volume
> of necessary advice to first-time users who keep falling into the trap of
> using <path-to-existing-build> by mistake.
>
I use this all the time, and so do lots of people that I know. They do this:
cmake .
-Bill
More information about the CMake
mailing list