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

Nicolas Desprès nicolas.despres at gmail.com
Tue Sep 27 11:32:19 EDT 2011


On Tue, Sep 27, 2011 at 3:55 PM, Rolf Eike Beer <eike at sf-mail.de> wrote:
>> 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?

Frankly I don't know. I just refactor the code and kept the same
original behavior.

-- 
Nicolas Desprès



More information about the cmake-developers mailing list