Use cmSourceFile::GetIsGenerated

This commit is contained in:
Sebastian Holtermann
2019-02-01 16:40:25 +01:00
parent 2ddf3f4467
commit 6d407ae439
10 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -362,7 +362,7 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile(
// don't add source files from UTILITY target which have the // don't add source files from UTILITY target which have the
// GENERATED property set: // GENERATED property set:
if (gt->GetType() == cmStateEnums::UTILITY && if (gt->GetType() == cmStateEnums::UTILITY &&
s->GetPropertyAsBool("GENERATED")) { s->GetIsGenerated()) {
continue; continue;
} }
+1 -1
View File
@@ -256,7 +256,7 @@ std::string cmExtraKateGenerator::GenerateFilesString(
const std::vector<cmSourceFile*>& sources = makefile->GetSourceFiles(); const std::vector<cmSourceFile*>& sources = makefile->GetSourceFiles();
for (cmSourceFile* sf : sources) { for (cmSourceFile* sf : sources) {
if (sf->GetPropertyAsBool("GENERATED")) { if (sf->GetIsGenerated()) {
continue; continue;
} }
+1 -1
View File
@@ -882,7 +882,7 @@ Json::Value Target::DumpSource(cmGeneratorTarget::SourceAndKind const& sk,
std::string const path = sk.Source.Value->GetFullPath(); std::string const path = sk.Source.Value->GetFullPath();
source["path"] = RelativeIfUnder(this->TopSource, path); source["path"] = RelativeIfUnder(this->TopSource, path);
if (sk.Source.Value->GetPropertyAsBool("GENERATED")) { if (sk.Source.Value->GetIsGenerated()) {
source["isGenerated"] = true; source["isGenerated"] = true;
} }
this->AddBacktrace(source, sk.Source.Backtrace); this->AddBacktrace(source, sk.Source.Backtrace);
+1 -1
View File
@@ -2460,7 +2460,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget(
this->AddXCodeProjBuildRule(gtgt, sources); this->AddXCodeProjBuildRule(gtgt, sources);
for (auto sourceFile : sources) { for (auto sourceFile : sources) {
if (!sourceFile->GetPropertyAsBool("GENERATED")) { if (!sourceFile->GetIsGenerated()) {
this->CreateXCodeFileReference(sourceFile, gtgt); this->CreateXCodeFileReference(sourceFile, gtgt);
} }
} }
+1 -1
View File
@@ -323,7 +323,7 @@ static Json::Value DumpSourceFilesList(
fileData.SetDefines(defines); fileData.SetDefines(defines);
} }
fileData.IsGenerated = file->GetPropertyAsBool("GENERATED"); fileData.IsGenerated = file->GetIsGenerated();
std::vector<std::string>& groupFileList = fileGroups[fileData]; std::vector<std::string>& groupFileList = fileGroups[fileData];
groupFileList.push_back(file->GetFullPath()); groupFileList.push_back(file->GetFullPath());
} }
+1 -1
View File
@@ -1000,7 +1000,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
// (either attached to this source file or another one), assume that one of // (either attached to this source file or another one), assume that one of
// the target dependencies, OBJECT_DEPENDS or header file custom commands // the target dependencies, OBJECT_DEPENDS or header file custom commands
// will rebuild the file. // will rebuild the file.
if (source->GetPropertyAsBool("GENERATED") && if (source->GetIsGenerated() &&
!source->GetPropertyAsBool("__CMAKE_GENERATED_BY_CMAKE") && !source->GetPropertyAsBool("__CMAKE_GENERATED_BY_CMAKE") &&
!source->GetCustomCommand() && !source->GetCustomCommand() &&
!this->GetGlobalGenerator()->HasCustomCommandOutput(sourceFileName)) { !this->GetGlobalGenerator()->HasCustomCommandOutput(sourceFileName)) {
+1 -1
View File
@@ -50,7 +50,7 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& args,
if (cmSystemTools::FileIsFullPath(*j)) { if (cmSystemTools::FileIsFullPath(*j)) {
hname = *j; hname = *j;
} else { } else {
if (curr && curr->GetPropertyAsBool("GENERATED")) { if (curr && curr->GetIsGenerated()) {
hname = this->Makefile->GetCurrentBinaryDirectory(); hname = this->Makefile->GetCurrentBinaryDirectory();
} else { } else {
hname = this->Makefile->GetCurrentSourceDirectory(); hname = this->Makefile->GetCurrentSourceDirectory();
+1 -1
View File
@@ -58,7 +58,7 @@ bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& args,
if (cmSystemTools::FileIsFullPath(*j)) { if (cmSystemTools::FileIsFullPath(*j)) {
uiName = *j; uiName = *j;
} else { } else {
if (curr && curr->GetPropertyAsBool("GENERATED")) { if (curr && curr->GetIsGenerated()) {
uiName = this->Makefile->GetCurrentBinaryDirectory(); uiName = this->Makefile->GetCurrentBinaryDirectory();
} else { } else {
uiName = this->Makefile->GetCurrentSourceDirectory(); uiName = this->Makefile->GetCurrentSourceDirectory();
+2 -2
View File
@@ -686,7 +686,7 @@ bool cmQtAutoGenInitializer::InitScanFiles()
if ((this->Moc.Enabled && !sf->GetPropertyAsBool("SKIP_AUTOMOC")) || if ((this->Moc.Enabled && !sf->GetPropertyAsBool("SKIP_AUTOMOC")) ||
(this->Uic.Enabled && !sf->GetPropertyAsBool("SKIP_AUTOUIC"))) { (this->Uic.Enabled && !sf->GetPropertyAsBool("SKIP_AUTOUIC"))) {
// Register source // Register source
const bool generated = sf->GetPropertyAsBool("GENERATED"); const bool generated = sf->GetIsGenerated();
if (fileType == cmSystemTools::HEADER_FILE_FORMAT) { if (fileType == cmSystemTools::HEADER_FILE_FORMAT) {
if (generated) { if (generated) {
this->AutogenTarget.HeadersGenerated.push_back(absPath); this->AutogenTarget.HeadersGenerated.push_back(absPath);
@@ -712,7 +712,7 @@ bool cmQtAutoGenInitializer::InitScanFiles()
qrc.QrcFile = cmSystemTools::GetRealPath(fPath); qrc.QrcFile = cmSystemTools::GetRealPath(fPath);
qrc.QrcName = qrc.QrcName =
cmSystemTools::GetFilenameWithoutLastExtension(qrc.QrcFile); cmSystemTools::GetFilenameWithoutLastExtension(qrc.QrcFile);
qrc.Generated = sf->GetPropertyAsBool("GENERATED"); qrc.Generated = sf->GetIsGenerated();
// RCC options // RCC options
{ {
std::string const opts = sf->GetSafeProperty("AUTORCC_OPTIONS"); std::string const opts = sf->GetSafeProperty("AUTORCC_OPTIONS");
+1 -1
View File
@@ -119,7 +119,7 @@ bool cmSourceFile::FindFullPath(std::string* error)
// If the file is generated compute the location without checking on // If the file is generated compute the location without checking on
// disk. // disk.
if (this->GetPropertyAsBool(propGENERATED)) { if (this->GetIsGenerated()) {
// The file is either already a full path or is relative to the // The file is either already a full path or is relative to the
// build directory for the target. // build directory for the target.
this->Location.DirectoryUseBinary(); this->Location.DirectoryUseBinary();