summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-04-07 12:44:57 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-04-07 12:45:06 (GMT)
commitb962b9cf1dd18ed5a4df7cdd2becac631d051fc4 (patch)
treee0b8abca006681c284f4763f79bedfa518c4f8a6
parenta8b6b54239ac39493947e97cbe5164ac2b1c323e (diff)
parente8ddc1e268d2db78a2f3edde1f6edb05d9243ada (diff)
downloadCMake-b962b9cf1dd18ed5a4df7cdd2becac631d051fc4.zip
CMake-b962b9cf1dd18ed5a4df7cdd2becac631d051fc4.tar.gz
CMake-b962b9cf1dd18ed5a4df7cdd2becac631d051fc4.tar.bz2
Merge topic 'autouic-source-group-fixes'
e8ddc1e268 Autogen: Fix a bug in setting the UIC source group 7f0151dc91 Help: Document the AUTOUIC_SOURCE_GROUP property f6c47dd0b4 Help: Fix a typo in the AUTOGEN_SOURCE_GROUP help Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alexey Edelev <alexey.edelev@qt.io> Merge-request: !5978
-rw-r--r--Auxiliary/vim/syntax/cmake.vim1
-rw-r--r--Help/manual/cmake-properties.7.rst1
-rw-r--r--Help/prop_gbl/AUTOGEN_SOURCE_GROUP.rst21
-rw-r--r--Help/prop_gbl/AUTOUIC_SOURCE_GROUP.rst9
-rw-r--r--Help/prop_sf/GENERATED.rst7
-rw-r--r--Source/cmQtAutoGenInitializer.cxx8
6 files changed, 33 insertions, 14 deletions
diff --git a/Auxiliary/vim/syntax/cmake.vim b/Auxiliary/vim/syntax/cmake.vim
index 955beae..067f80d 100644
--- a/Auxiliary/vim/syntax/cmake.vim
+++ b/Auxiliary/vim/syntax/cmake.vim
@@ -92,6 +92,7 @@ syn keyword cmakeProperty contained
\ AUTOUIC_EXECUTABLE
\ AUTOUIC_OPTIONS
\ AUTOUIC_SEARCH_PATHS
+ \ AUTOUIC_SOURCE_GROUP
\ BINARY_DIR
\ BUILDSYSTEM_TARGETS
\ BUILD_RPATH
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index af170da..60a4028 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -21,6 +21,7 @@ Properties of Global Scope
/prop_gbl/AUTOMOC_SOURCE_GROUP
/prop_gbl/AUTOMOC_TARGETS_FOLDER
/prop_gbl/AUTORCC_SOURCE_GROUP
+ /prop_gbl/AUTOUIC_SOURCE_GROUP
/prop_gbl/CMAKE_C_KNOWN_FEATURES
/prop_gbl/CMAKE_CUDA_KNOWN_FEATURES
/prop_gbl/CMAKE_CXX_KNOWN_FEATURES
diff --git a/Help/prop_gbl/AUTOGEN_SOURCE_GROUP.rst b/Help/prop_gbl/AUTOGEN_SOURCE_GROUP.rst
index 2e32320..07c732b 100644
--- a/Help/prop_gbl/AUTOGEN_SOURCE_GROUP.rst
+++ b/Help/prop_gbl/AUTOGEN_SOURCE_GROUP.rst
@@ -3,15 +3,16 @@ AUTOGEN_SOURCE_GROUP
.. versionadded:: 3.9
-Name of the :command:`source_group` for :prop_tgt:`AUTOMOC` and
-:prop_tgt:`AUTORCC` generated files.
+Name of the :command:`source_group` for :prop_tgt:`AUTOMOC`,
+:prop_tgt:`AUTORCC` and :prop_tgt:`AUTOUIC` generated files.
-Files generated by :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTORCC` are not always
-known at configure time and therefore can't be passed to
-:command:`source_group`.
-:prop_gbl:`AUTOGEN_SOURCE_GROUP` an be used instead to generate or select
-a source group for :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTORCC` generated files.
+Files generated by :prop_tgt:`AUTOMOC`, :prop_tgt:`AUTORCC` and
+:prop_tgt:`AUTOUIC` are not always known at configure time and therefore can't
+be passed to :command:`source_group`.
+:prop_gbl:`AUTOGEN_SOURCE_GROUP` can be used instead to generate or select
+a source group for :prop_tgt:`AUTOMOC`, :prop_tgt:`AUTORCC` and
+:prop_tgt:`AUTOUIC` generated files.
-For :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTORCC` specific overrides see
-:prop_gbl:`AUTOMOC_SOURCE_GROUP` and :prop_gbl:`AUTORCC_SOURCE_GROUP`
-respectively.
+For :prop_tgt:`AUTOMOC`, :prop_tgt:`AUTORCC` and :prop_tgt:`AUTOUIC` specific
+overrides see :prop_gbl:`AUTOMOC_SOURCE_GROUP`, :prop_gbl:`AUTORCC_SOURCE_GROUP`
+and :prop_gbl:`AUTOUIC_SOURCE_GROUP` respectively.
diff --git a/Help/prop_gbl/AUTOUIC_SOURCE_GROUP.rst b/Help/prop_gbl/AUTOUIC_SOURCE_GROUP.rst
new file mode 100644
index 0000000..79ebfe0
--- /dev/null
+++ b/Help/prop_gbl/AUTOUIC_SOURCE_GROUP.rst
@@ -0,0 +1,9 @@
+AUTOUIC_SOURCE_GROUP
+--------------------
+
+.. versionadded:: 3.21
+
+Name of the :command:`source_group` for :prop_tgt:`AUTOUIC` generated files.
+
+When set this is used instead of :prop_gbl:`AUTOGEN_SOURCE_GROUP` for
+files generated by :prop_tgt:`AUTOUIC`.
diff --git a/Help/prop_sf/GENERATED.rst b/Help/prop_sf/GENERATED.rst
index 6ef4580..216dfe8 100644
--- a/Help/prop_sf/GENERATED.rst
+++ b/Help/prop_sf/GENERATED.rst
@@ -32,9 +32,10 @@ The :ref:`Makefile Generators` will remove ``GENERATED`` files during
``make clean``.
Generated sources may be hidden in some IDE tools, while in others they might
-be shown. For the special case of sources generated by CMake's :prop_tgt:`AUTOMOC`
-or :prop_tgt:`AUTORCC` functionality, the :prop_gbl:`AUTOGEN_SOURCE_GROUP`,
-:prop_gbl:`AUTOMOC_SOURCE_GROUP` and :prop_gbl:`AUTORCC_SOURCE_GROUP` target
+be shown. For the special case of sources generated by CMake's :prop_tgt:`AUTOMOC`,
+:prop_tgt:`AUTORCC` or :prop_tgt:`AUTOUIC` functionality, the
+:prop_gbl:`AUTOGEN_SOURCE_GROUP`, :prop_gbl:`AUTOMOC_SOURCE_GROUP`,
+:prop_gbl:`AUTORCC_SOURCE_GROUP` and :prop_gbl:`AUTOUIC_SOURCE_GROUP` target
properties may influence where the generated sources are grouped in the project's
file lists.
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index 6528687..e96ec63 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -943,8 +943,14 @@ bool cmQtAutoGenInitializer::InitScanFiles()
this->LocalGen->GetCurrentSourceDirectory(),
cmSystemTools::GetFilenamePath(fullPath));
+ // Avoid creating a path containing adjacent slashes
+ if (!uiHeaderRelativePath.empty() &&
+ uiHeaderRelativePath.back() != '/') {
+ uiHeaderRelativePath += '/';
+ }
+
auto uiHeaderFilePath = cmStrCat(
- '/', uiHeaderRelativePath, '/', "ui_"_s,
+ '/', uiHeaderRelativePath, "ui_"_s,
cmSystemTools::GetFilenameWithoutLastExtension(fullPath), ".h"_s);
ConfigString uiHeader;