[Cmake-commits] CMake branch, master, updated. v3.10.1-784-gae7c7b6
Kitware Robot
kwrobot at kitware.com
Thu Jan 11 10:35:08 EST 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via ae7c7b6db5d6765768e95485b2db1a1b18cfbded (commit)
via 8c450b316fdcc210df913e3824d51a8f426b6d07 (commit)
via be304fb8c0af5e3d9e32754f3a5b711a8d63cbda (commit)
via ecfc729ad4db8ad743c277e3d82e7a64cf325b7c (commit)
via d592bfc9f5f616249d85bbea94d8e76a666591a8 (commit)
via 513eb014eb691373dc06b76a441f45074ec9afbf (commit)
from 66335350a35e37b347034e81b1d4c5f9218f22d5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae7c7b6db5d6765768e95485b2db1a1b18cfbded
commit ae7c7b6db5d6765768e95485b2db1a1b18cfbded
Merge: 8c450b3 ecfc729
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 11 10:30:45 2018 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Jan 11 10:30:45 2018 -0500
Merge branch 'release-3.10'
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c450b316fdcc210df913e3824d51a8f426b6d07
commit 8c450b316fdcc210df913e3824d51a8f426b6d07
Merge: 6633535 be304fb
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 11 15:29:43 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Jan 11 10:29:58 2018 -0500
Merge topic 'autogen-nexist-source-fix'
be304fb8 Merge branch 'backport-autogen-nexist-source-fix' into autogen-nexist-source-fix
d592bfc9 Autogen: Ignore not existing source files in cmMakefile
513eb014 Autogen: Ignore not existing source files in cmMakefile
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !1651
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be304fb8c0af5e3d9e32754f3a5b711a8d63cbda
commit be304fb8c0af5e3d9e32754f3a5b711a8d63cbda
Merge: 513eb01 d592bfc
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 11 10:28:00 2018 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Jan 11 10:28:00 2018 -0500
Merge branch 'backport-autogen-nexist-source-fix' into autogen-nexist-source-fix
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=513eb014eb691373dc06b76a441f45074ec9afbf
commit 513eb014eb691373dc06b76a441f45074ec9afbf
Author: Sebastian Holtermann <sebholt at xwmw.org>
AuthorDate: Wed Jan 10 15:00:23 2018 +0100
Commit: Sebastian Holtermann <sebholt at xwmw.org>
CommitDate: Wed Jan 10 18:57:08 2018 +0100
Autogen: Ignore not existing source files in cmMakefile
Until CMake 3.10 a list of source files that had the AUTOUIC_OPTIONS property
populated was kept in `cmMakefile::QtUiFilesWithOptions`. In the process to
remove all AUTOUIC related code from `cmMakefile` for CMake 3.10, the pre
filtered list was replaced by a loop in `cmQtAutoGeneratorInitializer` over
all source files in the `cmMakefile`. This loop introduced the problem that
file paths were computed for source files that weren't in the target's sources
and that might not even have existed. If the path for an unused and not
existing file was computed a `cmake::FATAL_ERROR` with the error message
"Cannot find source file:" was thrown nevertheless.
This caused some projects to fail in CMake 3.10.
This patch adds a test for path errors in the loops in
`cmQtAutoGeneratorInitializer` that iterate over all source files in a
`cmMakefile`. If a path error appears, the file is silently ignored.
If the file is part of the target's sources, the path error will still be
caught in the loop over all the target's sources.
Closes #17573
Closes #17589
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index 14743de..de0ba4f 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -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
-----------------------------------------------------------------------
Summary of changes:
Source/cmQtAutoGeneratorInitializer.cxx | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list