Commit Graph

51778 Commits

Author SHA1 Message Date
Brad King 17d4138108 Merge topic 'AddFileDependencies-simplify'
0f6fc388ea AddFileDependencies: Avoid leaking temporary variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5779
2021-02-08 12:22:23 -05:00
Anakin Skywalker 0f6fc388ea AddFileDependencies: Avoid leaking temporary variable
Convert `add_file_dependencies` to a function.
Simplify the implementation using `set_property` with `APPEND`.
2021-02-08 12:21:43 -05:00
Brad King 326cceaafc Merge topic 'cmake_library_architecture_better_multiarch_support'
657fc3a9a7 CMakeDetermineCompilerABI: Parse library arch from versioned paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5773
2021-02-08 12:05:07 -05:00
Brad King 4b406ead2a Merge topic 'FindGit-version-optimization-more'
c99dfd7be7 FindGit: Cache the version more effectively

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5774
2021-02-08 12:04:17 -05:00
Brad King 24e465a550 Merge topic 'doc-genex-links'
5dd356cefc Help: Convert some genex names to explicit cross-references

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5778
2021-02-08 12:00:22 -05:00
Brad King 7b10c6e299 Merge topic 'parser-gcc-warning'
aac80ec1ee LexerParser: Suppress gcc -Wfree-nonheap-object warnings in generated code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Christoph Grüninger <foss@grueninger.de>
Merge-request: !5775
2021-02-08 11:58:28 -05:00
Brad King 76e0f6cf33 Merge branch 'release-3.18' 2021-02-08 11:45:00 -05:00
Brad King 2c12331484 Merge branch 'release-3.19' 2021-02-08 11:44:16 -05:00
Brad King f61321bedf Merge topic 'lexer-posix-source'
a8b41e2c68 LexerParser: Do not override existing _POSIX_C_SOURCE definition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5776
2021-02-08 11:44:16 -05:00
Brad King 58167b3eb0 Merge topic 'lexer-posix-source' into release-3.19
a8b41e2c68 LexerParser: Do not override existing _POSIX_C_SOURCE definition
82cfeeb484 Merge branch 'backport-3.18-ci-wix-download' into release-3.18

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5776
2021-02-08 11:44:15 -05:00
Kitware Robot b06a480b57 CMake Nightly Date Stamp 2021-02-08 00:04:15 -05:00
Kitware Robot db0a734349 CMake Nightly Date Stamp 2021-02-07 00:01:07 -05:00
Kitware Robot 51f7d7e919 CMake Nightly Date Stamp 2021-02-06 00:01:19 -05:00
Brad King 5dd356cefc Help: Convert some genex names to explicit cross-references
Since commit c2dc7e0f53 (Help: Convert genex documentation to sphinx
domain objects, 2021-01-15) we can use `:genex:` cross-references to
link to named generator expressions.  Update some places to do this.

This is meant to demonstrate the capability, not as a comprehensive
sweep.
2021-02-05 16:05:25 -05:00
Brad King 93e077eda4 Merge branch 'lexer-posix-source' into release-3.18
Merge-request: !5776
2021-02-05 07:45:46 -05:00
Brad King a8b41e2c68 LexerParser: Do not override existing _POSIX_C_SOURCE definition
In commit f034b0f663 (CMake compilation: do not use compiler extensions,
2020-03-14, v3.18.0-rc1~494^2) we explicitly defined `_POSIX_C_SOURCE`
to ensure availability of POSIX APIs even when compiler extensions are
not enabled.  Update the code to avoid redefining `_POSIX_C_SOURCE` if
it is already defined.  This occurs when building our release binaries
as configured in `Utilities/Release/linux`, where we define
`_POSIX_C_SOURCE` explicitly on the compiler command line.
2021-02-05 07:43:59 -05:00
Brad King acb33d0904 Merge topic 'fetchcontent-performance'
17e5516e60 FetchContent: Invoke steps directly and avoid a separate sub-build
4f3d1abbb4 ExternalProject: Refactor pre-configure steps to support no-target uses
23aab9ecce ExternalProject: Avoid scanning docs for keywords, use include_guard()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Acked-by: Michael Hirsch, Ph.D. <michael@scivision.dev>
Acked-by: Lars Melchior <lars.melchior@gmail.com>
Merge-request: !5749
2021-02-05 07:01:05 -05:00
Brad King 2c2eb777f4 Merge topic 'build-test-presets'
9b5289ebd8 Help: Add release note for build and test presets
c8a5cd6871 Tests: Update RunCMake/CMakePresets --list-presets
69a5cf23a2 Tests: Update RunCMake/CommandLine BuildDir
b500935b94 Tests: Add test preset tests
74a86566f0 Tests: Add build preset tests
56751c83aa Tests: Factor out RunCMake.CMakePresets schema validation
676ecf0d37 cmake-presets: Add build and test presets
4f4f2028b8 Help: Add documentation for buildPresets and testPresets
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5681
2021-02-05 06:57:28 -05:00
Brad King cb282b2433 Merge branch 'release-3.19' 2021-02-05 06:55:37 -05:00
Brad King 07ca40408a Merge topic 'doc-find-env-vars'
c40e81ce80 Help: Restore docs that find_library considers LIB, not INCLUDE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5772
2021-02-05 06:55:37 -05:00
Brad King f0257a87a3 Merge topic 'doc-find-env-vars' into release-3.19
c40e81ce80 Help: Restore docs that find_library considers LIB, not INCLUDE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5772
2021-02-05 06:55:36 -05:00
Brad King aac80ec1ee LexerParser: Suppress gcc -Wfree-nonheap-object warnings in generated code 2021-02-05 06:48:44 -05:00
Craig Scott c99dfd7be7 FindGit: Cache the version more effectively
In 315a200f0c (FindGit: Cache the GIT_EXECUTABLE version for the
current run, 2021-01-20), the GIT_VERSION_STRING was meant to be
cached after the first time it was computed for a given GIT_EXECUTABLE
location. That logic assumed GIT_VERSION_STRING would be visible in
the current scope, but it might not be. The global property alone is
enough to check whether the version has been determined previously,
so don't switch the logic based on whether GIT_VERSION_STRING is
defined or not.

Relates: #21703
2021-02-05 21:45:00 +11:00
Kitware Robot 80a7d2b14b CMake Nightly Date Stamp 2021-02-05 00:01:17 -05:00
Craig Scott 17e5516e60 FetchContent: Invoke steps directly and avoid a separate sub-build
The cost of setting up and executing a separate sub-build to do the
download, update and patch steps required for FetchContent population
can be significant with some platforms and CMake generators. Avoid the
sub-build altogether by invoking the step scripts directly.

Previously, if no generator was set (e.g. population was being done in
script mode), a generator needed to be available on the default PATH.
Since we no longer use a sub-build, this restriction is also now gone.

Fixes: #21703
2021-02-05 07:33:38 +11:00
Craig Scott 4f3d1abbb4 ExternalProject: Refactor pre-configure steps to support no-target uses
The mkdir, download, update and patch steps are used by
FetchContent during the configure phase of the main build. Because
these steps need a target, this has so far required a sub-build to be
set up. The changes here factor out the preparation of the scripts
from the creation of the targets, allowing future work to leverage these
steps without a sub-build (see #21703).

As part of the refactoring, some rationalisation of the stamp files,
repository info files and script names was done to make things more
consistent between download methods and step implementations.
Every download method now records its own specific repository info
in a file and that file is a dependency of the download step. The source
directory is also written to that file, so if the SOURCE_DIR changes, the
download will be retriggered (the existing implementation fails in this
scenario). Each download method now also has just one driver script
that implements the whole step (it may pull in other scripts to do its
task though). The patch step gained support for USES_TERMINAL as
a result of generalising the implementation for custom commands.

Fixes: #21748
2021-02-05 07:33:38 +11:00
Robert Maynard 657fc3a9a7 CMakeDetermineCompilerABI: Parse library arch from versioned paths
Teach CMake how to extract `CMAKE_<LANG>_LIBRARY_ARCHITECTURE` from
versioned paths such as `/usr/lib/gcc/x86_64-linux-gnu/9`. These kind of
paths are generated by NVHPC compilers.
2021-02-04 15:17:49 -05:00
Brad King 9b5289ebd8 Help: Add release note for build and test presets 2021-02-04 11:39:55 -05:00
Sam Freed c8a5cd6871 Tests: Update RunCMake/CMakePresets --list-presets 2021-02-04 11:39:55 -05:00
Sam Freed 69a5cf23a2 Tests: Update RunCMake/CommandLine BuildDir 2021-02-04 11:39:55 -05:00
Sam Freed b500935b94 Tests: Add test preset tests 2021-02-04 11:39:52 -05:00
Sam Freed 74a86566f0 Tests: Add build preset tests 2021-02-04 11:39:19 -05:00
Sam Freed 56751c83aa Tests: Factor out RunCMake.CMakePresets schema validation
Make it available to similar tests.  Also fix whitespace
in generated error message.
2021-02-04 11:00:42 -05:00
Brad King c40e81ce80 Help: Restore docs that find_library considers LIB, not INCLUDE
Documentation updates in commit 02f527c66a (Find: Provide global
controls for the `NO_[]_PATH` call options, 2019-06-12,
v3.16.0-rc1~541^2) accidentally switched the `find_library`
documentation to mention `INCLUDE` where it should be `LIB`.

While at it, update `find_file` and `find_path` to mention
`INCLUDE` and `PATH` in the order they are considered.
2021-02-04 09:09:25 -05:00
Brad King 67cb006732 Merge topic 'aix-xcoff-edit'
e017ba046c AIX: Enable XCOFF editing to replace RPATH on installation
56fc4a325f cmXCOFF: Add helper to parse and edit the XCOFF binary format
ddaaee907d CMakeDetermineCompilerId: Recognize XCOFF executable format
69e1d95a8a Tests: Add sample XCOFF binaries
f79d991dfd Tests: Convert CMake.ELF to RunCMake.file-RPATH ELF case
d8f3e68ca9 Ninja Multi-Config: Enable relink diagnostic message
cdcfe3eb99 Rename CMAKE_USE_MACH_PARSER to CMake_USE_MACH_PARSER
b6071c93f5 Rename CMAKE_USE_ELF_PARSER to CMake_USE_ELF_PARSER

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5769
2021-02-04 08:29:57 -05:00
Brad King 4cd23c5e0d Merge topic 'issue-17634'
5af38a11ce try_run: Allow to set working directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5757
2021-02-04 08:22:19 -05:00
Brad King bf6e655031 Merge topic 'bootstrap-include-check-ldflags'
11260f6c20 bootstrap: add cmake_ld_flags to include check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5770
2021-02-04 08:21:23 -05:00
Brad King b2a477e023 Merge topic 'update-curl'
24f3388fa4 curl: Set build options the way we need for CMake
426ef61cc8 Merge branch 'upstream-curl' into update-curl
076b3219f5 curl 2021-02-03 (2f33be81)
0341888c00 curl: Update script to get curl 7.75.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5767
2021-02-04 08:20:26 -05:00
Brad King f41c7e1ce7 Merge branch 'release-3.19' 2021-02-04 08:19:17 -05:00
Brad King f82fb91382 Merge topic 'FindBoost-1.75'
8293064760 FindBoost: Add support for Boost 1.75

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5768
2021-02-04 08:19:17 -05:00
Brad King 7a76b4b19d Merge topic 'FindBoost-1.75' into release-3.19
8293064760 FindBoost: Add support for Boost 1.75

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5768
2021-02-04 08:19:16 -05:00
Brad King b1fe08a4b4 Merge branch 'release-3.19' 2021-02-04 08:18:21 -05:00
Brad King e8ae5d1c32 Merge topic 'xcode-framework-path'
5389bb4274 Xcode: Don't hard-code SDK-provided implicit framework search paths
df08f8df30 cmComputeLinkInformation: Fix misspelt private variable name
375b307bae Apple: Fix linking to frameworks that do not exist until build time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5760
2021-02-04 08:18:21 -05:00
Brad King 7b9ea201fc Merge topic 'xcode-framework-path' into release-3.19
5389bb4274 Xcode: Don't hard-code SDK-provided implicit framework search paths
df08f8df30 cmComputeLinkInformation: Fix misspelt private variable name
375b307bae Apple: Fix linking to frameworks that do not exist until build time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5760
2021-02-04 08:18:20 -05:00
Kitware Robot 388ffeb586 CMake Nightly Date Stamp 2021-02-04 00:01:14 -05:00
Issam E. Maghni 11260f6c20 bootstrap: add cmake_ld_flags to include check 2021-02-03 13:36:45 -05:00
Brad King e017ba046c AIX: Enable XCOFF editing to replace RPATH on installation
Avoid relinking before installation.
2021-02-03 12:26:58 -05:00
Brad King 56fc4a325f cmXCOFF: Add helper to parse and edit the XCOFF binary format 2021-02-03 12:26:58 -05:00
Brad King ddaaee907d CMakeDetermineCompilerId: Recognize XCOFF executable format 2021-02-03 12:26:58 -05:00
Brad King 69e1d95a8a Tests: Add sample XCOFF binaries
Generate the binaries as follows:

    $ cat main.c
    int main(void) { return 0; }
    $ xlc -q64 -o xcoff64.bin -Wl,-blibpath:/sample/rpath:/usr/lib:/lib main.c
    $ strip -X 64 xcoff64.bin
    $ xlc -q32 -o xcoff32.bin -Wl,-blibpath:/sample/rpath:/usr/lib:/lib main.c
    $ strip -X 32 xcoff32.bin
2021-02-03 12:26:23 -05:00