diff options
author | Nicolas Despres <nicolas.despres@gmail.com> | 2011-03-20 16:57:42 (GMT) |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-10-02 17:30:42 (GMT) |
commit | 3db2973bd2ceb65a0d88ed6a3428e17cc9f0e182 (patch) | |
tree | a01dd9538a35dad32d0e1948a97b3a29f28c1d1d /Source/cmTarget.h | |
parent | 89bdc3e213b82759c3f916ef746c0bc752ce32d2 (diff) | |
download | CMake-3db2973bd2ceb65a0d88ed6a3428e17cc9f0e182.zip CMake-3db2973bd2ceb65a0d88ed6a3428e17cc9f0e182.tar.gz CMake-3db2973bd2ceb65a0d88ed6a3428e17cc9f0e182.tar.bz2 |
Refactor TargetTypeNames.
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.
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r-- | Source/cmTarget.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 26fcef2..0abdddb 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -62,7 +62,7 @@ public: SHARED_LIBRARY, MODULE_LIBRARY, UTILITY, GLOBAL_TARGET, INSTALL_FILES, INSTALL_PROGRAMS, INSTALL_DIRECTORY, UNKNOWN_LIBRARY}; - static const char* TargetTypeNames[]; + static const char* GetTargetTypeName(TargetType targetType); enum CustomCommandType { PRE_BUILD, PRE_LINK, POST_BUILD }; /** |