diff options
author | Brad King <brad.king@kitware.com> | 2018-01-22 15:23:14 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-01-22 15:23:41 (GMT) |
commit | b058d92b33ab37a56ac4dcf2f1e49aec89f554e3 (patch) | |
tree | 6b81a116a57d7f8fcc6c023a4f3107a7c4634ca3 /Source | |
parent | 5d13fa1010223a65e64f5270db06ada9c6a0ae0d (diff) | |
parent | b4e6911bf51c05001c1b3cbcc04587afa6ba4577 (diff) | |
download | CMake-b058d92b33ab37a56ac4dcf2f1e49aec89f554e3.zip CMake-b058d92b33ab37a56ac4dcf2f1e49aec89f554e3.tar.gz CMake-b058d92b33ab37a56ac4dcf2f1e49aec89f554e3.tar.bz2 |
Merge topic 'autogen-first-line-fix'
b4e6911b Autogen: Tests: Extend AUTOUIC include patterns test
ff91a5d5 Autogen: Tests: Extend AUTOMOC include patterns test
a1d491ca Autogen: AUTOMOC/UIC fix for moc/uic include on the first line
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1670
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmQtAutoGeneratorMocUic.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmQtAutoGeneratorMocUic.cxx b/Source/cmQtAutoGeneratorMocUic.cxx index 4b02e0b..037279a 100644 --- a/Source/cmQtAutoGeneratorMocUic.cxx +++ b/Source/cmQtAutoGeneratorMocUic.cxx @@ -221,7 +221,7 @@ bool cmQtAutoGeneratorMocUic::JobParseT::ParseMocSource(WorkerT& wrk, const char* contentChars = meta.Content.c_str(); cmsys::RegularExpressionMatch match; while (wrk.Moc().RegExpInclude.find(contentChars, match)) { - std::string incString = match.match(1); + std::string incString = match.match(2); std::string incDir(SubDirPrefix(incString)); std::string incBase = cmSystemTools::GetFilenameWithoutLastExtension(incString); @@ -500,7 +500,7 @@ bool cmQtAutoGeneratorMocUic::JobParseT::ParseUic(WorkerT& wrk, const char* contentChars = meta.Content.c_str(); cmsys::RegularExpressionMatch match; while (wrk.Uic().RegExpInclude.find(contentChars, match)) { - if (!ParseUicInclude(wrk, meta, match.match(1))) { + if (!ParseUicInclude(wrk, meta, match.match(2))) { success = false; break; } @@ -1124,9 +1124,9 @@ cmQtAutoGeneratorMocUic::cmQtAutoGeneratorMocUic() { // Precompile regular expressions Moc_.RegExpInclude.compile( - "[\n][ \t]*#[ \t]*include[ \t]+" + "(^|\n)[ \t]*#[ \t]*include[ \t]+" "[\"<](([^ \">]+/)?moc_[^ \">/]+\\.cpp|[^ \">]+\\.moc)[\">]"); - Uic_.RegExpInclude.compile("[\n][ \t]*#[ \t]*include[ \t]+" + Uic_.RegExpInclude.compile("(^|\n)[ \t]*#[ \t]*include[ \t]+" "[\"<](([^ \">]+/)?ui_[^ \">/]+\\.h)[\">]"); // Initialize libuv asynchronous iteration request |