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")
   set(_CHECK_TYPE_SIZE_${arg} 1)
   unset(doing)
 elseif("x${arg}" STREQUAL "xLANGUAGE") # change to MATCHES for more keys
   set(doing "${arg}")
 elseif("x${doing}" STREQUAL "xLANGUAGE")
   set(_CHECK_TYPE_SIZE_${doing} "${arg}")
   unset(doing)
 else()
   message(FATAL_ERROR "Unknown argument:\n  ${arg}\n")
 endif()

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to