| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
When `CMP0053` is not set to OLD or NEW then we compute both variants
in case we need to warn about a behavior change. Do not allow both
code paths to produce an uninitialized variable warning.
Fixes: #18552
|
| |
|
|
|
|
|
|
|
|
|
| |
Before this change, install rules created by add_subdirectory()
would be executed after all of the top-level install rules, even
if they were declared before the top-level rules. This change
adds a new policy, CMP0082, which interleaves the add_subdirectory()
install rules with the other install rules so they are run in the
correct order.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
These new capabilities enable to manage link directories
Two new properties:
* target properties: LINK_DIRECTORIES and INTERFACE_LINK_DIRECTORIES
One new command
* target_link_directories(): to populate target properties
Fixes: #17215
|
|\
| |
| |
| |
| |
| |
| | |
0c709cb2a2 Add deprecation warnings for policies CMP0063 and below
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2397
|
| |
| |
| |
| |
| |
| | |
The OLD behaviors of all policies are deprecated, but only by
documentation. Add an explicit deprecation diagnostic for some policies
to encourage projects to port away from setting policies to OLD.
|
|\ \
| |/
|/|
| |
| |
| |
| | |
f4ff60a803 cmMakefile: Make GetSafeDefinition return std::string const&
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2350
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
a1ad0a699b target_link_libraries: Allow use with targets in other directories
9bbae5ae28 cmTarget: Future-proof AddLinkLibrary target lookup scope
f9cb6f618a cmExportFileGenerator: Use cmGeneratorTarget::ResolveTargetReference
18441a6269 cmGeneratorTarget: Factor target name resolution out of link item resolution
2f708f5d65 Make internal TARGET_PROPERTY generator expressions more robust
94a75801c8 Android.mk: De-duplicate link libraries logic during export
8a63b23d16 cmGlobalGenerator: Remove unused FindLocalGenerator method
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Patrick Stotko <stotko@cs.uni-bonn.de>
Merge-request: !2370
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously the command did not allow naming targets on the LHS that
were not created in the calling directory. Lift this restriction to
enable more flexible use by projects.
Targets named on the RHS will need to be looked up during generation in
the scope of the call site rather than the scope of the LHS target.
Introduce an internal syntax in `[INTERFACE_]LINK_LIBRARIES` properties
to specify target names that need to be looked up in a directory other
than that containing the target on which the property is set. Add
minimal documentation of the syntax to help users that encounter it.
Unfortunately CMake previously did allow such calls in the case that
only `INTERFACE` libraries are specified, but those libraries would be
looked up in the target's directory rather than the caller's. Add
policy `CMP0079` to enable the new behavior with new lookup scope in a
compatible way.
Fixes: #17943
|
|/ |
|
|\
| |
| |
| |
| |
| |
| | |
437d0c16c7 cmStateSnapshot::GetDefinition(): Return std::string const*
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2356
|
| |
| |
| |
| | |
Expose std::string type used internally in cmDefinitions instead of const char*
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
4d89830d71 cmMakefile: Make GetRequiredDefinition return std::string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2347
|
| |/
| |
| |
| |
| |
| |
| | |
In all cases the return value is converted to std::string anyway.
Also remove unnecessary `c_str()` calls in arguments to
`GetRequiredDefinition`.
|
|/
|
|
| |
Use the new IsOn(),IsOff() overloads.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
6646771b0f project: Do not issue CMP0048 warnings on injected call
08eb157c03 Tests: Add case showing CMP0048 warning on injected project command
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2235
|
| |
| |
| |
| | |
Fixes: #18202
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
This family enable to manage link flags
Three new properties:
* directory property: LINK_OPTIONS
* target properties: LINK_OPTIONS and INTERFACE_LINK_OPTIONS
Two new commands
* add_link_options(): to populate directory property
* target_link_options(): to populate target properties
Fixes: #16543
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`. Use `clang-format` version 6.0.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
|
|\
| |
| |
| |
| |
| |
| |
| | |
1ab3881ec9 cmake: Add options for parallel builds to --build mode
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Henry Schreiner <henryschreineriii@gmail.com>
Merge-request: !1962
|
| |
| |
| |
| |
| |
| |
| | |
While we already support `cmake --build . -- -j`, the options after `--`
are specific to the native build tool. Add new options `--parallel
[<N>]` and `-j [<N>]` to abstract this and map to the proper option
for the native build tool.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Store both the as-written and lower-case command names and use
the latter to avoid case-insensitive string comparisons.
With this I obtain 2-6% speed increase (on Windows) for the configure
step with no significant changes in memory usage. A case-insensitive
comparison is a lot slower than just calling `==` because the operator
will use things like memcmp, so prefer the latter.
The `cmSystemTools::LowerCase` function allocates a new string each time
it is called, so before this change we were allocating in:
* cmMakefile::Configure two times for each function
(to look for `cmake_minimum_required` and `project`)
* cmMakefile::ExecuteCommand twice by function by calling
cmState::GetCommand and copying the name
Now we are only allocating once by function instead of four.
|
|
|
|
|
|
| |
The two-argument forms of `AddDefineFlag` and `RemoveDefineFlag`
need no access to `cmMakefile` class members. They are used only
within the implementation file.
|
|
|
|
|
| |
Return `std::string const&` instead of a `const char*` that points
into a string anyway. Update call sites accordingly.
|
|\
| |
| |
| |
| |
| |
| | |
60cb75e4a1 Fix CMAKE_DISABLE_SOURCE_CHANGES recognition of top of build tree
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2001
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The change in commit v3.11.0-rc1~480^2 (UseJava: add_jar OUTPUT_DIR
option used only for jar generation, 2017-10-12) added code of the form
`file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR})`. This exposed an existing
bug in `CMAKE_DISABLE_SOURCE_CHANGES` in which it does not recognize
that the top of the build tree itself is in the build tree. Fix that
now.
Fixes: #17933
|
| |
| |
| |
| |
| |
| |
| | |
This command manages preprocessor definitions at directory level and
supports generator expressions.
Fixes: #15374
|
| |
| |
| |
| |
| |
| | |
Policies affecting the behavior of CMake-provided macros and functions
need to be able to get the policy setting as of the call site rather
than the definition site. Add an undocumented option to do this.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
65198cfd0f variable_watch: trigger on variables set via PARENT_SCOPE
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1948
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Make sure that we also trigger variable watches when a variable
is set in the parent scope.
Fixes: #17827
|
|\ \ \
| |/ /
|/| /
| |/
| |
| |
| | |
aad360eb3d Fix crash with --trace-expand --warn-uninitialized together
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1944
|
| |
| |
| |
| |
| |
| |
| |
| | |
Some code paths in `ExpandVariablesInString{New,Old}` were not checking
the `filename` parameter for a null pointer, but this can happen when
using the above flags together. Add the checks and a test case.
Fixes: #17896
|
| |
| |
| |
| |
| | |
Normally they are sanitized by the `link_directories` command before
populating the property, but projects may set the property directly.
|
| |
| |
| |
| | |
Issue: #17849
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
45408b5ea1 cmake_minimum_required: Optionally set policies with version range
6a41aa2abd cmPolicies: Split parsing and impl of ApplyPolicyVersion
1d00ed7cf7 cmPolicies: Drop unnecessary check from ApplyPolicyVersion
0df559832b cmPolicies: Pass policy version as std::string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1864
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Teach `cmake_minimum_required` and `cmake_policy(VERSION)` to support a
version range of the form `<min>[...<max>]`. Define this to mean that
version `<min>` is required, but known policies up to those introduced
by `<max>` will be set to `NEW`. This will allow projects to easily
specify a range of versions for which they have been updated.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Policy `CMP0074` was added by commit eb35d8884b (find_package: Use
PackageName_ROOT variables as search prefixes, 2018-03-15). Revise the
logic to avoid warning when a `PackageName_ROOT` variable is set to
empty since that won't change the search behavior. Also, when we do
warn include the variable value(s) for reference.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This feature was originally added by commit v3.9.0-rc1~71^2~2 (find_*:
Add a new PackageRoot search path group, 2017-05-03) and documented by
commit v3.9.0-rc1~71^2 (find_*: Add docs for PackageRoot search path
group, 2017-05-03). However, we had to disable the feature and remove
the documentation in commit v3.9.1~2^2 (find_*: Disable the PACKAGE_ROOT
search path group for CMake 3.9, 2017-08-08) due to breaking projects
that used `PackageName_ROOT` variables themselves.
Add policy `CMP0074` to restore the `PackageName_ROOT` variable behavior
in a compatible way. Also revise the stack of root paths to store the
paths themselves rather than the package names. This way the policy can
be considered at the `find_package` call site instead of individual
`find_` calls inside a find module.
Co-Author: Chuck Atkins <chuck.atkins@kitware.com>
Issue: #17144
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
5901699672 cmDepends: Remove attempt to change directory that always fails
e60e4dfc88 cmWorkingDirectory: Check success of current dir changes
e654622aee Tests: Add --build-and-test test case
a865f0beb2 Tests: Confirm test working dir set successfully
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1817
|
| | | |
|
|/ /
| |
| |
| | |
We don't need to pass an argument with the target's own name.
|
| |
| |
| |
| |
| |
| |
| | |
Store "Known" files separately in KnownFileSearchIndex. This avoids
creating the rather expensive cmSourceFileLocation object for source
files that are already known. For large projects this results in a
factor 3-4 speedup of cmGlobalGenerator::Compute().
|
|/
|
|
| |
Implements: #17680
|
|
|
|
|
|
|
|
|
|
| |
* Change some functions to take `std::string` instead of
`const char*` in the following classes: `cmMakeFile`, `cmake`,
`cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator`
and a few others.
* Greatly reduce using of `const char*` overloads for
`cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`.
* Remove many redundant `c_str()` conversions throughout the code.
|
|
|
|
|
| |
- Use `std::move` while inserting temporary results into vectors.
- Change `push_back` to `emplace_back` where appropriate.
|