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
c6a80028

 Autogen: Improve error detection during configuration
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
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;
assert(this->IsImported());
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) {
autoGen->InitCustomTargets();
if (!autoGen->InitCustomTargets()) {
return false;
}
}
#endif
......@@ -1341,7 +1343,9 @@ bool cmGlobalGenerator::Compute()
#ifdef CMAKE_BUILD_WITH_CMAKE
for (auto& autoGen : autogenInits) {
autoGen->SetupCustomTargets();
if (!autoGen->SetupCustomTargets()) {
return false;
}
autoGen.reset(nullptr);
}
autogenInits.clear();
......
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();
private:
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);
private:
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;
struct
{
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;
struct
{
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;
struct
{
bool Enabled;
std::string Executable;
std::vector<std::string> ListOptions;
std::vector<Qrc> Qrcs;
} Rcc;
};
#endif
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