This code has not been compiled since commit v3.0.0-rc1~556^2 (cmake:
Split -E command implementation into separate source file, 2013-10-03).
It appears the code was never used since it was added anyway.
Files generated by `install(EXPORT)` and `export_library_dependencies()`
may be installed with packages and consumed by dependents. In order to
avoid re-building dependents only because the version of CMake changed,
drop the CMake version from the export file content.
The fix in commit commit v3.6.0-rc1~82^2 (Drop find_(library|file|path)
prefixes from PATH on non-Windows, 2016-05-09) aggressively dropped
search of the entries in PATH itself in addition to the prefixes derived
from it. This regresses find modules that (incorrectly) depended on the
behavior, including some of our own modules such as FindImageMagick.
Restore the search of entries in PATH itself. If we want to drop it
later we will need to do so with a policy. Fixes#16192.
Factor the implementation out of cmMakefileLibraryTargetGenerator
into a helper method in cmMakefileTargetGenerator so it can be
re-used elsewhere later.
Drop our `HaveExportedObjects` check before dumping exports for an
object file. It is possible for only a subset of needed symbols to have
explicit markup, and re-exporting the marked symbols does not hurt.
This leaves no callers of `HaveExportedObjects`, but leave the
method in place anyway because it may be useful in the future.
Fixes#16161.
Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to
our own implementation adopted from the KWSys auto_ptr implementation.
Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers
that do not warn about it.
Automate the client site conversions:
git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \
's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
In the `try_compile` source file signature we propagate the caller's
value of `CMAKE_<LANG>_FLAGS` into the test project. Extend this to
propagate `CMAKE_<LANG>_FLAGS_<CONFIG>` too instead of always using the
default value in the test project. This will be useful, for example, to
allow the MSVC runtime library to be changed (e.g. `-MDd` => `-MTd`).
However, some projects may currently depend on this not being done,
so we need to activate the behavior using a policy.
This change was originally made by commit v3.6.0-rc1~160^2 (try_compile:
Honor CMAKE_<LANG>_FLAGS_<CONFIG> changes, 2016-04-11) but without the
policy and so had to be reverted during the 3.6 release candidate cycle.
Fixes#16174.
Clang refuses to default initialize an instance of a class that does not
have a default constructor. Fix the check by adding default
constructors. Don't use brace initialization like it is proposed in the
error message. We want to test the override support independent from
the support for brace initialization.
Revert commit v3.6.0-rc1~160^2 (try_compile: Honor
CMAKE_<LANG>_FLAGS_<CONFIG> changes, 2016-04-11). The behavior it
introduced can break projects that depend on the lack of such behavior.
We will have to introduce a policy or other mechanism to enable the
behavior in a compatible way. Simply revert it for now.
See issue #16174.
059a6ca0 Merge branch 'unknown-aliased-target' into compiler-features
1d6909a2 use CM_NULLPTR
b4b73f56 cxx features: add check for nullptr
a7a92390 mark functions with CM_OVERRIDE
9e2d6f0c CM_OVERRIDE: mark destructor overridden in the feature test.
2ca76a66 Validate target name in ALIASED_TARGET property getter
This is important for two reasons:
1. A compiler might warn about a class that has a virtual member
function but no virtual destructor. We don't want to treat the feature
as incomplete in this case.
2. MSVC10 supports the override identifier except on destructors. In
this case, the feature really is incomplete and we want to detect it as
such.
In commit v3.6.0-rc1~174^2 (Ninja: Honor CMAKE_NINJA_FORCE_RESPONSE_FILE
for compile rules, 2016-04-06), Ninja learned to look for
`CMAKE_NINJA_FORCE_RESPONSE_FILE` in the current scope or the
environment in order to force response file usage for all compilation
rules.
However, on Windows, the RC compiler goes through cmcldeps which does a
`replace(output, output + ".dep.obj")` on the command line. However,
with a response file (which we name `output + ".rsp"`), the response
file path is replaced instead causing the compiler to (correctly)
complain that the response file `output + ".dep.obj.rsp"` does not
exist.
What needs to happen is for cmcldeps to look through the response file,
replace *its* contents and place it in the `output + ".dep.obj.rsp"`
file.
Also add a test which actually compiles an RC file into a library and
executable for all generators on Windows and additionally test
`CMAKE_NINJA_FORCE_RESPONSE_FILE` for Ninja generators.
Fixes#16167.
7647f6af Add CM_OVERRIDE to some functions
5286110d cxx features: add check for override
09aa2c94 Use <unordered_set> where available
ea5477e4 Make C++ feature checks extensible
Run clang-tidy's modernize-use-override checker. This checker must have
issues in version 3.8. It has way too little matches. And it adds
override to destructors. Revert the changes on the destructors and
change override to CM_OVERRIDE.
Turn the feature check for cxx11_unordered_map into a function such that
we can use it for other features as well. Drop the 11 suffix, as we may
want to check features from other standards.
Refactoring in commit 49f10f0d (cmGeneratorTarget: Adopt Fortran module
directory generation, 2016-06-10) accidentally made a local variable
declared `static` causing results to be re-used incorrectly.
Remove the 'optional' paramenter from the second overload of the Convert
function. This parameter is used from one single location. Inline the
codepath for which the argument is true to the callsite.
The cmDependsJavaParserHelper tries to implement a "deep copy" in the
assignment operator of the internal class CurrentClass. To do that, it
uses std::copy and std::back_inserter. The copy constructor is
implemented in terms of the assignment operator but it does not
initialize the member NestedClasses, a pointer to vector. This pointer
is dereferenced in the assignment operator. Change the pointer to a
value and rely on the compiler generated special functions.
This property allow to specify a specific Visual Studio tool for a
source file overriding the default tool behavior. For example, a
`.resw` file being processed as a `PriResource` file. This has the
advantage of being able to teach CMake to process new file types without
code modifications.