mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 06:09:14 -05:00
Use cmSourceFile::GetIsGenerated
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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)) {
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
@@ -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");
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user