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

Method GetTargetSourceFileFlags

Source/cmGeneratorTarget.cxx:4147–4178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4145}
4146
4147struct cmGeneratorTarget::SourceFileFlags
4148cmGeneratorTarget::GetTargetSourceFileFlags(cmSourceFile const* sf) const
4149{
4150 struct SourceFileFlags flags;
4151 this->ConstructSourceFileFlags();
4152 auto si = this->SourceFlagsMap.find(sf);
4153 if (si != this->SourceFlagsMap.end()) {
4154 flags = si->second;
4155 } else {
4156 // Handle the MACOSX_PACKAGE_LOCATION property on source files that
4157 // were not listed in one of the other lists.
4158 if (cmValue location = sf->GetProperty("MACOSX_PACKAGE_LOCATION")) {
4159 flags.MacFolder = location->c_str();
4160 bool const stripResources =
4161 this->GlobalGenerator->ShouldStripResourcePath(this->Makefile);
4162 if (*location == "Resources") {
4163 flags.Type = cmGeneratorTarget::SourceFileTypeResource;
4164 if (stripResources) {
4165 flags.MacFolder = "";
4166 }
4167 } else if (cmHasLiteralPrefix(*location, "Resources/")) {
4168 flags.Type = cmGeneratorTarget::SourceFileTypeDeepResource;
4169 if (stripResources) {
4170 flags.MacFolder += cmStrLen("Resources/");
4171 }
4172 } else {
4173 flags.Type = cmGeneratorTarget::SourceFileTypeMacContent;
4174 }
4175 }
4176 }
4177 return flags;
4178}
4179
4180void cmGeneratorTarget::ConstructSourceFileFlags() const
4181{

Callers 3

CreateXCodeSourceFileMethod · 0.80
CreateXCodeTargetMethod · 0.80

Calls 8

cmHasLiteralPrefixFunction · 0.85
c_strMethod · 0.80
cmStrLenFunction · 0.70
findMethod · 0.45
endMethod · 0.45
GetPropertyMethod · 0.45

Tested by

no test coverage detected