summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorNicolas Despres <nicolas.despres@gmail.com>2011-03-20 16:57:42 (GMT)
committerPeter Collingbourne <peter@pcc.me.uk>2011-10-02 17:30:42 (GMT)
commit3db2973bd2ceb65a0d88ed6a3428e17cc9f0e182 (patch)
treea01dd9538a35dad32d0e1948a97b3a29f28c1d1d /Source/cmLocalGenerator.cxx
parent89bdc3e213b82759c3f916ef746c0bc752ce32d2 (diff)
downloadCMake-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/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 1d1e8da..6af7fd5 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -996,7 +996,7 @@ cmLocalGenerator::ExpandRuleVariable(std::string const& variable,
}
if(variable == "TARGET_TYPE")
{
- return cmTarget::TargetTypeNames[replaceValues.CMTarget->GetType()];
+ return cmTarget::GetTargetTypeName(replaceValues.CMTarget->GetType());
}
}
if(replaceValues.Output)