[CMake] OPTION-like combobox
Pau Garcia i Quiles
pgquiles at elpauer.org
Wed Jul 29 08:54:55 EDT 2009
On Wed, Jul 29, 2009 at 1:55 PM, Brad King<brad.king at kitware.com> wrote:
> Pau Garcia i Quiles wrote:
>> Hello,
>>
>> Is there anything like OPTION but which allows to select one value
>> from a limited list of values (a combobox). Something like:
>>
>> OPTION( CRYPTOBACKEND "Select a cryptography backend" VALUES "OpenSSL"
>> "LibTomCrypt" "LibDES" DEFAULT "OpenSSL" )
>
> There is in CMake HEAD from CVS. See
>
> cmake --help-properties
>
> and look for the "Properties on Cache Entries" section.
>
> In particular, the "STRINGS" property does what you want, at least
> in the cmake-gui:
>
> set(CRYPTOBACKEND "OpenSSL" CACHE STRING
> "Select a cryptography backend")
> set_property(CACHE CRYPTOBACKEND PROPERTY STRINGS
> "OpenSSL" "LibTomCrypt" "LibDES")
>
> This feature will be included in the 2.8 release.
Cool, thanks!
--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
More information about the CMake
mailing list