Add policy CMP0058 to avoid generating 'phony' ninja rules for unknown
custom command dependencies. This requires projects to specify their
custom command byproducts explicitly. With this requirement we no
longer have to assume that unknown custom command dependencies are
generated and can instead simply assume they are source files expected
to exist when the build starts. This is particularly important in
in-source builds. It is also helpful for out-of-source builds to allow
Ninja to diagnose missing files before running custom command rules that
depend on them.
Teach WriteUnknownExplicitDependencies to take ownership of the set of
WriteBuild outputs immediately since no other methods need the data.
This avoids re-inserting the whole set into another already populated
set.
GLOB lists directories by default and GLOB_RECURSE does not.
LIST_DIRECTORIES enables user to control the behavior explicitly for
consistently for both GLOB and GLOB_RECURSE.
The phony rules added by commit v2.8.12~248^2 (Ninja: Custom Command
file depends don't need to exist before building, 2013-06-07) are
circular, e.g.
build side-effect: phony side-effect
This is not diagnosed by Ninja as of version 1.5, but the dependency
does not make sense. Simply drop it and use phony rules of the form
build side-effect: phony
instead.
Reported-by: Daniel Dunbar
Any environment vars that were configured for a test via the
ENVIRONMENT property will now be output when the test is run
with verbose logging enabled.
ec428faf Genex: Extend cmGeneratorExpressionContext constructor.
082b6a9d Genex: Split cmGeneratorExpressionContext into own file.
9df1f0fc Genex: Split cmGeneratorExpressionNode into own file.
80b9f0cb Genex: Extract an evaluateWithContext method.
642048ce Help: Move docs of $<0:...> and $<1:...> to output section.
8701a3f4 cmRemoveDuplicates: Partially specialize the API for pointer types.
eec7091d cmRemoveDuplicates: Type-parameterize all uniq-operations
7cbafa8c cmRemoveDuplicates: Store unique iterators instead of values.
95dd238f cmRemoveDuplicates: Fix iterator -> const_iterator.
4448f175 cmInstalledFile: Move Property implementation out of line.
7916d7ba Include cmAlgorithms where it is used.
If de-duplicating a container of pointers, there is no need to
store iterators to them, as that is just more 'pointer chasing'.
Store the pointers themselves and use API which compares the pointers
in the specialization.
There is no need to copy all of the values in the container in
order to determine uniqueness. Iterators can be stored instead
and can be used with standard algorithms with custom comparison
methods.
This also means that we use less space in case the value_type size
is greater than sizeof(iterator). That is common for std::string
which may require up to 32 bytes (libstdc++ 5.0 and MSVC at least).
With libstdc++ 4.9 and older, std::string is 8 bytes, so we likely
don't gain anything here.
Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
232a6883 Help: Add release notes for target-language-genex.
9e168941 File(GENERATE): Process genex evaluation files for each language.
b734fa44 Genex: Allow COMPILE_LANGUAGE when processing include directories.
0b945ea9 Genex: Allow COMPILE_LANGUAGE when processing compile definitions.
5c559f11 Genex: Enable use of COMPILE_LANGUAGE for compile options.
e387ce7d Genex: Add a COMPILE_LANGUAGE generator expression.
4a0128f4 VS6: Compute CMAKE_*_FLAGS and COMPILE_DEFINITIONS* only when needed
VCExpress does not produce output if its pipes are connected to
an interactive terminal. Add a special case to 'cmake --build'
to capture the output through a pipe and re-print it instead of
sharing output pipes with VCExpress.
Due to a difference in how AdditionalOptions are implemented in the
Fortran component of VS and the C/C++ component, flags that are not
listed in the flag table are at risk of being overwritten.
The unknown argument warning added by commit v3.2.0-rc1~452^2
(configure_file: Warn about unknown arguments, 2014-10-31) failed to
account for options handled by the NewLineStyle member instead of
directly in the main loop. Simply whitelist them for now.
In commit v3.2.0-rc1~272^2~2 (Makefile: Fix rebuild with multiple custom
command outputs, 2014-12-05) we changed the generated makefile pattern
for multiple outputs from
out1: depends...
commands...
out2: out1
to
out1 out2: depends...
commands...
This was based on the incorrect assumption that make tools would treat
this as a combined output rule and run the command(s) exactly once for
them. It turns out that instead this new pattern is equivalent to
out1: depends...
commands...
out2: depends...
commands...
so the commands may be run more than once.
Some documents suggest using a "dedicated witness" stamp file:
stamp: depends...
rm -f stamp
touch stamp.tmp
commands...
mv stamp.tmp stamp
out1 out2: stamp
However, if the commands fail the error message will refer to the stamp
instead of any of the real outputs, which may be confusing to readers.
Also, this approach seems to have the same behavior of the original
approach that motiviated the above commit: multiple invocations are
needed to bring consumers of the outputs up to date.
Instead we can return to the original approach but add an explicit
touch to each extra output rule:
out1: depends...
commands...
out2: out1
touch -c out2
This causes make tools to recognize that all outputs have changed and
therefore to execute any commands that consume them.
Preserve all but the last extension when generating .wixobj output
filenames from source files and make sure they are unique.
Output .wixobj files in cpack staging area instead
of the current working directory.
Rename the example jacoco.xml file to be jacoco.xml.in to stop CMake
from apptempting to calculate Jacoco Coverage when running over itself.
Enclose a push of -1 to the coverage vector to only happen if there is a
fin to calculate for. This prevents a crash if the target file doesn't
exist.
This should allow the consuming IDE to determine which target specific
preprocessor definitions and include directories are relevant for a
given source file.
This fixes RunCMake.(Configure|configure_file|try_compile) test
failures that failed to match empty stderr due to jom printing
its identification line.
d1082448 Tests: Extend RunCMake.CommandLine to cover 'cmake --build' for 'ninja -v'
ce935ebe cmake: Teach --build to honor CMAKE_VERBOSE_MAKEFILE for Ninja