e7714235 Get the local generator from the GeneratorTarget.
5aa556be cmMakefileTargetGenerator: Require cmGeneratorTarget.
bb88668a cmNinjaGenerator: Require cmGeneratorTarget.
a3b210fd cmGeneratorTarget: Require a cmLocalGenerator to construct.
8ec60c67 cmGlobalGenerator: Create GeneratorTargets with a local generator.
dee197fe GHS: Use a cmGeneratorTarget in generator API.
b2b41b83 cmGeneratorTarget: Add accessor for cmLocalGenerator.
2e9333a1 C::B: Get the Makefile from the LocalGenerator, not vice-versa.
In commit v3.2.0-rc1~480^2 (QtAutogen: Regenerate qrc files if their input
changes, 2014-09-17) the "cmake -E cmake_autogen" rule was switched from
always running to running as a custom command with dependencies if rcc
is enabled. This is not correct because automoc always needs to re-run.
Switch back to always running the command.
8dc3a67c cmMakefile: Out-of-line the directory methods.
0f3c8cfa cmMakefile: Use method abstraction to access directories.
b288a997 cmMakefile: Rename SetStart* directory API to SetCurrent*.
932d53bc cmMakefile: Remove redundant method duplication.
32b8f03a cmMakefile: Port users of GetStart* methods to new names.
54d6a918 cmMakefile: Rename GetCurrent{Output,Binary}Directory.
55d80d0a cmMakefile: Rename GetCurrent{,Source}Directory.
b23cf06f cmake: Remove redundant start directories.
fcf246ac cmMakefile: Populate Home directories on initialize.
8878bea7 cmake: Initialize Home directories on cmake for find-package mode.
044dc815 Use the Home directories from the cmake class where intended.
d67e8f24 cmake: Fix directory used to find the cache
1ea085d1 cmMakefile: Initialize dir definitions early.
f034bb2f Remove redundant calls to MakeStartDirectoriesCurrent.
3a68c323 cmMakefile: Fix wrong parameter names.
The stderr may have warning messages. We should not treat these lines
as resource files. However, we must still recognize error message lines
for missing resource files that may be generated.
Extend the QtAutogen test to cover a generated resource as the only one
listed in a .qrc file. This causes 'rcc --list' to print a warning to
stderr that we now intend to ignore.
Extend the RunSingleCommand signature to capture stdout and stderr
separately. Allow both to be captured to the same std::string
to preserve existing behavior. Update all call sites to do this
so that this refactoring does not introduce functional changes.
e8fdd5f1 QtAutogen: Workaround rcc CRCRLF newlines on Windows (#15459)
15f1a6b4 Tests/QtAutogen: Avoid touching files in the source tree
3f7c7c65 Tests/QtAutogen: Help Qt5Autogen test find Qt5 on Windows
26b5cc5e Tests/QtAutogen: Enable per-config source tests when possible
45566408 Tests/QtAutogen: Require CMake 3.1 to set policies everywhere
The 'rcc --list' operation may print newlines of the form CRCRLF,
so strip any trailing CR characters found on each line.
Update the Tests/QtAutogen test to use a resource named in a
subdirectory. This causes 'rcc --list' to display a blank line
and tests that it is correctly filtered out.
The rcc outputs are byproducts of the cmake_autogen rule, not outputs.
We still must run cmake_autogen on every run even if the rcc outputs
exist. Ninja requires explicit byproduct specification, which is now
possible in CMake since commit v3.2.0-rc1~340^2~2 (Add an option for
explicit BYPRODUCTS of custom commands, 2014-11-13). Revise the logic
introduced by commit v3.2.0-rc1~480^2 (QtAutogen: Regenerate qrc files
if their input changes, 2014-09-17) to specify byproducts explicitly.
55a73e6b Use the cmJoin algorithm where possible.
8dc8d756 cmStandardIncludes: Add a join algorithm for string containers.
b5813cee cmInstallCommand: Remove unused variable.
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.
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.