summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBen Boeckel <mathstuf@gmail.com>2014-02-08 17:11:32 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2014-07-17 15:17:49 (GMT)
commitcebefa71fad223f134529a2b859006360e465a80 (patch)
tree6603ce818360fa563f333591bdd343ae674fb570 /Source/cmTarget.cxx
parent97ce676e75900dfeeb30ea1c6ba5a139befe9562 (diff)
downloadCMake-cebefa71fad223f134529a2b859006360e465a80.zip
CMake-cebefa71fad223f134529a2b859006360e465a80.tar.gz
CMake-cebefa71fad223f134529a2b859006360e465a80.tar.bz2
cmTarget: Sort special property checks
The LINK_LIBRARIES property is by *far* the most popular. Move it to the top. TYPE is second, but with more generator expression usage, that may change in the future.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx54
1 files changed, 27 insertions, 27 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 62b30fd..09eb8a4 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -3100,26 +3100,41 @@ const char *cmTarget::GetProperty(const std::string& prop,
}
if(specialProps.count(prop))
{
- if(prop == "INCLUDE_DIRECTORIES")
+ if(prop == "LINK_LIBRARIES")
{
- if (this->Internal->IncludeDirectoriesEntries.empty())
+ if (this->Internal->LinkImplementationPropertyEntries.empty())
{
return 0;
}
static std::string output;
- MakePropertyList(output, this->Internal->IncludeDirectoriesEntries);
+ output = "";
+ std::string sep;
+ for (std::vector<cmValueWithOrigin>::const_iterator
+ it = this->Internal->LinkImplementationPropertyEntries.begin(),
+ end = this->Internal->LinkImplementationPropertyEntries.end();
+ it != end; ++it)
+ {
+ output += sep;
+ output += it->Value;
+ sep = ";";
+ }
return output.c_str();
}
- else if(prop == "COMPILE_OPTIONS")
+ // the type property returns what type the target is
+ else if (prop == "TYPE")
{
- if (this->Internal->CompileOptionsEntries.empty())
+ return cmTarget::GetTargetTypeName(this->GetType());
+ }
+ else if(prop == "INCLUDE_DIRECTORIES")
+ {
+ if (this->Internal->IncludeDirectoriesEntries.empty())
{
return 0;
}
static std::string output;
- MakePropertyList(output, this->Internal->CompileOptionsEntries);
+ MakePropertyList(output, this->Internal->IncludeDirectoriesEntries);
return output.c_str();
}
else if(prop == "COMPILE_FEATURES")
@@ -3133,36 +3148,26 @@ const char *cmTarget::GetProperty(const std::string& prop,
MakePropertyList(output, this->Internal->CompileFeaturesEntries);
return output.c_str();
}
- else if(prop == "COMPILE_DEFINITIONS")
+ else if(prop == "COMPILE_OPTIONS")
{
- if (this->Internal->CompileDefinitionsEntries.empty())
+ if (this->Internal->CompileOptionsEntries.empty())
{
return 0;
}
static std::string output;
- MakePropertyList(output, this->Internal->CompileDefinitionsEntries);
+ MakePropertyList(output, this->Internal->CompileOptionsEntries);
return output.c_str();
}
- else if(prop == "LINK_LIBRARIES")
+ else if(prop == "COMPILE_DEFINITIONS")
{
- if (this->Internal->LinkImplementationPropertyEntries.empty())
+ if (this->Internal->CompileDefinitionsEntries.empty())
{
return 0;
}
static std::string output;
- output = "";
- std::string sep;
- for (std::vector<cmValueWithOrigin>::const_iterator
- it = this->Internal->LinkImplementationPropertyEntries.begin(),
- end = this->Internal->LinkImplementationPropertyEntries.end();
- it != end; ++it)
- {
- output += sep;
- output += it->Value;
- sep = ";";
- }
+ MakePropertyList(output, this->Internal->CompileDefinitionsEntries);
return output.c_str();
}
else if (prop == "IMPORTED")
@@ -3270,11 +3275,6 @@ const char *cmTarget::GetProperty(const std::string& prop,
this->Properties.SetProperty("SOURCES", ss.str().c_str(),
cmProperty::TARGET);
}
- // the type property returns what type the target is
- else if (prop == "TYPE")
- {
- return cmTarget::GetTargetTypeName(this->GetType());
- }
}
bool chain = false;