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/cmMakefile.cxx | |
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/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index e5b5443..573c430 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1379,7 +1379,7 @@ void cmMakefile::AddLinkLibraryForTarget(const char *target, { cmOStringStream e; e << "Target \"" << lib << "\" of type " - << cmTarget::TargetTypeNames[static_cast<int>(tgt->GetType())] + << cmTarget::GetTargetTypeName(tgt->GetType()) << " may not be linked into another target. " << "One may link only to STATIC or SHARED libraries, or " << "to executables with the ENABLE_EXPORTS property set."; |