CMake Nightly Date Stamp
CMake Nightly Date Stamp
ninja: Add support for custom depfile formats

Not everything that isn't MSVC is GCC. I have support for LDC's depfile
format on its way upstream[1], but its future is uncertain. CMake should
at least support this for future depfile formats.

[1]https://github.com/martine/ninja/pull/721
CMake Nightly Date Stamp
Try harder to avoid duplicate object files with VS60.
Merge topic 'target-sources-refactor' into next

0ff680be Try harder to avoid duplicate object files with VS60.
FindPkgConfig: Stop processing when REQUIRED package not found (#14381)

Make the behavior similar to find_package.
Merge topic 'FindPkgConfig-stop-on-missing' into next

63a4c0af FindPkgConfig: Stop processing when REQUIRED package not found (#14381)
8a306d68 CMake Nightly Date Stamp
6f39a6ff CMake Nightly Date Stamp
d514e411 CMake Nightly Date Stamp
Avoid trailing space in CMAKE_*_LINKER_FLAGS when LDFLAGS is empty
Merge topic 'simplify-empty-LDFLAGS' into next

1b18f442 Avoid trailing space in CMAKE_*_LINKER_FLAGS when LDFLAGS is empty
cmTarget: Allow any generator expression in SOURCES property.

Remove use of UseObjectLibraries from Makefile and Ninja generators. It
is not needed now because those generators use GetExternalObjects
which already contains the objects from object libraries.

The VS10 generator calls both the UseObjectLibraries and the GetExternalObjects
methods. Ensure that duplicates are not created by skipping objects
from object libraries in handling of GetExternalObjects.

Similarly, fix Xcode object handling by skipping external objects from
OBJECT_LIBRARY usage as appropriate.

The error message in the BadSourceExpression1 test is now reported
by the generator expression evaluator, so it has different text.
cmComputeTargetDepends: Track object library depends.

Relieve cmGeneratorTarget of that responsibility.
cmGeneratorTarget: Compute consumed object libraries on demand.

Remove up-front object library computation from cmGlobalGenerator.

Adjust tests for message coming from the generator expression
evaluation.
cmTarget: Compute languages from object libraries on demand.
cmGeneratorTarget: Compute target objects on demand

Add a ComputeObjectMapping method to compute the object
names.  It takes mapping to populate as an out-parameter so
that it can be extended in the future with parameters
relevant to generator expression evaluation.

Remove the supporting cmGeneratorTarget::AddObject method. It is
no longer needed as the container member is populated directly.

The ComputeObjectMapping method is called whenever objects are
requested from the cmGeneratorTarget.  Because the Xcode generator
makes no such request, explicitly invoke the method from that
generator so that the logic of checking for bad sources in object
libraries is executed.

In a follow-up, the UseObjectLibraries usage may be replaced by a
true generator expression evaluator for TARGET_OBJECTS. That
will require generators to use cmGeneratorTarget::GetExternalObjects
which is not currently the case for Xcode and VS generators.
Genex: Only evaluate TARGET_OBJECTS to determine target sources.

The output of this expression may contain macros for IDEs to replace
such as $(Configuration), $(CURRENT_ARCH) etc.  To avoid generating
content which is not usable in other contexts, report an error if
there is an attempt to use it in other contexts.

This commit may be reverted in the future if a solution to the
above difference is implemented.
Merge topic 'target-sources-refactor' into next

3528f3a3 Genex: Only evaluate TARGET_OBJECTS to determine target sources.
d14c4e88 cmGeneratorTarget: Compute target objects on demand
23510bb2 cmTarget: Compute languages from object libraries on demand.
49701d13 cmGeneratorTarget: Compute consumed object libraries on demand.
3ed1e605 cmComputeTargetDepends: Track object library depends.
efed55b6 cmTarget: Allow any generator expression in SOURCES property.
cmTarget: Allow any generator expression in SOURCES property.

Remove use of UseObjectLibraries from Makefile and Ninja generators. It
is not needed now because those generators use GetExternalObjects
which already contains the objects from object libraries.

The VS10 generator calls both the UseObjectLibraries and the GetExternalObjects
methods. Ensure that duplicates are not created by skipping objects
from object libraries in handling of GetExternalObjects.

Similarly, fix VS6, VS7 and Xcode object handling by skipping
external objects from OBJECT_LIBRARY usage as appropriate.

The error message in the BadSourceExpression1 test is now reported
by the generator expression evaluator, so it has different text.
cmComputeTargetDepends: Track object library depends.

Relieve cmGeneratorTarget of that responsibility.
cmGeneratorTarget: Compute consumed object libraries on demand.

Remove up-front object library computation from cmGlobalGenerator.

Adjust tests for message coming from the generator expression
evaluation.