[cmake-developers] [PATCH 1/7] Refactor TargetTypeNames.

Rolf Eike Beer eike at sf-mail.de
Tue Sep 27 09:55:41 EDT 2011


> From: Nicolas Despres <nicolas.despres at gmail.com>
>
> Make it a static method instead of an array. It is safer for the
> type checking and if we add a new target type we will be warned to add
> a case to the switch.

> +      case cmTarget::UNKNOWN_LIBRARY:
> +        return "UNKNOWN_LIBRARY";
> +        // break; /* unreachable */
> +    }
> +  return 0;
> +}

Shouldn't this spit out a warning or error message?

Eike



More information about the cmake-developers mailing list