MCPcopy Create free account
hub / github.com/Kitware/CMake / GetImportedXcFrameworkPath

Method GetImportedXcFrameworkPath

Source/cmGeneratorTarget.cxx:6067–6106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6065}
6066
6067std::string cmGeneratorTarget::GetImportedXcFrameworkPath(
6068 std::string const& config) const
6069{
6070 if (!(this->IsApple() && this->IsImported() &&
6071 (this->GetType() == cmStateEnums::SHARED_LIBRARY ||
6072 this->GetType() == cmStateEnums::STATIC_LIBRARY ||
6073 this->GetType() == cmStateEnums::UNKNOWN_LIBRARY))) {
6074 return {};
6075 }
6076
6077 std::string desiredConfig = config;
6078 if (config.empty()) {
6079 desiredConfig = "NOCONFIG";
6080 }
6081
6082 std::string result;
6083
6084 cmValue loc = nullptr;
6085 cmValue imp = nullptr;
6086 std::string suffix;
6087
6088 if (this->Target->GetMappedConfig(desiredConfig, loc, imp, suffix)) {
6089 if (loc) {
6090 result = *loc;
6091 } else {
6092 std::string impProp = cmStrCat("IMPORTED_LOCATION", suffix);
6093 if (cmValue configLocation = this->GetProperty(impProp)) {
6094 result = *configLocation;
6095 } else if (cmValue location = this->GetProperty("IMPORTED_LOCATION")) {
6096 result = *location;
6097 }
6098 }
6099
6100 if (cmSystemTools::IsPathToXcFramework(result)) {
6101 return result;
6102 }
6103 }
6104
6105 return {};
6106}
6107
6108bool cmGeneratorTarget::HaveFortranSources(std::string const& config) const
6109{

Callers 1

AddItemMethod · 0.80

Calls 7

IsAppleMethod · 0.95
IsImportedMethod · 0.95
GetTypeMethod · 0.95
GetPropertyMethod · 0.95
GetMappedConfigMethod · 0.80
cmStrCatFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected