Re: [CMake] How to handle options with more than two possible values?

2016-10-14 Thread YuGiOhJCJ Mailing-List via CMake
Thanks it works perfectly! On Thu, 13 Oct 2016 13:41:00 +0200 Petr Kmoch wrote: > Hi. > > option() is a handy shortcut for boolean options, but it's little more than > syntactic sugar for a cache variable of type BOOL. To create a tristate > variable, you can do this: >

Re: [CMake] How to handle options with more than two possible values?

2016-10-13 Thread Petr Kmoch
Hi. option() is a handy shortcut for boolean options, but it's little more than syntactic sugar for a cache variable of type BOOL. To create a tristate variable, you can do this: set(ENABLE_SOMETHING AUTO CACHE STRING "Enable SOMETHING support") # create the variable set_property(CACHE

[CMake] How to handle options with more than two possible values?

2016-10-13 Thread YuGiOhJCJ Mailing-List via CMake
Hello, Regarding the cmake-commands manual [1], the "option" command seems to take as argument a boolean constant that can have the two possible values: ON or OFF. I would like to use three possible values for an option: AUTO (as default value), ON or OFF. Example: option(ENABLE_SOMETHING