Commit a67baf0a authored by Brad King's avatar Brad King Committed by Kitware Robot

Merge topic 'Autogen_Config'

bb670d96 Autogen: Generators: Remove space
3f86032b Autogen: Generators: Rename requiresMocing method
f24e1d37 Autogen: Generators: Fix clang-tidy readability-else-after-return
f27c5852 Autogen: Initializer: Add old settings file to clean files
d7d2cb48 Autogen: Generators: Save the UIC/RCC settings that were actually used
721997a7 Autogen: Generators: Dedicated generateAll variables for MOC/UIC/RCC
9f47d326 Autogen: Generators: Save the MOC settings that were actually used
597124ba Autogen: Generators: Add function to read makefile definitions config aware
2b400b24 Autogen: Generators: Move moc/uic/rcc executable test to generate method
edf0b8a5 Autogen: Generators: Rename GenerateFoo methods to FooGenerate
06430919 Autogen: Generators: Use FileAbsentOrOlder for UIC tests
ca179f2a Autogen: Generators: Use FileAbsentOrOlder for MOC tests
119791ae Autogen: Generators: Introduce FileAbsentOrOlder function
95e4cfc5 Autogen: Generators: Simplify (and fix) JoinExts function
6c55755b Autogen: Generators: Make class static method a source static function
1491ab1c Autogen: Generators: Make class static method a source static function
...
parents 9aa2ec77 bb670d96
......@@ -674,6 +674,14 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget(
const std::string qtMajorVersion = GetQtMajorVersion(target);
std::vector<std::string> autogenOutputFiles;
// Remove old settings on cleanup
{
std::string fname = GetAutogenTargetFilesDir(target);
fname += "/AutogenOldSettings.cmake";
makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES", fname.c_str(),
false);
}
// Create autogen target build directory and add it to the clean files
cmSystemTools::MakeDirectory(autogenBuildDir);
makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES",
......
This diff is collapsed.
......@@ -22,32 +22,26 @@ public:
bool Run(const std::string& targetDirectory, const std::string& config);
private:
// - Configuration
bool ReadAutogenInfoFile(cmMakefile* makefile,
const std::string& targetDirectory,
const std::string& config);
void ReadOldMocDefinitionsFile(cmMakefile* makefile,
const std::string& targetDirectory);
bool WriteOldMocDefinitionsFile(const std::string& targetDirectory);
std::string MakeCompileSettingsString(cmMakefile* makefile);
std::string MocSettingsStringCompose();
std::string UicSettingsStringCompose();
std::string RccSettingsStringCompose();
void OldSettingsReadFile(cmMakefile* makefile,
const std::string& targetDirectory);
bool OldSettingsWriteFile(const std::string& targetDirectory);
// - Init and run
void Init();
bool RunAutogen(cmMakefile* makefile);
bool GenerateMocFiles(
const std::map<std::string, std::string>& includedMocs,
const std::map<std::string, std::string>& notIncludedMocs);
bool GenerateMoc(const std::string& sourceFile,
const std::string& mocFileName,
const std::string& subDirPrefix);
bool GenerateUiFiles(
const std::map<std::string, std::vector<std::string> >& includedUis);
bool GenerateUi(const std::string& realName, const std::string& uiInputFile,
const std::string& uiOutputFile);
bool GenerateQrcFiles();
bool GenerateQrc(const std::string& qrcInputFile,
const std::string& qrcOutputFile, bool unique_n);
// - Content analysis
bool MocRequired(const std::string& text, std::string& macroName);
bool MocSkipTest(const std::string& absFilename);
bool UicSkipTest(const std::string& absFilename);
bool ParseSourceFile(
const std::string& absFilename,
......@@ -55,6 +49,7 @@ private:
std::map<std::string, std::string>& includedMocs,
std::map<std::string, std::vector<std::string> >& includedUis,
bool relaxed);
void SearchHeadersForSourceFile(
const std::string& absFilename,
const std::vector<std::string>& headerExtensions,
......@@ -68,8 +63,6 @@ private:
std::map<std::string, std::string>& notIncludedMocs,
std::map<std::string, std::vector<std::string> >& includedUis);
bool requiresMocing(const std::string& text, std::string& macroName);
void ParseContentForUic(
const std::string& fileName, const std::string& contentsString,
std::map<std::string, std::vector<std::string> >& includedUis);
......@@ -80,18 +73,27 @@ private:
std::map<std::string, std::string>& includedMocs,
bool relaxed);
void ParseForUic(
const std::string& fileName,
std::map<std::string, std::vector<std::string> >& includedUis);
void Init();
// - Moc file generation
bool MocGenerateAll(
const std::map<std::string, std::string>& includedMocs,
const std::map<std::string, std::string>& notIncludedMocs);
bool MocGenerateFile(const std::string& sourceFile,
const std::string& mocFileName,
const std::string& subDirPrefix);
bool MocSkipTest(const std::string& absFilename);
bool UicSkipTest(const std::string& absFilename);
// - Uic file generation
bool UicGenerateAll(
const std::map<std::string, std::vector<std::string> >& includedUis);
bool UicGenerateFile(const std::string& realName,
const std::string& uiInputFile,
const std::string& uiOutputFile);
bool NameCollisionTest(const std::map<std::string, std::string>& genFiles,
std::multimap<std::string, std::string>& collisions);
// - Qrc file generation
bool QrcGenerateAll();
bool QrcGenerateFile(const std::string& qrcInputFile,
const std::string& qrcOutputFile, bool unique_n);
// - Logging
void LogErrorNameCollision(
const std::string& message,
const std::multimap<std::string, std::string>& collisions);
......@@ -101,17 +103,11 @@ private:
void LogError(const std::string& message);
void LogCommand(const std::vector<std::string>& command);
// - Utility
bool NameCollisionTest(const std::map<std::string, std::string>& genFiles,
std::multimap<std::string, std::string>& collisions);
bool MakeParentDirectory(const std::string& filename);
std::string JoinExts(const std::vector<std::string>& lst);
static void MergeUicOptions(std::vector<std::string>& opts,
const std::vector<std::string>& fileOpts,
bool isQt5);
bool InputFilesNewerThanQrc(const std::string& qrcFile,
const std::string& rccOutput);
// - Target names
std::string OriginTargetName;
std::string AutogenTargetName;
......@@ -139,17 +135,17 @@ private:
std::list<std::string> MocIncludes;
std::list<std::string> MocDefinitions;
std::vector<std::string> MocOptions;
std::string MocSettingsString;
// - Uic
std::vector<std::string> SkipUic;
std::vector<std::string> UicTargetOptions;
std::map<std::string, std::string> UicOptions;
std::string UicSettingsString;
// - Rcc
std::vector<std::string> RccSources;
std::map<std::string, std::string> RccOptions;
std::map<std::string, std::vector<std::string> > RccInputs;
// - Settings
std::string CurrentCompileSettingsStr;
std::string OldCompileSettingsStr;
std::string RccSettingsString;
// - Utility
cmFilePathChecksum fpathCheckSum;
cmsys::RegularExpression RegExpQObject;
......@@ -163,7 +159,9 @@ private:
bool RunMocFailed;
bool RunUicFailed;
bool RunRccFailed;
bool GenerateAll;
bool GenerateMocAll;
bool GenerateUicAll;
bool GenerateRccAll;
bool MocRelaxedMode;
};
......
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