Commit Graph

50700 Commits

Author SHA1 Message Date
Marc Chevrier ed21ad181e cmake_path: various enhancements to subcommands/keywords
This change address partly the remarks done in issue #21385
2020-11-11 23:43:51 +01:00
Brad King 8b9497e3e5 Merge branch 'release-3.19' 2020-11-11 15:22:26 -05:00
Brad King 9450ab0d23 Merge topic 'envvar_versions'
5934a6275c Help: Fix `.. versionadded` directives in environment variable docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5498
2020-11-11 15:22:26 -05:00
Brad King e23f9d8a02 Merge topic 'envvar_versions' into release-3.19
5934a6275c Help: Fix `.. versionadded` directives in environment variable docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5498
2020-11-11 15:22:26 -05:00
Nikita Nemkin 5934a6275c Help: Fix .. versionadded directives in environment variable docs
Many environment variables were documented late and got
assigned wrong versions by the script.
(The whole Help/envvar section was only added in 3.10).

Issue: #19715
2020-11-11 20:38:18 +05:00
Brad King fd8eef0341 Merge topic 'FortranCInterface-CMP0056'
15e77fbd40 FortranCInterface: Honor CMAKE_EXE_LINKER_FLAGS under CMP0056

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5483
2020-11-11 09:41:10 -05:00
Brad King f1c613edcf Merge branch 'release-3.19' 2020-11-11 09:34:17 -05:00
Brad King 5e3b0aa9b2 Merge topic 'ninja-cleandead-no-dyndep'
c5011399c5 Ninja: Avoid cleandead with dyndep bindings for Fortran module dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5490
2020-11-11 09:34:17 -05:00
Brad King b1208722c5 Merge topic 'ninja-cleandead-no-dyndep' into release-3.19
c5011399c5 Ninja: Avoid cleandead with dyndep bindings for Fortran module dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5490
2020-11-11 09:34:16 -05:00
Brad King 1379ec2ce2 Merge branch 'release-3.19' 2020-11-11 09:33:02 -05:00
Brad King 6f61b59e74 Merge topic 'android-abi' into release-3.19
a585b75df9 Android: Use NDK_KNOWN_DEVICE_ABI{32,64}S instead of NDK_DEFAULT_ABIS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5488
2020-11-11 09:33:02 -05:00
Brad King 566ad7c61e Merge topic 'android-abi'
a585b75df9 Android: Use NDK_KNOWN_DEVICE_ABI{32,64}S instead of NDK_DEFAULT_ABIS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5488
2020-11-11 09:33:02 -05:00
Brad King 7791f16cfb Merge topic 'get_filename_component-clarification' into release-3.19
c0e05671d3 Help/get_filename_component: clarify NAME_W[L]E summaries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5489
2020-11-11 09:31:55 -05:00
Brad King adfc6044db Merge branch 'release-3.19' 2020-11-11 09:31:55 -05:00
Brad King c966c71956 Merge topic 'get_filename_component-clarification'
c0e05671d3 Help/get_filename_component: clarify NAME_W[L]E summaries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5489
2020-11-11 09:31:55 -05:00
Kitware Robot e31ccdd4c4 CMake Nightly Date Stamp 2020-11-11 00:01:36 -05:00
Brad King c5011399c5 Ninja: Avoid cleandead with dyndep bindings for Fortran module dependencies
The Ninja `cleandead` tool does not account for implicit outputs
discovered by `dyndep` bindings and can remove Fortran `.mod` files that
are still needed.  Disable the `cleandead` step when using `dyndep`
bindings.

Fixes: #21406
2020-11-10 15:16:28 -05:00
Haibo Huang a585b75df9 Android: Use NDK_KNOWN_DEVICE_ABI{32,64}S instead of NDK_DEFAULT_ABIS
Revise logic from commit 1ab574a0f4 (Android: Add support for NDK r22,
2020-10-07, v3.19.0-rc1~18^2) that loads ABI tables from the NDK.

`NDK_DEFAULT_ABIS` means the abis to build by default.
Use `NDK_KNOWN_DEVICE_ABI{32,64}S` instead.

In practise they have never been different. Fix to make it more precise.
2020-11-10 11:05:36 -08:00
Ben Boeckel c0e05671d3 Help/get_filename_component: clarify NAME_W[L]E summaries
There was an ambiguity in the wording with the meaning of "or" typically
meaning exclusive-or in prose. Instead, ensure that the easiest parsing
is clear that the directory part is always removed.
2020-11-10 10:06:24 -05:00
Brad King f3af0ec814 Merge topic 'versionadded_commands'
c705279bae Help: Add `.. versionadded` directives to commands documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !5481
2020-11-10 09:44:02 -05:00
Brad King f4f3fca99f Merge topic 'android-root'
cbc51a8be3 Android: restructure android search paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: huangqinjin <huangqinjin@gmail.com>
Merge-request: !5479
2020-11-10 09:42:31 -05:00
Brad King 0d182c02f6 Merge topic 'python3.10' into release-3.19
bb2ebbf241 FindPython{Interp,Libs}: Add support for version 3.10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5482
2020-11-10 09:40:54 -05:00
Brad King 9321379d7e Merge branch 'release-3.19' 2020-11-10 09:40:54 -05:00
Brad King 781114e792 Merge topic 'python3.10'
bb2ebbf241 FindPython{Interp,Libs}: Add support for version 3.10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5482
2020-11-10 09:40:54 -05:00
Brad King 15e77fbd40 FortranCInterface: Honor CMAKE_EXE_LINKER_FLAGS under CMP0056
Policy CMP0056 determines whether `CMAKE_EXE_LINKER_FLAGS` are passed
into the test project used by the source-file signature of `try_compile`.
That affects how implicit link directories are detected, so we need to
also honor the policy for the source-directory signature of `try_compile`
used in FortranCInterface in order to get matching link directories.

Fixes: #21408
2020-11-10 09:33:27 -05:00
Kitware Robot cb5cf3f04d CMake Nightly Date Stamp 2020-11-10 00:01:10 -05:00
Miro Hrončok bb2ebbf241 FindPython{Interp,Libs}: Add support for version 3.10
Extend the change from commit 23cd98a66a (FindPython: Add support of
version 3.10, 2020-10-16, v3.19.0-rc2~25^2) to cover the legacy
`FindPython{Interp,Libs}` modules too.
2020-11-09 11:44:13 -05:00
Nikita Nemkin c705279bae Help: Add .. versionadded directives to commands documentation
This change ony concerns directives that appear in the document body.

The guidelines for inserting version directives:

 * Baseline version is CMake 3.0, i.e. directives start at 3.1.
 * Always use `.. versionadded::` directive, avoid ad-hoc version
   references. Exception: policy pages.
 * For new command signatures, put `versionadded` on a separate line
   after the signature.
 * For a group of new signatures in a new document section,
   a single version note at the beginning of the section is sufficient.
 * For new options, put `versionadded` on a separate line before
   option description.
 * If all the option descriptions in the list are short one-liners,
   it's fine to put `versionadded` on the same line as the description.
 * If multiple option descriptions in close proximity would have
   the same ..versionadded directive, consider adding a single
   directive after the list, mentioning all added options.
 * For compact value lists and sub-option lists, put a single
  `versionadded` directive after the list mentioning all additions.
 * When a change is described in a single paragraph, put
   `versionadded` into that paragraph.
 * When only part of the paragraph has changed, separate the changed
   part if it doesn't break the flow. Otherwise, write a follow-up
   clarification paragraph and apply version directive to that.
 * When multiple version directives are close by, order earlier
   additions before later additions.
 * Indent related lists and code blocks to include them in the scope
   of `versionadded` directive.

Issue: #19715
2020-11-09 20:51:57 +05:00
Brad King b754896004 Merge topic 'doc-html-lang' into release-3.19
f25e4313ac Utilities/Sphinx: Tell Sphinx that documentation is written in English

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5480
2020-11-09 10:51:08 -05:00
Brad King caed98d771 Merge branch 'release-3.19' 2020-11-09 10:51:08 -05:00
Brad King 3f60c92775 Merge topic 'doc-html-lang'
f25e4313ac Utilities/Sphinx: Tell Sphinx that documentation is written in English

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5480
2020-11-09 10:51:08 -05:00
Brad King f25e4313ac Utilities/Sphinx: Tell Sphinx that documentation is written in English
Fixes: #21409
2020-11-09 10:15:35 -05:00
Haibo Huang cbc51a8be3 Android: restructure android search paths
1. Set CMAKE_FIND_ROOT_PATH unconditionally.

Revise the implementation from commit a7f41a7ee4 (Android: Fix find_*
search order within NDK for unified toolchains, 2020-10-13).  In the old
implementation, if people set CMAKE_FIND_ROOT_PATH, CMAKE_ANDROID_NDK
won't be added to find root. And all paths added to CMAKE_SYSTEM_*_PATH
below will be rerooted to the user specified root.

2. Add api level specific library path to CMAKE_SYSTEM_PREFIX_PATH.

As the discussion in [1], some people want the paths added by
UnixPaths.cmake. They install their libraries according to
GNUInstallDirs [2].

As a result, we cannot clear CMAKE_SYSTEM_PREFIX_PATH. It includes /usr
so no matter what we specify in CMAKE_SYSTEM_LIBRARY_PATH,
/usr/lib/<arch> will be searched first.

The author also pointed out a way to solve this issue [3]. In addition
to other paths, CMake also searches <root>/<prefix> [4]. So we can add
the API specific lib path to the beginning of CMAKE_SYSTEM_PREFIX_PATH,
to have it searched first.

[1] https://android-review.googlesource.com/c/platform/ndk/+/1486800
[2] https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
[3] https://github.com/android/ndk/issues/1179#issuecomment-613435081
[4] https://gitlab.kitware.com/cmake/cmake/-/blob/11425041f04fd0945480b8f9e9933d1549b93981/Source/cmSearchPath.cxx#L202
2020-11-09 08:15:46 -05:00
Brad King 63a1917d09 Merge topic 'FindProtobuf-multiple-extensions'
2bb3c0a44b FindProtobuf: Support files with multiple extensions (#18329)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5476
2020-11-09 08:03:39 -05:00
Brad King 2b0a1180b0 Merge topic 'ninja-dyndep-refactor'
941be1d356 cmNinjaTargetGenerator: Clarify variable names for preprocessing conditions
33a8e0bb09 cmNinjaTargetGenerator: Simplify scan rule depfile selection
bff1871c39 cmNinjaTargetGenerator: Generalize GetScanRule helper
9f60e8aa52 cmNinjaTargetGenerator: Remove redundant conditions for dyndep blocks
43fe7e0c97 cmNinjaTargetGenerator: Revise conditions to clarify dyndep code paths
1416012f2c cmNinjaTargetGenerator: Clarify scan rule code grouping
f2eec04728 cmNinjaTargetGenerator: Clarify scan rule helper functions
170cfc764d cmNinjaTargetGenerator: Drop unnecessary mutation
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5478
2020-11-09 08:02:33 -05:00
Brad King b1bc99d34a Merge topic 'TestBigEndian-use-abi-result'
fcc89bda1d TestBigEndian: Re-implement using byte order detected from ABI check
412ce907a2 Tests: Prepare RunCMake.ABI cases to run more checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5477
2020-11-09 08:01:37 -05:00
Brad King d0391599a8 Merge topic 'android-flags'
94d87afece Android: allow NDK to control cflags / ldflags
85e5139aba Android: Move *_LLVM_TRIPLE to the centralized table

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5461
2020-11-09 07:58:49 -05:00
Kitware Robot eb48859594 CMake Nightly Date Stamp 2020-11-09 00:01:10 -05:00
Kitware Robot 94be747920 CMake Nightly Date Stamp 2020-11-08 00:01:06 -05:00
Kitware Robot ae488d025f CMake Nightly Date Stamp 2020-11-07 00:01:08 -05:00
Brad King 941be1d356 cmNinjaTargetGenerator: Clarify variable names for preprocessing conditions
What is important about code paths for Fortran's explicit preprocessing
is that the compilation step following it does not do preprocessing.
2020-11-06 11:51:02 -05:00
Brad King 33a8e0bb09 cmNinjaTargetGenerator: Simplify scan rule depfile selection
The depfile can always be the first output of the build statement
with a `.d` suffix added.  This approach easily avoids conflicts.
2020-11-06 11:50:38 -05:00
Brad King bff1871c39 cmNinjaTargetGenerator: Generalize GetScanRule helper
Allow the caller to provide any number of commands, and to choose which
ones get a launcher.
2020-11-06 11:43:52 -05:00
Brad King 9f60e8aa52 cmNinjaTargetGenerator: Remove redundant conditions for dyndep blocks
The GetScanCommand and GetScanBuildStatement helpers are called only in
code paths for dyndep.  Drop their checks for this condition.
2020-11-06 11:43:52 -05:00
Brad King 43fe7e0c97 cmNinjaTargetGenerator: Revise conditions to clarify dyndep code paths
All the scan-related code paths are actually about dyndep rather than
explicit preprocessing.  It just happens that the implementation for
Fortran requires explicit preprocessing.
2020-11-06 11:43:52 -05:00
Brad King 1416012f2c cmNinjaTargetGenerator: Clarify scan rule code grouping 2020-11-06 11:43:52 -05:00
Brad King f2eec04728 cmNinjaTargetGenerator: Clarify scan rule helper functions
Revise names to clarify that these helpers are for the dependency
scanning commands, which may happen to preprocess.
2020-11-06 11:43:52 -05:00
Brad King 170cfc764d cmNinjaTargetGenerator: Drop unnecessary mutation
GetPreprocessScanRule's caller always has `vars.Source` set to `$in`.
2020-11-06 11:43:52 -05:00
Brad King fcf3fc4447 cmNinjaTargetGenerator: Clarify method names 2020-11-06 11:43:52 -05:00
Brad King fe5d0849db cmNinjaTargetGenerator: Consolidate redundant methods 2020-11-06 11:43:51 -05:00