Commit 102f51d0 authored by Brad King's avatar Brad King 💬 Committed by Kitware Robot
Browse files

Merge topic 'autogen_forward_errors'

86b332c2 Return std::string from cmGeneratorTarget::ImportedGetLocation
189f7235 Autogen: Wrap moc/uic/rcc related variables in structs

 Autogen: Improve error detection during configuration
Acked-by: Kitware Robot's avatarKitware Robot <>
Merge-request: !2207
parents f691dbc4 86b332c2
Pipeline #109420 failed with stage
in 0 seconds
......@@ -3358,14 +3358,12 @@ std::string cmGeneratorTarget::GetFullNameInternal(
return prefix + base + suffix;
const char* cmGeneratorTarget::ImportedGetLocation(
std::string cmGeneratorTarget::ImportedGetLocation(
const std::string& config) const
static std::string location;
location = this->Target->ImportedGetFullPath(
return this->Target->ImportedGetFullPath(
config, cmStateEnums::RuntimeBinaryArtifact);
return location.c_str();
std::string cmGeneratorTarget::GetFullNameImported(
......@@ -658,7 +658,7 @@ public:
no soname at all. */
bool IsImportedSharedLibWithoutSOName(const std::string& config) const;
const char* ImportedGetLocation(const std::string& config) const;
std::string ImportedGetLocation(const std::string& config) const;
/** Get the target major and minor version numbers interpreted from
the VERSION property. Version 0 is returned if the property is
......@@ -1318,7 +1318,9 @@ bool cmGlobalGenerator::Compute()
// the AUTOMOC, AUTOUIC or AUTORCC property set
auto autogenInits = this->CreateQtAutoGenInitializers();
for (auto& autoGen : autogenInits) {
if (!autoGen->InitCustomTargets()) {
return false;
......@@ -1341,7 +1343,9 @@ bool cmGlobalGenerator::Compute()
for (auto& autoGen : autogenInits) {
if (!autoGen->SetupCustomTargets()) {
return false;
This diff is collapsed.
......@@ -50,35 +50,32 @@ public:
bool uicEnabled, bool rccEnabled,
std::string const& qtVersionMajor);
void InitCustomTargets();
void SetupCustomTargets();
bool InitCustomTargets();
bool SetupCustomTargets();
void SetupCustomTargetsMoc();
void SetupCustomTargetsUic();
bool SetupCustomTargetsMoc();
bool SetupCustomTargetsUic();
void AddGeneratedSource(std::string const& filename, GeneratorT genType);
bool QtVersionGreaterOrEqual(unsigned long requestMajor,
unsigned long requestMinor) const;
bool GetMocExecutable();
bool GetUicExecutable();
bool GetRccExecutable();
bool RccListInputs(std::string const& fileName,
std::vector<std::string>& files,
std::string& errorMessage);
cmGeneratorTarget* Target;
bool MocEnabled;
bool UicEnabled;
bool RccEnabled;
bool MultiConfig;
// Qt
std::string QtVersionMajor;
std::string QtVersionMinor;
std::string MocExecutable;
std::string UicExecutable;
std::string RccExecutable;
std::vector<std::string> RccListOptions;
// Configurations
std::string ConfigDefault;
std::vector<std::string> ConfigsList;
......@@ -97,21 +94,37 @@ private:
std::vector<std::string> Headers;
std::vector<std::string> Sources;
// Moc
std::string MocPredefsCmd;
std::set<std::string> MocSkip;
std::string MocIncludes;
std::map<std::string, std::string> MocIncludesConfig;
std::string MocDefines;
std::map<std::string, std::string> MocDefinesConfig;
bool Enabled;
std::string Executable;
std::string PredefsCmd;
std::set<std::string> Skip;
std::string Includes;
std::map<std::string, std::string> ConfigIncludes;
std::string Defines;
std::map<std::string, std::string> ConfigDefines;
} Moc;
// Uic
std::set<std::string> UicSkip;
std::vector<std::string> UicSearchPaths;
std::string UicOptions;
std::map<std::string, std::string> UicOptionsConfig;
std::vector<std::string> UicFileFiles;
std::vector<std::vector<std::string>> UicFileOptions;
bool Enabled;
std::string Executable;
std::set<std::string> Skip;
std::vector<std::string> SearchPaths;
std::string Options;
std::map<std::string, std::string> ConfigOptions;
std::vector<std::string> FileFiles;
std::vector<std::vector<std::string>> FileOptions;
} Uic;
// Rcc
std::vector<Qrc> Qrcs;
bool Enabled;
std::string Executable;
std::vector<std::string> ListOptions;
std::vector<Qrc> Qrcs;
} Rcc;
Supports Markdown
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