[CMake] Can CMake prompt the user for input while it's running?

Naram Qashat cyberbotx at cyberbotx.com
Sat Feb 27 14:12:18 EST 2010


On 02/27/10 13:24, Matt Williams wrote:
> On 27 February 2010 18:12, Naram Qashat<cyberbotx at cyberbotx.com>  wrote:
>> On 02/27/10 12:53, John Drescher wrote:
>>>
>>> On Sat, Feb 27, 2010 at 12:23 PM, Naram Qashat<cyberbotx at cyberbotx.com>
>>>   wrote:
>>>>
>>>> I'm wondering if it's possible for CMake to prompt the user for input
>>>> when
>>>> it's running, as opposed to relying on passing in arguments for input.
>>>>   Main
>>>> reason I'm looking for something like this is so we can have optional
>>>> files
>>>> that can be enabled or disabled by the user when CMake is run.  Ideally
>>>> this
>>>> should be able to be done if a certain command-line flag is passed in.
>>>>
>>>
>>> Minus the prompting isn't that what options are for in cmake? I
>>> believe you can set them either via the gui or by the command line /
>>> shell.
>>>
>>> John
>>
>> The problem is that the number of options wouldn't be static because the
>> number of files that will be optional will change over time.  Which is why I
>> was wondering if there was a way to have CMake prompt while it runs.  I'd
>> rather avoid having an external script searching for the optional files when
>> CMake would already be doing that.
>
> 'cmake -i' does something similar to that. I'm not sure if it's
> exactly what you want though?

That's only partially helpful.  I say partially because it also shows a few 
CMake specific options, and it shows all the variables from find_library's 
usage, which would overwhelm the users.

Thanks,
Naram Qashat


More information about the CMake mailing list