mirror of
https://github.com/reactos/CMake.git
synced 2024-12-04 09:54:15 +00:00
Merge topic 'autogen-nexist-source-fix'
be304fb8
Merge branch 'backport-autogen-nexist-source-fix' into autogen-nexist-source-fixd592bfc9
Autogen: Ignore not existing source files in cmMakefile513eb014
Autogen: Ignore not existing source files in cmMakefile Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1651
This commit is contained in:
commit
8c450b316f
@ -475,10 +475,16 @@ void cmQtAutoGeneratorInitializer::InitCustomTargets()
|
||||
}
|
||||
// Read skip files from makefile sources
|
||||
if (this->MocEnabled || this->UicEnabled) {
|
||||
const std::vector<cmSourceFile*>& allSources = makefile->GetSourceFiles();
|
||||
for (cmSourceFile* sf : allSources) {
|
||||
std::string pathError;
|
||||
for (cmSourceFile* sf : makefile->GetSourceFiles()) {
|
||||
// sf->GetExtension() is only valid after sf->GetFullPath() ...
|
||||
std::string const& fPath = sf->GetFullPath();
|
||||
// Since we're iterating over source files that might be not in the
|
||||
// target we need to check for path errors (not existing files).
|
||||
std::string const& fPath = sf->GetFullPath(&pathError);
|
||||
if (!pathError.empty()) {
|
||||
pathError.clear();
|
||||
continue;
|
||||
}
|
||||
cmSystemTools::FileFormat const fileType =
|
||||
cmSystemTools::GetFileFormat(sf->GetExtension().c_str());
|
||||
if (!(fileType == cmSystemTools::CXX_FILE_FORMAT) &&
|
||||
@ -1188,9 +1194,16 @@ void cmQtAutoGeneratorInitializer::SetupCustomTargetsUic()
|
||||
std::vector<std::vector<std::string>> uiFileOptions;
|
||||
{
|
||||
std::string const uiExt = "ui";
|
||||
std::string pathError;
|
||||
for (cmSourceFile* sf : makefile->GetSourceFiles()) {
|
||||
// sf->GetExtension() is only valid after sf->GetFullPath() ...
|
||||
std::string const& fPath = sf->GetFullPath();
|
||||
// Since we're iterating over source files that might be not in the
|
||||
// target we need to check for path errors (not existing files).
|
||||
std::string const& fPath = sf->GetFullPath(&pathError);
|
||||
if (!pathError.empty()) {
|
||||
pathError.clear();
|
||||
continue;
|
||||
}
|
||||
if (sf->GetExtension() == uiExt) {
|
||||
std::string const absFile = cmSystemTools::GetRealPath(fPath);
|
||||
// Check if the .ui file should be skipped
|
||||
|
Loading…
Reference in New Issue
Block a user