Commit 213ecf05 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'autogen-improve-multi-config'

a8ee7406

 Autogen: Improved multi-config include scheme
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !1735
parents e559b45f a8ee7406
# Meta
set(ARCC_MULTI_CONFIG @_multi_config@)
# Directories and files
set(ARCC_BUILD_DIR @_build_dir@)
# Qt environment
set(ARCC_RCC_EXECUTABLE @_qt_rcc_executable@)
set(ARCC_RCC_LIST_OPTIONS @_qt_rcc_list_options@)
# Meta
set(AM_MULTI_CONFIG @_multi_config@)
set(AM_PARALLEL @_parallel@)
# Directories and files
set(AM_CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@/")
set(AM_CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@/")
set(AM_CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@/")
set(AM_CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@/")
set(AM_CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE "@CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE@")
set(AM_BUILD_DIR @_build_dir@)
set(AM_SOURCES @_sources@)
set(AM_HEADERS @_headers@)
set(AM_SETTINGS_FILE @_settings_file@)
# Qt environment
set(AM_QT_VERSION_MAJOR @_qt_version_major@)
set(AM_QT_MOC_EXECUTABLE @_qt_moc_executable@)
set(AM_QT_UIC_EXECUTABLE @_qt_uic_executable@)
# MOC settings
set(AM_MOC_SKIP @_moc_skip@)
set(AM_MOC_DEFINITIONS @_moc_compile_defs@)
set(AM_MOC_INCLUDES @_moc_include_dirs@)
set(AM_MOC_OPTIONS @_moc_options@)
set(AM_MOC_RELAXED_MODE @_moc_relaxed_mode@)
set(AM_MOC_MACRO_NAMES @_moc_macro_names@)
set(AM_MOC_DEPEND_FILTERS @_moc_depend_filters@)
set(AM_MOC_PREDEFS_CMD @_moc_predefs_cmd@)
# UIC settings
set(AM_UIC_SKIP @_uic_skip@)
set(AM_UIC_TARGET_OPTIONS @_uic_target_options@)
set(AM_UIC_OPTIONS_FILES @_qt_uic_options_files@)
set(AM_UIC_OPTIONS_OPTIONS @_qt_uic_options_options@)
set(AM_UIC_SEARCH_PATHS @_uic_search_paths@)
......@@ -17,10 +17,6 @@ std::string const genNameMoc = "AutoMoc";
std::string const genNameUic = "AutoUic";
std::string const genNameRcc = "AutoRcc";
std::string const mcNameSingle = "SINGLE";
std::string const mcNameWrapper = "WRAPPER";
std::string const mcNameMulti = "MULTI";
// - Static functions
/// @brief Merges newOpts into baseOpts
......@@ -102,30 +98,6 @@ std::string cmQtAutoGen::GeneratorNameUpper(GeneratorT genType)
return cmSystemTools::UpperCase(cmQtAutoGen::GeneratorName(genType));
}
std::string const& cmQtAutoGen::MultiConfigName(MultiConfigT config)
{
switch (config) {
case MultiConfigT::SINGLE:
return mcNameSingle;
case MultiConfigT::WRAPPER:
return mcNameWrapper;
case MultiConfigT::MULTI:
return mcNameMulti;
}
return mcNameWrapper;
}
cmQtAutoGen::MultiConfigT cmQtAutoGen::MultiConfigType(std::string const& name)
{
if (name == mcNameSingle) {
return MultiConfigT::SINGLE;
}
if (name == mcNameMulti) {
return MultiConfigT::MULTI;
}
return MultiConfigT::WRAPPER;
}
std::string cmQtAutoGen::Quoted(std::string const& text)
{
static const char* rep[18] = { "\\", "\\\\", "\"", "\\\"", "\a", "\\a",
......
......@@ -28,25 +28,12 @@ public:
RCC
};
/// @brief Multiconfiguration type
enum class MultiConfigT
{
SINGLE, // Single configuration
WRAPPER, // Multi configuration using wrapper files
MULTI // Multi configuration using per config sources
};
public:
/// @brief Returns the generator name
static std::string const& GeneratorName(GeneratorT genType);
/// @brief Returns the generator name in upper case
static std::string GeneratorNameUpper(GeneratorT genType);
/// @brief Returns the multi configuration name string
static std::string const& MultiConfigName(MultiConfigT config);
/// @brief Returns the multi configuration type
static MultiConfigT MultiConfigType(std::string const& name);
/// @brief Returns a the string escaped and enclosed in quotes
static std::string Quoted(std::string const& text);
......
This diff is collapsed.
......@@ -21,6 +21,7 @@ public:
static std::string GetQtMinorVersion(cmGeneratorTarget const* target,
std::string const& qtVersionMajor);
/// @brief Rcc job information
class Qrc
{
public:
......@@ -55,8 +56,7 @@ private:
void SetupCustomTargetsMoc();
void SetupCustomTargetsUic();
std::vector<std::string> AddGeneratedSource(std::string const& filename,
GeneratorT genType);
void AddGeneratedSource(std::string const& filename, GeneratorT genType);
bool QtVersionGreaterOrEqual(unsigned long requestMajor,
unsigned long requestMinor) const;
......@@ -70,15 +70,18 @@ private:
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;
MultiConfigT MultiConfig;
std::string Parallel;
// Names
std::string AutogenTargetName;
std::string AutogenFolder;
......@@ -91,11 +94,21 @@ private:
// Sources
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;
// Uic
std::set<std::string> UicSkip;
std::map<std::string, std::string> ConfigMocIncludes;
std::map<std::string, std::string> ConfigMocDefines;
std::map<std::string, std::string> ConfigUicOptions;
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;
// Rcc
std::vector<Qrc> Qrcs;
};
......
......@@ -672,19 +672,24 @@ void cmQtAutoGeneratorMocUic::JobMocT::Process(WorkerT& wrk)
{
// Compute build file name
if (!IncludeString.empty()) {
BuildFile = wrk.Base().AutogenIncludeDirAbs;
BuildFile = wrk.Base().AutogenIncludeDir;
BuildFile += '/';
BuildFile += IncludeString;
} else {
std::string buildRel = wrk.Base().FilePathChecksum.getPart(SourceFile);
buildRel += '/';
buildRel += "moc_";
buildRel += cmSystemTools::GetFilenameWithoutLastExtension(SourceFile);
if (wrk.Base().MultiConfig != MultiConfigT::SINGLE) {
buildRel += wrk.Base().ConfigSuffix;
std::string rel = wrk.Base().FilePathChecksum.getPart(SourceFile);
rel += "/moc_";
rel += cmSystemTools::GetFilenameWithoutLastExtension(SourceFile);
rel += ".cpp";
// Register relative file path
wrk.Gen().ParallelMocAutoRegister(rel);
// Absolute build path
if (wrk.Base().MultiConfig) {
BuildFile = wrk.Base().AutogenIncludeDir;
BuildFile += '/';
BuildFile += rel;
} else {
BuildFile = wrk.Base().AbsoluteBuildPath(rel);
}
buildRel += ".cpp";
wrk.Gen().ParallelMocAutoRegister(buildRel);
BuildFile = wrk.Base().AbsoluteBuildPath(buildRel);
}
if (UpdateRequired(wrk)) {
......@@ -871,7 +876,8 @@ void cmQtAutoGeneratorMocUic::JobMocT::GenerateMoc(WorkerT& wrk)
void cmQtAutoGeneratorMocUic::JobUicT::Process(WorkerT& wrk)
{
// Compute build file name
BuildFile = wrk.Base().AutogenIncludeDirAbs;
BuildFile = wrk.Base().AutogenIncludeDir;
BuildFile += '/';
BuildFile += IncludeString;
if (UpdateRequired(wrk)) {
......@@ -1208,20 +1214,7 @@ bool cmQtAutoGeneratorMocUic::Init(cmMakefile* makefile)
}
// -- Meta
Base_.MultiConfig = MultiConfigType(InfoGet("AM_MULTI_CONFIG"));
Base_.ConfigSuffix = InfoGetConfig("AM_CONFIG_SUFFIX");
if (Base_.ConfigSuffix.empty()) {
Base_.ConfigSuffix = "_";
Base_.ConfigSuffix += InfoConfig();
}
SettingsFile_ = InfoGetConfig("AM_SETTINGS_FILE");
if (SettingsFile_.empty()) {
Log().ErrorFile(GeneratorT::GEN, InfoFile(), "Settings file name missing");
return false;
}
Base_.MultiConfig = InfoGetBool("AM_MULTI_CONFIG");
{
unsigned long num = Base_.NumThreads;
if (cmSystemTools::StringToULong(InfoGet("AM_PARALLEL"), &num)) {
......@@ -1244,6 +1237,23 @@ bool cmQtAutoGeneratorMocUic::Init(cmMakefile* makefile)
"Autogen build directory missing");
return false;
}
// include directory
{
std::string dirRel = InfoGetConfig("AM_INCLUDE_DIR");
if (dirRel.empty()) {
Log().ErrorFile(GeneratorT::GEN, InfoFile(),
"Autogen include directory missing");
return false;
}
Base_.AutogenIncludeDir = Base_.AbsoluteBuildPath(dirRel);
}
// - Files
SettingsFile_ = InfoGetConfig("AM_SETTINGS_FILE");
if (SettingsFile_.empty()) {
Log().ErrorFile(GeneratorT::GEN, InfoFile(), "Settings file name missing");
return false;
}
// - Qt environment
{
......@@ -1438,30 +1448,17 @@ bool cmQtAutoGeneratorMocUic::Init(cmMakefile* makefile)
Base().CurrentSourceDir, Base().CurrentBinaryDir, Base().ProjectSourceDir,
Base().ProjectBinaryDir);
// include directory
Base_.AutogenIncludeDirRel = "include";
if (Base().MultiConfig != MultiConfigT::SINGLE) {
Base_.AutogenIncludeDirRel += Base().ConfigSuffix;
}
Base_.AutogenIncludeDirRel += "/";
Base_.AutogenIncludeDirAbs =
Base_.AbsoluteBuildPath(Base().AutogenIncludeDirRel);
// Moc variables
if (Moc().Enabled) {
// Mocs compilation file
Moc_.CompFileRel = "mocs_compilation";
if (Base_.MultiConfig == MultiConfigT::MULTI) {
Moc_.CompFileRel += Base().ConfigSuffix;
}
Moc_.CompFileRel += ".cpp";
Moc_.CompFileAbs = Base_.AbsoluteBuildPath(Moc().CompFileRel);
Moc_.CompFileAbs = Base().AbsoluteBuildPath("mocs_compilation.cpp");
// Moc predefs file
if (!Moc_.PredefsCmd.empty()) {
Moc_.PredefsFileRel = "moc_predefs";
if (Base_.MultiConfig != MultiConfigT::SINGLE) {
Moc_.PredefsFileRel += Base().ConfigSuffix;
if (Base_.MultiConfig) {
Moc_.PredefsFileRel += '_';
Moc_.PredefsFileRel += InfoConfig();
}
Moc_.PredefsFileRel += ".h";
Moc_.PredefsFileAbs = Base_.AbsoluteBuildPath(Moc().PredefsFileRel);
......@@ -1731,7 +1728,7 @@ void cmQtAutoGeneratorMocUic::SettingsFileWrite()
void cmQtAutoGeneratorMocUic::CreateDirectories()
{
// Create AUTOGEN include directory
if (!FileSys().MakeDirectory(GeneratorT::GEN, Base().AutogenIncludeDirAbs)) {
if (!FileSys().MakeDirectory(GeneratorT::GEN, Base().AutogenIncludeDir)) {
RegisterJobError();
}
}
......@@ -1980,9 +1977,10 @@ void cmQtAutoGeneratorMocUic::ParallelMocAutoUpdated()
void cmQtAutoGeneratorMocUic::MocGenerateCompilation()
{
std::lock_guard<std::mutex> mocLock(JobsMutex_);
if (!JobThreadsAbort_ && Moc().Enabled) {
// Compose mocs compilation file content
if (!JobError_ && Moc().Enabled) {
// Write mocs compilation build file
{
// Compose mocs compilation file content
std::string content =
"// This file is autogenerated. Changes will be overwritten.\n";
if (MocAutoFiles_.empty()) {
......@@ -1992,19 +1990,22 @@ void cmQtAutoGeneratorMocUic::MocGenerateCompilation()
content += "enum some_compilers { need_more_than_nothing };\n";
} else {
// Valid content
char const sbeg = Base().MultiConfig ? '<' : '"';
char const send = Base().MultiConfig ? '>' : '"';
for (std::string const& mocfile : MocAutoFiles_) {
content += "#include \"";
content += "#include ";
content += sbeg;
content += mocfile;
content += "\"\n";
content += send;
content += '\n';
}
}
std::string const& compRel = Moc().CompFileRel;
std::string const& compAbs = Moc().CompFileAbs;
if (FileSys().FileDiffers(compAbs, content)) {
// Actually write mocs compilation file
if (Log().Verbose()) {
Log().Info(GeneratorT::MOC, "Generating MOC compilation " + compRel);
Log().Info(GeneratorT::MOC, "Generating MOC compilation " + compAbs);
}
if (!FileSys().FileWrite(GeneratorT::MOC, compAbs, content)) {
Log().ErrorFile(GeneratorT::MOC, compAbs,
......@@ -2015,10 +2016,13 @@ void cmQtAutoGeneratorMocUic::MocGenerateCompilation()
} else if (MocAutoFileUpdated_) {
// Only touch mocs compilation file
if (Log().Verbose()) {
Log().Info(GeneratorT::MOC, "Touching mocs compilation " + compRel);
Log().Info(GeneratorT::MOC, "Touching mocs compilation " + compAbs);
}
FileSys().Touch(compAbs);
}
}
// Write mocs compilation wrapper file
if (Base().MultiConfig) {
}
}
}
......@@ -68,7 +68,7 @@ public:
public:
// -- Volatile methods
BaseSettingsT(FileSystem* fileSystem)
: MultiConfig(MultiConfigT::WRAPPER)
: MultiConfig(false)
, IncludeProjectDirsBefore(false)
, QtVersionMajor(4)
, NumThreads(1)
......@@ -83,8 +83,7 @@ public:
// -- Attributes
// - Config
std::string ConfigSuffix;
MultiConfigT MultiConfig;
bool MultiConfig;
bool IncludeProjectDirsBefore;
unsigned int QtVersionMajor;
unsigned int NumThreads;
......@@ -94,8 +93,7 @@ public:
std::string CurrentSourceDir;
std::string CurrentBinaryDir;
std::string AutogenBuildDir;
std::string AutogenIncludeDirRel;
std::string AutogenIncludeDirAbs;
std::string AutogenIncludeDir;
// - Files
cmFilePathChecksum FilePathChecksum;
std::vector<std::string> HeaderExtensions;
......@@ -128,7 +126,6 @@ public:
bool SettingsChanged = false;
bool RelaxedMode = false;
std::string Executable;
std::string CompFileRel;
std::string CompFileAbs;
std::string PredefsFileRel;
std::string PredefsFileAbs;
......
......@@ -14,8 +14,8 @@
// -- Class methods
cmQtAutoGeneratorRcc::cmQtAutoGeneratorRcc()
: SettingsChanged_(false)
, MultiConfig_(MultiConfigT::WRAPPER)
: MultiConfig_(false)
, SettingsChanged_(false)
, Stage_(StageT::SETTINGS_READ)
, Error_(false)
, Generate_(false)
......@@ -31,16 +31,18 @@ cmQtAutoGeneratorRcc::~cmQtAutoGeneratorRcc()
bool cmQtAutoGeneratorRcc::Init(cmMakefile* makefile)
{
// Utility lambdas
auto InfoGet = [makefile](const char* key) {
// -- Utility lambdas
auto InfoGet = [makefile](std::string const& key) {
return makefile->GetSafeDefinition(key);
};
auto InfoGetList = [makefile](const char* key) -> std::vector<std::string> {
auto InfoGetList =
[makefile](std::string const& key) -> std::vector<std::string> {
std::vector<std::string> list;
cmSystemTools::ExpandListArgument(makefile->GetSafeDefinition(key), list);
return list;
};
auto InfoGetConfig = [makefile, this](const char* key) -> std::string {
auto InfoGetConfig = [makefile,
this](std::string const& key) -> std::string {
const char* valueConf = nullptr;
{
std::string keyConf = key;
......@@ -54,7 +56,7 @@ bool cmQtAutoGeneratorRcc::Init(cmMakefile* makefile)
return std::string(valueConf);
};
auto InfoGetConfigList =
[&InfoGetConfig](const char* key) -> std::vector<std::string> {
[&InfoGetConfig](std::string const& key) -> std::vector<std::string> {
std::vector<std::string> list;
cmSystemTools::ExpandListArgument(InfoGetConfig(key), list);
return list;
......@@ -66,20 +68,23 @@ bool cmQtAutoGeneratorRcc::Init(cmMakefile* makefile)
return false;
}
// -- Meta
MultiConfig_ = MultiConfigType(InfoGet("ARCC_MULTI_CONFIG"));
ConfigSuffix_ = InfoGetConfig("ARCC_CONFIG_SUFFIX");
if (ConfigSuffix_.empty()) {
ConfigSuffix_ = "_";
ConfigSuffix_ += InfoConfig();
}
SettingsFile_ = InfoGetConfig("ARCC_SETTINGS_FILE");
// - Configurations
MultiConfig_ = makefile->IsOn("ARCC_MULTI_CONFIG");
// - Files and directories
// - Directories
AutogenBuildDir_ = InfoGet("ARCC_BUILD_DIR");
if (AutogenBuildDir_.empty()) {
Log().ErrorFile(GeneratorT::RCC, InfoFile(), "Build directory empty");
return false;
}
// - Qt environment
IncludeDir_ = InfoGetConfig("ARCC_INCLUDE_DIR");
if (IncludeDir_.empty()) {
Log().ErrorFile(GeneratorT::RCC, InfoFile(), "Include directory empty");
return false;
}
// - Rcc executable
RccExecutable_ = InfoGet("ARCC_RCC_EXECUTABLE");
RccListOptions_ = InfoGetList("ARCC_RCC_LIST_OPTIONS");
......@@ -87,10 +92,14 @@ bool cmQtAutoGeneratorRcc::Init(cmMakefile* makefile)
QrcFile_ = InfoGet("ARCC_SOURCE");
QrcFileName_ = cmSystemTools::GetFilenameName(QrcFile_);
QrcFileDir_ = cmSystemTools::GetFilenamePath(QrcFile_);
RccFile_ = InfoGet("ARCC_OUTPUT");
RccPathChecksum_ = InfoGet("ARCC_OUTPUT_CHECKSUM");
RccFileName_ = InfoGet("ARCC_OUTPUT_NAME");
Options_ = InfoGetConfigList("ARCC_OPTIONS");
Inputs_ = InfoGetList("ARCC_INPUTS");
// - Settings file
SettingsFile_ = InfoGetConfig("ARCC_SETTINGS_FILE");
// - Validity checks
if (SettingsFile_.empty()) {
Log().ErrorFile(GeneratorT::RCC, InfoFile(), "Settings file name missing");
......@@ -109,7 +118,7 @@ bool cmQtAutoGeneratorRcc::Init(cmMakefile* makefile)
Log().ErrorFile(GeneratorT::RCC, InfoFile(), "rcc input file missing");
return false;
}
if (RccFile_.empty()) {
if (RccFileName_.empty()) {
Log().ErrorFile(GeneratorT::RCC, InfoFile(), "rcc output file missing");
return false;
}
......@@ -117,22 +126,21 @@ bool cmQtAutoGeneratorRcc::Init(cmMakefile* makefile)
// Init derived information
// ------------------------
RccFilePublic_ = AutogenBuildDir_;
RccFilePublic_ += '/';
RccFilePublic_ += RccPathChecksum_;
RccFilePublic_ += '/';
RccFilePublic_ += RccFileName_;
// Compute rcc output file name
{
std::string suffix;
switch (MultiConfig_) {
case MultiConfigT::SINGLE:
break;
case MultiConfigT::WRAPPER:
suffix = "_CMAKE";
suffix += ConfigSuffix_;
suffix += "_";
break;
case MultiConfigT::MULTI:
suffix = ConfigSuffix_;
break;
}
RccFileBuild_ = AppendFilenameSuffix(RccFile_, suffix);
if (IsMultiConfig()) {
RccFileOutput_ = AutogenBuildDir_;
RccFileOutput_ += '/';
RccFileOutput_ += IncludeDir_;
RccFileOutput_ += '/';
RccFileOutput_ += MultiConfigOutput();
} else {
RccFileOutput_ = RccFilePublic_;
}
return true;
......@@ -234,6 +242,16 @@ void cmQtAutoGeneratorRcc::SetStage(StageT stage)
}
}
std::string cmQtAutoGeneratorRcc::MultiConfigOutput() const
{
static std::string const suffix = "_CMAKE_";
std::string res;
res += RccPathChecksum_;
res += '/';
res += AppendFilenameSuffix(RccFileName_, suffix);
return res;
}
void cmQtAutoGeneratorRcc::SettingsFileRead()
{
// Compose current settings strings
......@@ -248,7 +266,9 @@ void cmQtAutoGeneratorRcc::SettingsFileRead()
str += sep;
str += QrcFile_;
str += sep;
str += RccFile_;
str += RccPathChecksum_;
str += sep;
str += RccFileName_;
str += sep;
str += cmJoin(Options_, ";");
str += sep;
......@@ -302,10 +322,10 @@ bool cmQtAutoGeneratorRcc::TestQrcRccFiles()
// Do basic checks if rcc generation is required
// Test if the rcc output file exists
if (!FileSys().FileExists(RccFileBuild_)) {
if (!FileSys().FileExists(RccFileOutput_)) {
if (Log().Verbose()) {
std::string reason = "Generating ";
reason += Quoted(RccFileBuild_);
reason += Quoted(RccFileOutput_);
reason += " from its source file ";
reason += Quoted(QrcFile_);
reason += " because it doesn't exist";
......@@ -319,7 +339,7 @@ bool cmQtAutoGeneratorRcc::TestQrcRccFiles()
if (SettingsChanged_) {
if (Log().Verbose()) {
std::string reason = "Generating ";
reason += Quoted(RccFileBuild_);
reason += Quoted(RccFileOutput_);
reason += " from ";
reason += Quoted(QrcFile_);
reason += " because the RCC settings changed";
......@@ -334,7 +354,7 @@ bool cmQtAutoGeneratorRcc::TestQrcRccFiles()
bool isOlder = false;
{
std::string error;
isOlder = FileSys().FileIsOlderThan(RccFileBuild_, QrcFile_, &error);
isOlder = FileSys().FileIsOlderThan(RccFileOutput_, QrcFile_, &error);
if (!error.empty()) {
Log().ErrorFile(GeneratorT::RCC, QrcFile_, error);
Error_ = true;
......@@ -343,7 +363,7 @@ bool cmQtAutoGeneratorRcc::TestQrcRccFiles()
if (isOlder) {
if (Log().Verbose()) {
std::string reason = "Generating ";
reason += Quoted(RccFileBuild_);
reason += Quoted(RccFileOutput_);
reason += " because it is older than ";
reason += Quoted(QrcFile_);
Log().Info(GeneratorT::RCC, reason);
......@@ -437,10 +457,10 @@ bool cmQtAutoGeneratorRcc::TestResources()
break;
}
// Check if the resource file is newer than the build file
if (FileSys().FileIsOlderThan(RccFileBuild_, resFile, &error)) {
if (FileSys().FileIsOlderThan(RccFileOutput_, resFile, &error)) {
if (Log().Verbose()) {
std::string reason = "Generating ";
reason += Quoted(RccFileBuild_);
reason += Quoted(RccFileOutput_);
reason += " from ";
reason += Quoted(QrcFile_);
reason += " because it is older than ";
......@@ -469,7 +489,7 @@ void cmQtAutoGeneratorRcc::TestInfoFile()
bool isOlder = false;
{