Policy CMP0026 deprecated the LOCATION property, and we have long
provided a $<TARGET_FILE:...> generator expression. However, if
a project tries to use $<TARGET_PROPERTY:...,LOCATION> we should
at least not crash.
The compatibility implementation of the LOCATION property uses
cmGlobalGenerator::CreateGenerationObjects to create the structures
needed to evaluate the property before generation starts. The
implementation assumed that accessing the property could only be done
during configuration (via the typical get_property command use case).
The $<TARGET_PROPERTY:...,LOCATION> genex causes the LOCATION property
to be accessed during generation. Calling CreateGenerationObjects
during generation blows away all the objects currently being used for
generation and is not safe. Add a condition to call it only when
configuration is not finished.
If e.g. libc.a is passed before any objects the linker raises the follwing
warning: cannot resolve archive libc.a to a compatible library, as no
input files have been encountered
In the end the library is skipped and missing symbols occur.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Move all development release notes into a new version-specific document:
tail -q -n +3 Help/release/dev/* > Help/release/3.6.rst
git rm -- Help/release/dev/*
except the sample topic:
git checkout HEAD -- Help/release/dev/0-sample-topic.rst
Reference the new document from the release notes index document.
Add a title and intro sentence to the new document by hand.
d4e58dd9 CTestCustom: Suppress scanbuild warning on unsigned left shift
154fa2c5 CTestCustom: Suppress warnings about rand() on OpenBSD
e4a361bb CTestCustom: Suppress Windows manifest unrecognized element warning
The Clang scanbuild tool warns:
Utilities/cmliblzma/liblzma/simple/x86.c:106:23: warning:
The result of the '<<' expression is undefined
src = dest ^ ((1u << (32 - i * 8)) - 1);
~~~^~~~~~~~~~~~~~~
AFAIK overflow of a left shift on an unsigned type is well-defined.
We first suppressed this in commit v3.1.0-rc1~647^2 (CTestCustom:
Suppress warnings about rand() and srand() on OpenBSD, 2014-04-12).
Add another variant of the warning wording.
Our `cmake.version.manifest` file uses a "compatibility" element for
Windows 10 support. Older MS tools warn about it being unknown, so
suppress the warning.
Use clang-tidy's performance-unnecessary-copy-initialization checker.
After applying the fix-its (which turns the copies into const&), revise
the changes and see whether the copies can be removed entirely by using
the original instead.
Use clang-tidy's performance-unnecessary-value-param checker to find
value parameter declarations of expensive to copy types that are not
modified inside the function. Ignore findings in kwsys.
After applying the fix-its, manually change `const T&` to `T const&`.
d256ba07 try_compile: Optionally forward custom platform variables to test project
fb4791b3 cmCoreTryCompile: Refactor forwarding of variables to test project
OS X supports using the SDK for any version equal to or newer than
the deployment target. There is no reason to warn if the versions
do not match exactly.
Suggested-by: James Burgess <jamesrburgess@mac.com>
Suggested-by: Clinton Stimpson <clinton@elemtech.com>
Add a `CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` variable to specify a list
of custom variables to be forwarded to a `try_compile` test project.
This will be useful for platform information modules or toolchain files
to forward some platform-specific set of variables from the host project
(perhaps set in its cache) to the test project so that it can build the
same way.
De-duplicate the logic that constructs the cmake `-D` flag used to pass
variables into the test project cache. Also subsume variables that were
propagated by generating `set()` commands in the project and pass them
as cache entries instead.