<br><br><div class="gmail_quote">On 15 August 2011 20:23, Albert Meltzer <span dir="ltr"><<a href="mailto:bulsara@gmail.com">bulsara@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Maybe the esteemed colleagues would suggest another good and reliable way to handle situations such as this:<div class="gmail_quote"><div><br></div><div>IF (lang STREQUAL "perl") ...</div><div>ELSEIF(lang STREQUAL "python") ...</div>
<div>ELSEIF(....)</div><div>...</div><div>ENDIF ()</div><div><br></div><div>without having to SET(perl perl) (and all the other cases in this switch) myself (just in case), but still being afraid that somebody, somewhere else, would SET(perl 5.10.0), and without resorting to IF (lang MATCHES "^perl$")?</div>
</div></blockquote><div><br>Maybe I'm missing something obvious here but wouldn't the following code work okay:<br><br><div>if ("${lang}" STREQUAL "perl") ...</div><div>elseif ("${lang}" STREQUAL "python") ...</div>
<div>elseif (....)</div><div>...</div><div>endif ()</div><div><br></div>--<br>Glenn<br> <br></div></div>