Commit Graph

83 Commits

Author SHA1 Message Date
Sebastian Holtermann 3f86032bda Autogen: Generators: Rename requiresMocing method 2017-01-13 00:00:45 +01:00
Sebastian Holtermann d7d2cb48c6 Autogen: Generators: Save the UIC/RCC settings that were actually used 2017-01-13 00:00:44 +01:00
Sebastian Holtermann 721997a7a2 Autogen: Generators: Dedicated generateAll variables for MOC/UIC/RCC 2017-01-13 00:00:44 +01:00
Sebastian Holtermann 9f47d32697 Autogen: Generators: Save the MOC settings that were actually used 2017-01-13 00:00:44 +01:00
Sebastian Holtermann edf0b8a52b Autogen: Generators: Rename GenerateFoo methods to FooGenerate 2017-01-13 00:00:44 +01:00
Sebastian Holtermann 119791ae52 Autogen: Generators: Introduce FileAbsentOrOlder function 2017-01-13 00:00:43 +01:00
Sebastian Holtermann 6c55755bdd Autogen: Generators: Make class static method a source static function 2017-01-13 00:00:43 +01:00
Sebastian Holtermann 1491ab1c66 Autogen: Generators: Make class static method a source static function 2017-01-13 00:00:43 +01:00
Sebastian Holtermann 52688bf745 Autogen: Generators: Sort methods by task 2017-01-13 00:00:42 +01:00
Sebastian Holtermann d58b6bf31c AUTOGEN: Generators: Moc/UicSkipTest methods 2017-01-10 12:49:16 +01:00
Sebastian Holtermann 94c319f933 AUTOGEN: Generators: Use separate header lists for MOC and UIC
This is necessary for the skipMoc and skipUic lists to work properly.
2017-01-10 12:49:16 +01:00
Sebastian Holtermann 6ae19bf32e AUTOGEN: Generators: Add dedicated method for moc content parsing 2017-01-10 12:49:14 +01:00
Sebastian Holtermann 9986da4f0f AUTOGEN: Generators: Split config SKIP_MOC and SKIP_UIC into vectors 2017-01-10 12:49:14 +01:00
Sebastian Holtermann d51cc88e84 AUTOGEN: Generators: Split config headers/sources into vector 2017-01-10 12:49:14 +01:00
Sebastian Holtermann cf1d5a9cdb AUTOGEN: Generators: Rename ParseForUic method 2017-01-10 12:49:14 +01:00
Sebastian Holtermann c736c41ad1 AUTOGEN: Generators: Use precompiled regular expressions 2017-01-10 12:49:14 +01:00
Sebastian Holtermann cbd650c264 AUTOGEN: Generators: Use unified ParseSourceFile and drop old methods 2017-01-10 12:49:14 +01:00
Sebastian Holtermann 0b1527ff3d AUTOGEN: Generators: Introduce unified ParseSourceFile
The new cmQtAutoGenerators::ParseSourceFile method combines the
functionality of ParseCppFile and StrictParseCppFile in a single method
to avoid code duplication. Relaxed or strict mode is selected by an
additional bool argument.
2017-01-10 12:49:13 +01:00
Sebastian Holtermann a1e49bb155 AUTOGEN: Generators: rename makeParentDirectory to MakeParentDirectory 2017-01-10 12:49:13 +01:00
Sebastian Holtermann 98665c3519 QtAutogen: Rename and sort variables 2016-12-07 08:24:04 -05:00
Sebastian Holtermann 8c9358386b QtAutogen: Generate included ui_ and moc_ files in _automoc/includes
ui_ and moc_ files that are include in source files get generated in
$CURRENT_BUILD_DIR/$TARGETNAME_automoc/include.
The directory is added to the INCLUDE_DIRECTORIES of the origin target
in the generation stage.

From now on all autogen files get generated below
$CURRENT_BUILD_DIR/$TARGETNAME_automoc.
2016-12-07 08:24:01 -05:00
Sebastian Holtermann 057ac11bfb QtAutogen: Use checksum based subdirectories to avoid name collisions 2016-12-07 08:24:00 -05:00
Sebastian Holtermann 8c6f990fb6 QtAutogen: New common bold logging method 2016-12-07 08:23:58 -05:00
Sebastian Holtermann 49f8687e16 QtAutogen: Make sure parent directory exists before writing files 2016-12-07 08:23:58 -05:00
Sebastian Holtermann 7731121d66 QtAutogen: Improved error handling 2016-12-07 08:23:58 -05:00
Sebastian Holtermann 00750ece6a QtAutogen: Error and warning log method tweaks 2016-12-07 08:23:58 -05:00
Sebastian Holtermann 1c97d1df20 QtAutogen: Improved error recognition on config load 2016-12-07 08:23:52 -05:00
Sebastian Holtermann 48180401d3 QtAutogen: Rename config AM_RELAXED_MODE to AM_MOC_RELAXED_MODE 2016-12-06 15:59:26 +01:00
Brad King 86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Daniel Pfeifer efed6468ed fix a load of include-what-you-use violations 2016-09-03 08:04:56 -04:00
Daniel Pfeifer 3838a0d5fb make sure to include cmConfigure.h before cmStandardIncludes.h 2016-09-03 08:04:22 -04:00
Sebastian Holtermann 4e9b97d739 QtAutogen: Allow multiple qrc files with the same name
Use cmFilePathUuid for qrc files.
2016-08-10 13:21:33 -04:00
Sebastian Holtermann 41c9e14afb QtAutogen: Allow multiple moc files with the same name
Use cmFilePathUuid for moc files.

Closes: #12873
2016-08-10 13:21:33 -04:00
Brad King 5e55d87bdc Autogen: Revert changes to generate moc/rcc in subdirectories
Revert these commits:

* v3.6.0-rc1~134^2
  Tests: QtAutogen: Same source name in different directories test, 2016-04-13
* v3.6.0-rc1~134^2~1
  Autogen: Generate qrc_NAME.cpp files in subdirectories, 2016-04-19
* v3.6.0-rc1~134^2~2
  Autogen: Generate not included moc files in subdirectories, 2016-04-19

They regress existing builds that depend on the paths/symbols generated
previously.  Another approach will be needed to solve the name collision
problem they were intended to solve.  Leave the error diagnostics for
the colliding cases that were added in the same topic as the above
commits because they provide a useful early failure in relevant cases.

Fixes #16209.
2016-07-21 09:27:19 -04:00
Kitware Robot d9fd2f5402 Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.
2016-05-16 16:05:19 -04:00
Brad King e1c7747253 Format include directive blocks and ordering with clang-format
Sort include directives within each block (separated by a blank line) in
lexicographic order (except to prioritize `sys/types.h` first).  First
run `clang-format` with the config file:

    ---
    SortIncludes: false
    ...

Commit the result temporarily.  Then run `clang-format` again with:

    ---
    SortIncludes: true
    IncludeCategories:
      - Regex:    'sys/types.h'
        Priority: -1
    ...

Commit the result temporarily.  Start a new branch and cherry-pick the
second commit.  Manually resolve conflicts to preserve indentation of
re-ordered includes.  This cleans up the include ordering without
changing any other style.

Use the following command to run `clang-format`:

    $ git ls-files -z -- \
        '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
      egrep -z -v '(Lexer|Parser|ParserHelper)\.' |
      egrep -z -v '^Source/cm_sha2' |
      egrep -z -v '^Source/(kwsys|CursesDialog/form)/' |
      egrep -z -v '^Utilities/(KW|cm).*/' |
      egrep -z -v '^Tests/Module/GenerateExportHeader' |
      egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' |
      xargs -0 clang-format -i

This selects source files that do not come from a third-party.

Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
2016-04-29 13:58:54 -04:00
Brad King 180538c706 Source: Stabilize include order
Each source file has a logical first include file.  Include it in an
isolated block so that tools that sort includes do not move them.
2016-04-29 13:58:31 -04:00
Sebastian Holtermann 9b58190c8f Autogen: Message cleanups: Compose messages in std::stringstream
To avoid Race conditions with other processes writing to stdout/stderr compose
the whole message in a std::stringstream then submit the single complete message.
2016-04-25 10:38:58 -04:00
Sebastian Holtermann 488ea8c709 Autogen: Generate not included moc files in subdirectories (#12873)
Not included moc files generated from a source file in
CMAKE_CURRENT_SOURCE_DIR/SUBDIR
will be generated in the directory
CMAKE_CURRENT_BINARY_DIR/TARGETNAME_automoc.dir/SUBDIR/
2016-04-22 08:49:22 -04:00
Sebastian Holtermann 8295d43713 Autogen: Check added for name collisions of generated moc files
The test exits with an error if two or more source files
would generate the same moc file.
2016-04-22 08:49:21 -04:00
Sebastian Holtermann 840b830bc6 Autogen: Qrc processing: Generate single map with final input / output names 2016-04-19 12:59:13 -04:00
Sebastian Holtermann bc4c7751ab Autogen: Ui processing: Generate single map with final input / output names
The single map allows name collision testing (in a later commit)
2016-04-19 12:59:06 -04:00
Sebastian Holtermann 47e60bc5a0 Autogen: Split out UI file generation code to dedicated method 2016-04-19 12:52:36 -04:00
Sebastian Holtermann cf679ea8dc Autogen: Split out moc file generation code to dedicated method 2016-04-19 12:51:26 -04:00
Sebastian Holtermann 3ea1d09082 Autogen: Rename method GenerateQrc{ => Files} 2016-04-19 12:49:47 -04:00
Sebastian Holtermann 8ced8bb95a Autogen: New logCommand method. It prints commands using std::cout. 2016-04-19 12:49:22 -04:00
Sebastian Holtermann 95064a6d35 Autogen: Rename header extension Join method to JoinExts
While at it, simplify the signature and avoid a trailing separator.
2016-04-19 12:48:05 -04:00
Sebastian Holtermann 7a73c404dd Autogen: Use SystemTools string functions instead of rolling out own 2016-04-19 12:44:08 -04:00
Stephen Kelly 59a729b2be QtAutogen: Split initializer class into separate file. 2015-09-29 09:56:23 -04:00
Stephen Kelly 1e83a963d8 QtAutogen: Split initializer methods into separate class. 2015-09-26 19:32:54 +02:00