[CMake] Re: How to pass arguments to 'cmake -P' scripts?
Bill Hoffman
bill.hoffman at kitware.com
Mon Feb 4 15:09:55 EST 2008
Brandon Van Every wrote:
> On Feb 4, 2008 2:44 PM, Alexander Neundorf <a.neundorf-work at gmx.net> wrote:
>> I think this is documented now in cmake 2.4.8
>
> It is:
>
> # -P <file>: Process script mode.
>
> Process the given cmake file as a script written in the CMake
> language. No configure or generate step is performed and the cache is
> not modified. If variables are defined using -D, this must be done
> before the -P argument.
>
>
> But my question is *why* must -P be the last thing? Is this a design
> flaw, or is there some shell reason for it?
>
I think it is so you can have multiple -P options with different -D
options between them. The command line options are basically executed
in the order they are seen, and not queued up for later.
-Bill
More information about the CMake
mailing list