summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenerators.cxx
Commit message (Collapse)AuthorAgeFilesLines
* QtAutogen: Issue error message with origin file (#15342).Stephen Kelly2015-02-031-1/+2
|
* Merge topic 'join-algorithm'Brad King2015-01-121-39/+5
|\ | | | | | | | | | | | | 55a73e6b Use the cmJoin algorithm where possible. 8dc8d756 cmStandardIncludes: Add a join algorithm for string containers. b5813cee cmInstallCommand: Remove unused variable.
| * Use the cmJoin algorithm where possible.Stephen Kelly2015-01-081-39/+5
| |
* | Use two-iterator std::set::insert where appropriate.Stephen Kelly2015-01-111-12/+2
| |
* | Use insert instead of a loop in some cases.Stephen Kelly2015-01-111-24/+7
|/ | | | | | Limit this change to inserting into a vector from a vector. A follow up change can use insert for inserting into a set.
* Remove some temporary vectors for ExpandListArgument.Stephen Kelly2014-12-181-8/+1
| | | | Expand directly into the target when possible.
* Merge topic 'remove-c_str'Brad King2014-11-251-5/+5
|\ | | | | | | | | 5eb4d759 Remove some unneeded c_str calls.
| * Remove some unneeded c_str calls.Stephen Kelly2014-11-231-5/+5
| |
* | Merge topic 'clean-autogen'Brad King2014-11-251-4/+4
|\ \ | | | | | | | | | | | | | | | 3bd59b60 QtAutogen: Use cmHasLiteral{Prefix,Suffix} where possible. bf00f528 QtAutogen: Don't take a reference to temporary.
| * | QtAutogen: Use cmHasLiteral{Prefix,Suffix} where possible.Stephen Kelly2014-11-181-3/+3
| | |
| * | QtAutogen: Don't take a reference to temporary.Stephen Kelly2014-11-181-1/+1
| |/ | | | | | | | | While a const reference to a temporary is standard conformant, it doesn't seem to be necessary or advantageous here.
* | Add an option for explicit BYPRODUCTS of custom commands (#14963)Brad King2014-11-141-2/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A common idiom in CMake-based build systems is to have custom commands that generate files not listed explicitly as outputs so that these files do not have to be newer than the inputs. The file modification times of such "byproducts" are updated only when their content changes. Then other build rules can depend on the byproducts explicitly so that their dependents rebuild when the content of the original byproducts really does change. This "undeclared byproduct" approach is necessary for Makefile, VS, and Xcode build tools because if a byproduct were listed as an output of a rule then the rule would always rerun when the input is newer than the byproduct but the byproduct may never be updated. Ninja solves this problem by offering a 'restat' feature to check whether an output was really modified after running a rule and tracking the fact that it is up to date separately from its timestamp. However, Ninja also stats all dependencies up front and will only restat files that are listed as outputs of rules with the 'restat' option enabled. Therefore an undeclared byproduct that does not exist at the start of the build will be considered missing and the build will fail even if other dependencies would cause the byproduct to be available before its dependents build. CMake works around this limitation by adding 'phony' build rules for custom command dependencies in the build tree that do not have any explicit specification of what produces them. This is not optimal because it prevents Ninja from reporting an error when an input to a rule really is missing. A better approach is to allow projects to explicitly specify the byproducts of their custom commands so that no phony rules are needed for them. In order to work with the non-Ninja generators, the byproducts must be known separately from the outputs. Add a new "BYPRODUCTS" option to the add_custom_command and add_custom_target commands to specify byproducts explicitly. Teach the Ninja generator to specify byproducts as outputs of the custom commands. In the case of POST_BUILD, PRE_LINK, and PRE_BUILD events on targets that link, the byproducts must be specified as outputs of the link rule that runs the commands. Activate 'restat' for such rules so that Ninja knows it needs to check the byproducts, but not for link rules that have no byproducts.
* QtAutogen: Regenerate qrc files if their input changes (#15074)Stephen Kelly2014-10-241-8/+267
| | | | | | | | | | | | | | | | | Get dependencies from the output of ``rcc --list`` if using Qt 5. Otherwise process the file in the same way as the qt4_add_resources macro. This does not work for RCC files which are generated. The cmake_autogen build step is implemented as a PRE_BUILD step of the target currently if possible, rather than a standalone custom target. This is to keep the number of (synthesized) custom targets that appear in the UI low, but in some cases it is necessary to fall back to a full custom target. Fall back to a full custom target for the VS builds if autorcc is used.
* QtAutogen: Expand rccfiles into a vector early in the autogen process.Stephen Kelly2014-10-231-6/+6
| | | | This can be re-used as a vector.
* QtAutogen: Extract a GetRccExecutable method.Stephen Kelly2014-10-231-9/+31
|
* strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-21/+21
| | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* Fix a few more places to use cmsys::[io]fstream instead of std::fstream.Clinton Stimpson2014-10-041-4/+4
|
* Merge topic 'autogen-fixes'Brad King2014-09-221-19/+25
|\ | | | | | | | | | | e3c97a19 QtAutogen: Process all ui files in a source file (#14981). b8877b1d QtAutogen: Add source files to target when only AUTORCC is used.
| * QtAutogen: Process all ui files in a source file (#14981).Stephen Kelly2014-09-181-18/+23
| | | | | | | | | | Use a vector to store a list of matched ui_ includes, instead of overwriting the previous match.
| * QtAutogen: Add source files to target when only AUTORCC is used.Stephen Kelly2014-09-171-1/+2
| | | | | | | | Add missing entry to if condition.
* | Fix memory leak of local generator detected by LeakSanitizer.Bill Hoffman2014-07-241-0/+1
| |
* | QtAutogen: Put generated qrc files in a target-specific dir.Stephen Kelly2014-04-181-2/+10
| |
* | cmTarget: Make the source files depend on the config.Stephen Kelly2014-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disallow the use of config-specific source files with the Visual Studio and Xcode generators. They don't have any way to represent the condition currently. Use the same common-config API in cmQtAutoGenerators. While it accepts config-specific files, it doesn't have to support multiple configurations yet. Loop over the configs in cmTargetTraceDependencies and cmGlobalGenerator::WriteSummary and consume all source files. Loop over the configs in cmComputeTargetDepends and compute the object library dependencies for each config.
* | cmTarget: Use string API to add sources to cmTarget objects.Stephen Kelly2014-03-311-10/+7
| | | | | | | | | | Continue to call GetOrCreateSource where necessary to create cmSourceFile objects which have the GENERATED attribute set.
* | Merge topic 'fix-Qt-Autogen'Brad King2014-03-261-4/+9
|\ \ | |/ | | | | | | | | 71a11252 QtAutogen: Fix use of multiple ui files in a single target. 261acd91 QtAutogen: Use the basename for resource files.
| * QtAutogen: Fix use of multiple ui files in a single target.Stephen Kelly2014-03-251-4/+7
| | | | | | | | | | | | Don't store a mapping of the directory to the ui file. The directory will be a unique key, allowing only one ui file to be specified. Use the source file name instead as the mapping key.
| * QtAutogen: Use the basename for resource files.Stephen Kelly2014-03-251-0/+2
| | | | | | | | | | | | | | | | | | | | The rcc tool generates a cpp file with a symbol called qInitResources or called qInitResources_${name}, if the name is passed. The qInitResources symbol clashes if multiple qrc files are used in one target. Always pass the name to ensure that the symbol is unique. This is also the behavior of the qtx_add_resource macros.
* | Merge topic 'remove-c_str-calls'Brad King2014-03-121-31/+31
|\ \ | | | | | | | | | | | | | | | | | | 3be265b3 Workaround Sun C++ 5.9 compiler crash af8a1643 Remove c_str calls when using stream APIs. 21c573f6 Remove some c_str() calls.
| * | Remove some c_str() calls.Stephen Kelly2014-03-111-31/+31
| | | | | | | | | | | | | | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* | | Merge topic 'fix-AUTOGEN-custom-command-depends'Brad King2014-03-111-0/+12
|\ \ \ | |/ / |/| / | |/ | | 112cba92 QtAutogen: Fix AUTOGEN depends on custom command output with VS.
| * QtAutogen: Fix AUTOGEN depends on custom command output with VS.Stephen Kelly2014-03-101-0/+12
| | | | | | | | | | | | | | | | Visual Studio is handled as a special case for autogen depends. However, the special handling works only for target dependencies, not file dependencies output by a custom command. Use a PRE_BUILD step only if all depends are targets.
* | stringapi: Use strings for generator namesBen Boeckel2014-03-081-1/+1
| |
* | stringapi: Use strings for directoriesBen Boeckel2014-03-081-8/+12
| |
* | stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-10/+11
| |
* | cmTarget: Refactor GetLocation APIBrad King2014-03-081-6/+6
| | | | | | | | | | | | | | | | | | When given a non-NULL configuration the GetLocation returned the location for the given configuration. When given a NULL configuration the GetLocation method returned a location with the build-system placeholder for the configuration name. Split the latter use case out into a separate GetLocationForBuild method and update call sites accordingly.
* | strings: Remove cmStdString referencesBen Boeckel2014-03-081-7/+7
| | | | | | | | | | | | | | | | | | | | | | Casts from std::string -> cmStdString were high on the list of things taking up time. Avoid such implicit casts across function calls by just using std::string everywhere. The comment that the symbol name is too long is no longer relevant since modern debuggers alias the templates anyways and the size is a non-issue since the underlying methods are generated since it's inherited.
* | stringapi: Use strings in target nameBen Boeckel2014-03-081-7/+7
| |
* | stringapi: Accept strings in cmStrCmpBen Boeckel2014-03-081-2/+2
| |
* | stringapi: Use strings for property namesBen Boeckel2014-03-081-1/+1
|/ | | | Property names are always generated by CMake and should never be NULL.
* Small typo fixKevin Funk2014-02-171-1/+1
|
* QtAutogen: Only add source files to the target if AUTORCC is ON.Stephen Kelly2014-02-051-12/+16
| | | | | | | | | | | | The qtx_add_resources() macro adds the resource file to the output list to maintain file-level dependencies. Having the qrc file in a target sources is a precondition for AUTORCC to function. When processing the source files of a target, only add the generated qrc_<file>.cpp to the target sources if AUTORCC is ON. This avoids pre-porting conflict with the macro. Reported-by: Micha Hergarden
* QtAutogen: Make uic work even when the source is in a subdir.Stephen Kelly2014-02-041-14/+20
| | | | | | Modify the includedUis to store the path to the file which includes the ui file. Reuse that path to generate the output file from the uic process.
* QtAutogen: Short-circut some logic when moc is not available.Stephen Kelly2014-01-281-3/+14
| | | | | This is the case when AUTOMOC is false. This prevents creating rules to moc the files in the absense of moc.
* QtAutogen: Separate source file processing from AUTOMOC.Stephen Kelly2014-01-281-93/+71
| | | | This will allow using AUTOUIC without using AUTOMOC for example.
* QtAutogen: Make some methods appropriately file-static.Stephen Kelly2014-01-281-34/+31
|
* QtAutogen: Fix autouic target options in the presence of a config.Stephen Kelly2014-01-281-1/+5
| | | | Read the correct variable. Add scopes to prevent escape of variables.
* QtAutogen: Remove unused variables.Stephen Kelly2014-01-281-2/+0
|
* QtAutogen: Remove read of SKIP_AUTOUIC target property.Stephen Kelly2014-01-281-7/+1
| | | | | Skipping AUTOUIC for a target is achieved by setting the AUTOUIC target property go OFF.
* QtAutogen: Use Qt 4 IMPORTED targets to find executable locations.Stephen Kelly2014-01-281-22/+36
| | | | | | | | | | | | Avoid using the moc from Qt 5 with Qt 4 based targets. Moc generates a version check to ensure that such generated code does not compile. The Qt4And5Automoc unit test should have been testing this, but it was not because the test was broken. In that unit test, moc was run on trivial files which have no significant content, and in particular no Q_OBJECT macro. Therefore moc was generating empty files which do not even contain the version check. Fix this by generating files for input to moc at cmake time.
* cmTarget: Make GetSourceFiles populate an out-vector parameter.Stephen Kelly2014-01-091-4/+8
| | | | | In a future patch, this will also be populated with extra sources from the linked dependencies.