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

Method ConstructSourceFileFlags

Source/cmGeneratorTarget.cxx:4180–4226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4178}
4179
4180void cmGeneratorTarget::ConstructSourceFileFlags() const
4181{
4182 if (this->SourceFileFlagsConstructed) {
4183 return;
4184 }
4185 this->SourceFileFlagsConstructed = true;
4186
4187 // Process public headers to mark the source files.
4188 if (cmValue files = this->GetProperty("PUBLIC_HEADER")) {
4189 cmList relFiles{ *files };
4190 for (auto const& relFile : relFiles) {
4191 if (cmSourceFile* sf = this->Makefile->GetSource(relFile)) {
4192 SourceFileFlags& flags = this->SourceFlagsMap[sf];
4193 flags.MacFolder = "Headers";
4194 flags.Type = cmGeneratorTarget::SourceFileTypePublicHeader;
4195 }
4196 }
4197 }
4198
4199 // Process private headers after public headers so that they take
4200 // precedence if a file is listed in both.
4201 if (cmValue files = this->GetProperty("PRIVATE_HEADER")) {
4202 cmList relFiles{ *files };
4203 for (auto const& relFile : relFiles) {
4204 if (cmSourceFile* sf = this->Makefile->GetSource(relFile)) {
4205 SourceFileFlags& flags = this->SourceFlagsMap[sf];
4206 flags.MacFolder = "PrivateHeaders";
4207 flags.Type = cmGeneratorTarget::SourceFileTypePrivateHeader;
4208 }
4209 }
4210 }
4211
4212 // Mark sources listed as resources.
4213 if (cmValue files = this->GetProperty("RESOURCE")) {
4214 cmList relFiles{ *files };
4215 for (auto const& relFile : relFiles) {
4216 if (cmSourceFile* sf = this->Makefile->GetSource(relFile)) {
4217 SourceFileFlags& flags = this->SourceFlagsMap[sf];
4218 flags.MacFolder = "";
4219 if (!this->GlobalGenerator->ShouldStripResourcePath(this->Makefile)) {
4220 flags.MacFolder = "Resources";
4221 }
4222 flags.Type = cmGeneratorTarget::SourceFileTypeResource;
4223 }
4224 }
4225 }
4226}
4227
4228bool cmGeneratorTarget::SetDeviceLink(bool deviceLink)
4229{

Callers 1

Calls 3

GetPropertyMethod · 0.95
GetSourceMethod · 0.80

Tested by

no test coverage detected