summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFile.cxx
diff options
context:
space:
mode:
authorBen Boeckel <mathstuf@gmail.com>2014-03-11 04:22:02 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2014-04-29 01:43:39 (GMT)
commit7b8a990424228716cc3161027dcf2c18ef9793b6 (patch)
treef3d5a1f2867f06976aa770899b7fa228e10cd7df /Source/cmSourceFile.cxx
parent10baf00f3d14124ee97ca12510595501d66ed70e (diff)
downloadCMake-7b8a990424228716cc3161027dcf2c18ef9793b6.zip
CMake-7b8a990424228716cc3161027dcf2c18ef9793b6.tar.gz
CMake-7b8a990424228716cc3161027dcf2c18ef9793b6.tar.bz2
perf: Cache the language property string
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r--Source/cmSourceFile.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index 3b130ec..b833d3f 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -40,6 +40,8 @@ std::string const& cmSourceFile::GetExtension() const
return this->Extension;
}
+const std::string cmSourceFile::propLANGUAGE = "LANGUAGE";
+
//----------------------------------------------------------------------------
void cmSourceFile::SetObjectLibrary(std::string const& objlib)
{
@@ -56,7 +58,7 @@ std::string cmSourceFile::GetObjectLibrary() const
std::string cmSourceFile::GetLanguage()
{
// If the language was set explicitly by the user then use it.
- if(const char* lang = this->GetProperty("LANGUAGE"))
+ if(const char* lang = this->GetProperty(propLANGUAGE))
{
return lang;
}
@@ -93,7 +95,7 @@ std::string cmSourceFile::GetLanguage()
std::string cmSourceFile::GetLanguage() const
{
// If the language was set explicitly by the user then use it.
- if(const char* lang = this->GetProperty("LANGUAGE"))
+ if(const char* lang = this->GetProperty(propLANGUAGE))
{
return lang;
}