<div dir="ltr">On Fri, Jul 18, 2008 at 1:40 PM, Bill Hoffman &lt;<a href="mailto:bill.hoffman@kitware.com">bill.hoffman@kitware.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Alexander Neundorf wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Friday 18 July 2008, Michael Wild wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 18Jul, 2008, at 12:27, Robert Haines wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

I would like to point at my feature wish:<br>
<a href="http://www.vtk.org/Bug/view.php?id=7313" target="_blank">http://www.vtk.org/Bug/view.php?id=7313</a><br>
<br>
Opinions?<br>
</blockquote>
I was looking for this functionality the other day, I think it&#39;s a<br>
good idea. I had thought that it was already in there for the<br>
CMAKE_BUILD_TYPE option that you always get but that seems to be<br>
implemented in a different way.<br>
<br>
So +1 from me. Is there anyway I can reflect that in the bug tracker?<br>
</blockquote>
That would be a very desirable feature. I suggest this be split even<br>
further: options with fixed values, like what you get from drop-down<br>
menus and options with a set of &quot;proposals&quot;, as you get in a combo-box.<br>
<br>
definitely +1<br>
</blockquote>
<br>
This seems to be a duplicate of <a href="http://public.kitware.com/Bug/view.php?id=1527" target="_blank">http://public.kitware.com/Bug/view.php?id=1527</a> , which is a duplicate of bug 39 according to the note, but I can&#39;t find bug 39 anymore :-/<br>

<br>
</blockquote>
<br></div>
Yup, this is a very old feature request...<br>
<br>
However, it is not that easy to implement, since the basic type in CMake is a string. &nbsp;There is no way to constrain the value of a variable, or even store more information about a variable.</blockquote><div><br>Wouldn&#39;t it be possible to do something like this primarily in the Cache, simply make a new cmCacheManager::CacheEntryType called ENUM (or something similar):<br>
<br>CMAKE_BUILD_TYPE:ENUM=0,Debug,Release,MinSizeRel,RelWithDebInfo&nbsp; # Debug is selected<br>CMAKE_BUILD_TYPE:ENUM=3,Debug,Release,MinSizeRel,RelWithDebInfo&nbsp; # RelWithDebInfo is selected<br><br>Then simply modify cmCacheManager::GetCacheValue() to be ENUM-aware and return the proper string based on the index.&nbsp; Obviously I&#39;m oversimplifying things here since all of the GUIs would need to be modified to be ENUM-aware, validation on assignment of the cache variable would have to occur, and the user would have to be given the means to define allowable enumerations via SET() or a command similar to OPTION().&nbsp; It doesn&#39;t seem like that much work if you&#39;re willing to accept the limitation that enumerated values would only be valid in the cache.<br>
<br>Is the crux of this problem basically in trying to figure out how to validate someone doing &quot;cmake -DCMAKE_BUILD_TYPE...&quot; prior to the creation of a cache variable?<br></div></div><br>-- <br>Philip Lowman
</div>