summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenInitializer.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'autogen-cleanups'Brad King2018-12-101-160/+72
|\ | | | | | | | | | | | | | | 7630eb1975 cmQtAutoGenInitializer: Reduce code duplication Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Tobias Hunger <tobias.hunger@gmail.com> Merge-request: !2689
| * cmQtAutoGenInitializer: Reduce code duplicationTobias Hunger2018-12-071-160/+72
| | | | | | | | Do not repeat the code used to find uic/rcc and moc exectuables.
* | Autogen: Revert passing compiler implicit includes to mocSebastian Holtermann2018-12-071-3/+6
|/ | | | | | | | | Passing an incomplete list of compiler include directories causes a regression in the KIO project (and probably others). We need to disable it until the complete list is available (see #16291). Fixes: #18669 Issue: #18041
* Merge topic 'autogen-qtversion-detection'Brad King2018-12-061-38/+47
|\ | | | | | | | | | | | | | | 5191b74524 Autogen: Qt version detection cleanup Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Sebastian Holtermann <sebholt@xwmw.org> Merge-request: !2694
| * Autogen: Qt version detection cleanupTobias Hunger2018-12-031-38/+47
| | | | | | | | | | Split the Qt version detection code up a bit so that it is a bit easier to follow.
* | Merge topic 'autogen_uic_empty_fix'Brad King2018-12-061-0/+6
|\ \ | |/ |/| | | | | | | | | | | | | 5f0f84c7e0 Autogen: Don't add a WIN32 moc definition if we have a moc_predefs.h file 0814d74548 Autogen: Add QtAutogen.UicNoGui test 2ef640819f Autogen: Tests: Differentiate between Qt core and Qt gui tests Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2668
| * Autogen: Don't add a WIN32 moc definition if we have a moc_predefs.h fileSebastian Holtermann2018-11-281-0/+6
| | | | | | | | | | | | | | | | On Windows systems we used to add a "-DWIN32" definition to the ``moc`` defines. This is not necessary anymore when we have a ``moc_predefs.h`` file that provides all compiler predefines. Closes #18623
* | Merge topic 'readability-static-accessed-through-instance'Brad King2018-11-281-1/+1
|\ \ | |/ |/| | | | | | | | | 3e60580784 clang-tidy: Fix readability-static-accessed-through-instance Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2647
| * clang-tidy: Fix readability-static-accessed-through-instanceRegina Pfeifer2018-11-211-1/+1
| | | | | | | | Enable the check in .clang-tidy and fix all warnings.
* | Merge topic 'autogen_uic_empty_fix_3_13'Brad King2018-11-281-1/+1
|\ \ | |/ |/| | | | | | | | | b1b5004c1a Autogen: Fix empty uic executable string Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2667
| * Autogen: Fix empty uic executable stringSebastian Holtermann2018-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | In CMake 3.13.0 when a target has ``AUTOUIC`` enabled but doesn't link against Qt5Widgets, the uic executable string is empty and an error string "The uic executable \"\" does not exist" is generated. In CMake 3.12 ``AUTOUIC`` was silently disabled instead. This patch fixes the regression and restores the behavior of CMake 3.12. Fixes: #18630
* | Autogen: Add and use cmQtAutoGenInitializer::InfoWriter classSebastian Holtermann2018-11-141-139/+191
| | | | | | | | | | | | | | | | | | The new ``cmQtAutoGenInitializer::InfoWriter`` class provides an interface to write strings/vectors/sets/maps in CMake format into a file. Its use replaces various `cmJoin` calls that failed to address escaping of semicolons in list elements. Closes #18554
* | Autogen: Add support for global ``autogen`` and ``autorcc`` targetsSebastian Holtermann2018-11-111-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This teaches CMake the variables - CMAKE_GLOBAL_AUTOGEN_TARGET - CMAKE_GLOBAL_AUTOGEN_TARGET_NAME - CMAKE_GLOBAL_AUTORCC_TARGET - CMAKE_GLOBAL_AUTORCC_TARGET_NAME which control the generation of global ``autogen`` and ``autorcc`` targets. Closes #17721
* | Autogen: Add (CMAKE_)AUTOGEN_ORIGIN_DEPENDS supportSebastian Holtermann2018-11-031-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds - the variable ``CMAKE_AUTOGEN_ORIGIN_DEPENDS`` which initializes - the target property ``AUTOGEN_ORIGIN_DEPENDS`` which controls whether or not the origin target dependencies should be forwarded to the corresponding ``_autogen`` target. The default value of ``CMAKE_AUTOGEN_ORIGIN_DEPENDS`` is ``ON`` which corresponds to the behavior that is in place since CMake 3.9. Closes: #18493
* | add_dependencies: Track backtraces internallyBrad King2018-10-181-2/+3
| | | | | | | | | | Record backtraces for "utility" dependencies created by `add_dependencies` calls.
* | cmLocalGenerator: Remove AddCompileDefinitions methodBrad King2018-10-101-1/+1
|/ | | | | | | This method offers the same definitions as `GetTargetDefines` except that it excludes the "export" macro on shared libraries. Update call sites to use `GetTargetDefines` instead. Some of them were incorrectly excluding the export macro.
* cmMakefile: Make GetSafeDefinition return std::string const&Vitaly Stakhovsky2018-09-181-1/+1
|
* Remove unnecessary c_str() callsVitaly Stakhovsky2018-09-051-2/+1
| | | | Use the new IsOn(),IsOff() overloads.
* cmMakefile: return directories as const std::string&Vitaly Stakhovsky2018-08-271-2/+2
|
* Autogen: Use integers to store the Qt versionSebastian Holtermann2018-08-131-52/+57
|
* Autogen: Initializer: Group variables in structsSebastian Holtermann2018-08-131-133/+147
|
* cmGeneratedFileStream: clang-tidy applied to remove redundant ``c_str`` callsSebastian Holtermann2018-08-071-2/+2
| | | | | | | | | | | | | | | After changing the ``cmGeneratedFileStream`` methods to accept ``std::string const&`` instead of ``const char*`` we don't need to call ``std::string::c_str`` anymore when passing a ``std::string`` to a ``cmGeneratedFileStream`` method. This patch removes all redundant ``std::string::c_str`` calls when passing a string to a ``cmGeneratedFileStream`` method. It was generated by building CMake with clang-tidy enabled using the following options: -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-4.0;-checks=-*,readability-redundant-string-cstr;-fix;-fix-errors
* Autogen: For Qt5 pass all implicit include directories to mocSebastian Holtermann2018-07-301-3/+5
| | | | | | | | | | | | | For Qt4 it was not possible to pass all compiler implicit include directories to moc because it couldn't handle some system headers. For reference see commit 753b905ec86ffe369d4f59a7a8ced5fedc42939f, commit d2536579d51e77827b8e55f39123316324314781 and [QTBUG-28045](https://bugreports.qt.io/browse/QTBUG-28045). For Qt5's moc the problem does not persist anymore so we can (and should) pass all implicit include directories to moc. Fixes #18041
* Autogen: Split initializer main methodSebastian Holtermann2018-07-301-541/+557
|
* Autogen: Compute variables in Init stage instead of Setup stageSebastian Holtermann2018-07-301-156/+171
|
* Autogen: Move info file write code into methodsSebastian Holtermann2018-07-301-174/+195
|
* Autogen: Pass absolute include path in info fileSebastian Holtermann2018-07-301-19/+20
|
* Return std::string from cmGeneratorTarget::ImportedGetLocationSebastian Holtermann2018-07-111-8/+3
|
* Autogen: Wrap moc/uic/rcc related variables in structsSebastian Holtermann2018-07-111-89/+91
|
* Autogen: Improve error detection during configurationSebastian Holtermann2018-07-111-115/+225
| | | | | | | | | | | | | | cmQtAutoGenInitializer::InitCustomTargets and cmQtAutoGenInitializer::SetupCustomTargets now return their success value which gets evaluated and passed on by the caller (cmGlobalGenerator). Checks for the existance of the moc/uic/rcc binaries have been introduces in cmQtAutoGenInitializer. Additionally they get called once with a "-h" argument to determine if they're functional. This way any binary-not-found problem is caught during the configuration phase.
* Autogen: Use default and remove custom GetSafeProperty functionsSebastian Holtermann2018-07-021-23/+11
|
* Autogen: Add CMAKE_AUTOGEN_VERBOSE variable supportSebastian Holtermann2018-06-211-1/+15
| | | | | Setting CMAKE_AUTOGEN_VERBOSE enables verbose output during AUTOMOC, AUTOUIC and AUTORCC generation.
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-19/+21
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * 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.
* Autogen: Let AUTORCC generate output for all configurationsSebastian Holtermann2018-05-301-2/+14
| | | | | | | | | | | | For multi configuration generators let AUTORCC generate the rcc output for all configurations. This is a workaround for the incomplete `$<CONFIG>` support in the DEPENDS and OUTPUT clauses of a custom_command/custom_target. Since we can't depend on the per-config rcc output file we somehow must ensure the successful rcc build for one configuration doesn't shadow the need to rcc rebuild for a second configuration. Closes #18006
* Autogen: Add lock file to AUTORCC commandsSebastian Holtermann2018-05-301-0/+6
| | | | | By using a per .qrc lock file in AUTORCC, the same `cmake -E cmake_autorcc ...` command can be called concurrently.
* Autogen: Register generated dependency filesSebastian Holtermann2018-05-141-0/+3
| | | | | | For CMP0058 record that rcc info files are generated by CMake. Fixes: #17985
* Autogen: Overwrite info files when changed onlySebastian Holtermann2018-02-061-34/+12
| | | | | | Check if the content of the AUTOMOC/UIC/RCC info file will change before overwriting it. This avoids unnecessary AUTORCC rebuilds when AUTORCC unrelated CMake settings change.
* Autogen: Improved multi-config include schemeSebastian Holtermann2018-02-021-296/+249
| | | | | | | | | | | | | | | | | | | | | | | | | For multi configuration generators AUTOMOC generates the moc files that are included in `mocs_compilation.cpp` in `AUTOGEN_BUILD_DIR/include_$<CONFIG>/`. By doing so each configuration reads different moc files when compiling `mocs_compilation.cpp`. Since we do not (need to) rewrite `mocs_compilation.cpp` on a configuration change anymore, the files also does not need to be recompiled anymore. Not having to rewrite and recompile `mocs_compilation.cpp` on a configuration change anymore was the main objective of this patch. In a similar fashion AUTORCC generates a `qrc_BASE_CMAKE.cpp` file below `AUTOGEN_BUILD_DIR/include_$<CONFIG>/` and `qrc_BASE.cpp` becomes a mere wrapper that includes this actuall rcc output file (when using multi configuration generators). The template files `Modules/AutoRccInfo.cmake.in` and `Modules/AutogenInfo.cmake.in` were removed in favor of writing the info `.cmake` files manually. Closes #17230
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-3/+3
| | | | | | | | | | * Change some functions to take `std::string` instead of `const char*` in the following classes: `cmMakeFile`, `cmake`, `cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator` and a few others. * Greatly reduce using of `const char*` overloads for `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`. * Remove many redundant `c_str()` conversions throughout the code.
* Make use of std::chrono throughout every componentWouter Klouwen2018-01-231-2/+3
| | | | | | | | This commit continues the changes made in CTest to support std::chrono by applying it throughout every component where a duration was used. No functional change intended.
* Autogen: Rename cmQtAutogeneratorInitializer to cmQtAutoGenInitializerSebastian Holtermann2018-01-171-0/+1461