mirror of
https://github.com/reactos/CMake.git
synced 2025-02-15 00:57:19 +00:00
Merge branch 'backport-autogen-nexist-source-fix' into release-3.10
Merge-request: !1650
This commit is contained in:
commit
ecfc729ad4
@ -361,11 +361,16 @@ static void SetupAcquireSkipFiles(cmQtAutoGenDigest const& digest,
|
||||
{
|
||||
// Read skip files from makefile sources
|
||||
{
|
||||
const std::vector<cmSourceFile*>& allSources =
|
||||
digest.Target->Makefile->GetSourceFiles();
|
||||
for (cmSourceFile* sf : allSources) {
|
||||
std::string pathError;
|
||||
for (cmSourceFile* sf : digest.Target->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) &&
|
||||
@ -540,9 +545,16 @@ static void SetupAutoTargetUic(cmQtAutoGenDigest const& digest,
|
||||
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 file should be skipped
|
||||
|
Loading…
x
Reference in New Issue
Block a user