automoc: also accept other files when .moc is included in non-strict mode
Alex
This commit is contained in:
parent
9c0df72dc4
commit
c207f5d361
|
@ -674,9 +674,6 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename,
|
||||||
{
|
{
|
||||||
std::string fileToMoc = absFilename;
|
std::string fileToMoc = absFilename;
|
||||||
if (basename != scannedFileBasename)
|
if (basename != scannedFileBasename)
|
||||||
{
|
|
||||||
bool fail = true;
|
|
||||||
if (basename == scannedFileBasename+"_p")
|
|
||||||
{
|
{
|
||||||
std::string mocSubDir = extractSubDir(absPath, currentMoc);
|
std::string mocSubDir = extractSubDir(absPath, currentMoc);
|
||||||
std::string headerToMoc = findMatchingHeader(
|
std::string headerToMoc = findMatchingHeader(
|
||||||
|
@ -684,7 +681,6 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename,
|
||||||
if (!headerToMoc.empty())
|
if (!headerToMoc.empty())
|
||||||
{
|
{
|
||||||
// this is for KDE4 compatibility:
|
// this is for KDE4 compatibility:
|
||||||
fail = false;
|
|
||||||
fileToMoc = headerToMoc;
|
fileToMoc = headerToMoc;
|
||||||
std::cerr << "AUTOMOC: warning: " << absFilename << ": The file "
|
std::cerr << "AUTOMOC: warning: " << absFilename << ": The file "
|
||||||
"includes the moc file \"" << currentMoc <<
|
"includes the moc file \"" << currentMoc <<
|
||||||
|
@ -694,9 +690,7 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename,
|
||||||
<< basename << ".cpp\" for a robust build.\n"
|
<< basename << ".cpp\" for a robust build.\n"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
|
|
||||||
if (fail)
|
|
||||||
{
|
{
|
||||||
std::cerr <<"AUTOMOC: error: " << absFilename << ": The file "
|
std::cerr <<"AUTOMOC: error: " << absFilename << ": The file "
|
||||||
"includes the moc file \"" << currentMoc <<
|
"includes the moc file \"" << currentMoc <<
|
||||||
|
|
Loading…
Reference in New Issue