Commit 6d407ae4 authored by Sebastian Holtermann's avatar Sebastian Holtermann
Browse files

Use cmSourceFile::GetIsGenerated

parent 2ddf3f44
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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);
}
}
......
......@@ -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());
}
......
......@@ -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)) {
......
......@@ -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();
......
......@@ -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();
......
......@@ -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");
......
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment