[cmake-developers] CheckTypeSize: Add support for C++
Rolf Eike Beer
eike at sf-mail.de
Fri Oct 18 10:47:53 EDT 2013
Am Freitag, 18. Oktober 2013, 10:42:19 schrieb Brad King:
> On 10/18/2013 10:20 AM, Daniele E. Domenichelli wrote:
> > Done and added a few more unit tests...
>
> Thanks:
>
> + if("x${arg}" MATCHES "^x(BUILTIN_TYPES_ONLY)$" AND "x${doing}" MATCHES
> "^x$")
>
> Generally the convention in similar state machines elsewhere
> is to not allow a keyword to be a value for a preceding keyword,
> so you don't need the AND here. Also Eike has made an effort to
> avoid MATCHES in favor of STREQUAL when possible for speed.
>
> So the block can be (untested):
>
> if("x${arg}" STREQUAL "xBUILTIN_TYPES_ONLY")
Ah, horrid crap! :P
Any chance that this would not do what is expected from it?
if (arg STREQUAL "BUILTIN_TYPES_ONLY")
Eike
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20131018/1aa78d66/attachment.sig>
More information about the cmake-developers
mailing list