mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 14:20:06 -06:00
Merge topic 'Autogen_Config'
bb670d96Autogen: Generators: Remove space3f86032bAutogen: Generators: Rename requiresMocing methodf24e1d37Autogen: Generators: Fix clang-tidy readability-else-after-returnf27c5852Autogen: Initializer: Add old settings file to clean filesd7d2cb48Autogen: Generators: Save the UIC/RCC settings that were actually used721997a7Autogen: Generators: Dedicated generateAll variables for MOC/UIC/RCC9f47d326Autogen: Generators: Save the MOC settings that were actually used597124baAutogen: Generators: Add function to read makefile definitions config aware2b400b24Autogen: Generators: Move moc/uic/rcc executable test to generate methodedf0b8a5Autogen: Generators: Rename GenerateFoo methods to FooGenerate06430919Autogen: Generators: Use FileAbsentOrOlder for UIC testsca179f2aAutogen: Generators: Use FileAbsentOrOlder for MOC tests119791aeAutogen: Generators: Introduce FileAbsentOrOlder function95e4cfc5Autogen: Generators: Simplify (and fix) JoinExts function6c55755bAutogen: Generators: Make class static method a source static function1491ab1cAutogen: Generators: Make class static method a source static function ...
This commit is contained in:
@@ -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",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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);
|
||||
// - 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);
|
||||
|
||||
void Init();
|
||||
// - 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 MocSkipTest(const std::string& absFilename);
|
||||
bool UicSkipTest(const std::string& absFilename);
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user