Sfoglia il codice sorgente

Use cmSourceFile::GetIsGenerated

Sebastian Holtermann 6 anni fa
parent
commit
6d407ae439

+ 1 - 1
Source/cmExtraCodeBlocksGenerator.cxx

@@ -362,7 +362,7 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile(
             // don't add source files from UTILITY target which have the
             // GENERATED property set:
             if (gt->GetType() == cmStateEnums::UTILITY &&
-                s->GetPropertyAsBool("GENERATED")) {
+                s->GetIsGenerated()) {
               continue;
             }
 

+ 1 - 1
Source/cmExtraKateGenerator.cxx

@@ -256,7 +256,7 @@ std::string cmExtraKateGenerator::GenerateFilesString(
 
     const std::vector<cmSourceFile*>& sources = makefile->GetSourceFiles();
     for (cmSourceFile* sf : sources) {
-      if (sf->GetPropertyAsBool("GENERATED")) {
+      if (sf->GetIsGenerated()) {
         continue;
       }
 

+ 1 - 1
Source/cmFileAPICodemodel.cxx

@@ -882,7 +882,7 @@ Json::Value Target::DumpSource(cmGeneratorTarget::SourceAndKind const& sk,
 
   std::string const path = sk.Source.Value->GetFullPath();
   source["path"] = RelativeIfUnder(this->TopSource, path);
-  if (sk.Source.Value->GetPropertyAsBool("GENERATED")) {
+  if (sk.Source.Value->GetIsGenerated()) {
     source["isGenerated"] = true;
   }
   this->AddBacktrace(source, sk.Source.Backtrace);

+ 1 - 1
Source/cmGlobalXCodeGenerator.cxx

@@ -2460,7 +2460,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget(
     this->AddXCodeProjBuildRule(gtgt, sources);
 
     for (auto sourceFile : sources) {
-      if (!sourceFile->GetPropertyAsBool("GENERATED")) {
+      if (!sourceFile->GetIsGenerated()) {
         this->CreateXCodeFileReference(sourceFile, gtgt);
       }
     }

+ 1 - 1
Source/cmJsonObjects.cxx

@@ -323,7 +323,7 @@ static Json::Value DumpSourceFilesList(
       fileData.SetDefines(defines);
     }
 
-    fileData.IsGenerated = file->GetPropertyAsBool("GENERATED");
+    fileData.IsGenerated = file->GetIsGenerated();
     std::vector<std::string>& groupFileList = fileGroups[fileData];
     groupFileList.push_back(file->GetFullPath());
   }

+ 1 - 1
Source/cmNinjaTargetGenerator.cxx

@@ -1000,7 +1000,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
   // (either attached to this source file or another one), assume that one of
   // the target dependencies, OBJECT_DEPENDS or header file custom commands
   // will rebuild the file.
-  if (source->GetPropertyAsBool("GENERATED") &&
+  if (source->GetIsGenerated() &&
       !source->GetPropertyAsBool("__CMAKE_GENERATED_BY_CMAKE") &&
       !source->GetCustomCommand() &&
       !this->GetGlobalGenerator()->HasCustomCommandOutput(sourceFileName)) {

+ 1 - 1
Source/cmQTWrapCPPCommand.cxx

@@ -50,7 +50,7 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& args,
       if (cmSystemTools::FileIsFullPath(*j)) {
         hname = *j;
       } else {
-        if (curr && curr->GetPropertyAsBool("GENERATED")) {
+        if (curr && curr->GetIsGenerated()) {
           hname = this->Makefile->GetCurrentBinaryDirectory();
         } else {
           hname = this->Makefile->GetCurrentSourceDirectory();

+ 1 - 1
Source/cmQTWrapUICommand.cxx

@@ -58,7 +58,7 @@ bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& args,
       if (cmSystemTools::FileIsFullPath(*j)) {
         uiName = *j;
       } else {
-        if (curr && curr->GetPropertyAsBool("GENERATED")) {
+        if (curr && curr->GetIsGenerated()) {
           uiName = this->Makefile->GetCurrentBinaryDirectory();
         } else {
           uiName = this->Makefile->GetCurrentSourceDirectory();

+ 2 - 2
Source/cmQtAutoGenInitializer.cxx

@@ -686,7 +686,7 @@ bool cmQtAutoGenInitializer::InitScanFiles()
           if ((this->Moc.Enabled && !sf->GetPropertyAsBool("SKIP_AUTOMOC")) ||
               (this->Uic.Enabled && !sf->GetPropertyAsBool("SKIP_AUTOUIC"))) {
             // Register source
-            const bool generated = sf->GetPropertyAsBool("GENERATED");
+            const bool generated = sf->GetIsGenerated();
             if (fileType == cmSystemTools::HEADER_FILE_FORMAT) {
               if (generated) {
                 this->AutogenTarget.HeadersGenerated.push_back(absPath);
@@ -712,7 +712,7 @@ bool cmQtAutoGenInitializer::InitScanFiles()
           qrc.QrcFile = cmSystemTools::GetRealPath(fPath);
           qrc.QrcName =
             cmSystemTools::GetFilenameWithoutLastExtension(qrc.QrcFile);
-          qrc.Generated = sf->GetPropertyAsBool("GENERATED");
+          qrc.Generated = sf->GetIsGenerated();
           // RCC options
           {
             std::string const opts = sf->GetSafeProperty("AUTORCC_OPTIONS");

+ 1 - 1
Source/cmSourceFile.cxx

@@ -119,7 +119,7 @@ bool cmSourceFile::FindFullPath(std::string* error)
 
   // If the file is generated compute the location without checking on
   // disk.
-  if (this->GetPropertyAsBool(propGENERATED)) {
+  if (this->GetIsGenerated()) {
     // The file is either already a full path or is relative to the
     // build directory for the target.
     this->Location.DirectoryUseBinary();