diff options
-rw-r--r-- | Source/cmTarget.cxx | 54 |
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; |