Commit Graph

31054 Commits

Author SHA1 Message Date
Brad King
3265fa51cd Merge topic 'ctest-environment-modifications'
de4f1f26b0 CTest: add an ENVIRONMENT_MODIFICATION property
4c757fa3c8 Help/prop_test/ENVIRONMENT: clarify the scope of the changes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6299
2021-07-13 08:24:36 -04:00
Brad King
95c97a12e8 Merge topic 'state-project-kind'
6c440ea3ce cmake: Model normal and try-compile project kinds explicitly
2065bd73cb cmState: Construct with mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6337
2021-07-13 08:23:18 -04:00
Brad King
8fcd3ecb2a Merge topic 'vs-CMAKE_MSVCIDE_RUN_PATH'
542bd343e3 VS: Always enable CMAKE_MSVCIDE_RUN_PATH

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6334
2021-07-13 08:20:36 -04:00
Brad King
235795d502 Merge topic 'file-grd-arch'
5aeda18297 file(GET_RUNTIME_DEPENDENCIES): Use cmELF unconditionally
17aa96bb7a Merge branch 'master' into file-grd-arch
b2c03347b0 file(GET_RUNTIME_DEPENDENCIES): Check architecture of dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6339
2021-07-13 08:18:32 -04:00
Kitware Robot
15bd593f4f CMake Nightly Date Stamp 2021-07-13 00:01:11 -04:00
Kyle Edwards
5aeda18297 file(GET_RUNTIME_DEPENDENCIES): Use cmELF unconditionally
Starting with CMake 3.22, cmELF.h is always available, so use it
unconditionally.
2021-07-12 16:12:52 -04:00
Kyle Edwards
17aa96bb7a Merge branch 'master' into file-grd-arch 2021-07-12 16:12:46 -04:00
Kyle Edwards
b2c03347b0 file(GET_RUNTIME_DEPENDENCIES): Check architecture of dependencies
Fixes: #22106
2021-07-12 16:11:38 -04:00
Brad King
6c440ea3ce cmake: Model normal and try-compile project kinds explicitly
Construct with the project kind instead of mutating state after
construction.
2021-07-12 12:21:52 -04:00
Brad King
2065bd73cb cmState: Construct with mode 2021-07-12 12:21:44 -04:00
Asit Dhal
542bd343e3 VS: Always enable CMAKE_MSVCIDE_RUN_PATH
Do not require a language to be enabled.

Fixes: #22343
2021-07-12 11:19:01 -04:00
Brad King
c9cd039e5f Merge topic 'LWYU-externalization'
14e57e9637 LINK_WHAT_YOU_USE feature: externalize configuration
9c5132a586 PGI: Fix "LINKER:" prefix generated separator
8a93de080c cmGeneratorTarget: Add method for LINKER: prefix translation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6306
2021-07-12 08:43:32 -04:00
Brad King
ca696c73e1 Merge topic 'target-stable-order'
9e9ab61e2f cmGlobalGenerator: Process targets in a stable order
8a812dde61 cmGlobalGenerator: Use cmMakefile::CreateNewTarget to add global targets
854dcb0d01 cmMakefile: Split out CreateNewTarget from AddNewTarget

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6267
2021-07-12 08:39:46 -04:00
Kitware Robot
52a73d1654 CMake Nightly Date Stamp 2021-07-12 00:01:19 -04:00
Kitware Robot
3c521b89f1 CMake Nightly Date Stamp 2021-07-11 00:01:06 -04:00
Kitware Robot
4f5957d72d CMake Nightly Date Stamp 2021-07-10 00:01:09 -04:00
Marc Chevrier
14e57e9637 LINK_WHAT_YOU_USE feature: externalize configuration
Currently, this feature is only supported on ELF platforms. So, the property
LINK_WHAT_YOU_USE will be ignored for other plateforms.
Moreover, flags and commands are now controled by CMake variables.

Fixes: #20174
2021-07-09 14:50:50 +02:00
Ben Boeckel
de4f1f26b0 CTest: add an ENVIRONMENT_MODIFICATION property
This property allows projects to modify environment variables at test
time rather than trying to guess what the state should be based on what
is present at configure time. Of particular interest is the ability to
use a `PATH` present at test time while adding entries known to be
necessary for the test itself.

There are multiple operations provided to modify variables, including:

  - setting and unsetting
  - appending and prepending as:
    - strings
    - path lists
    - CMake lists

Additionally, a `reset` action is provided to cancel any prior
modifications to that particular variable in the case of incremental
additions to the test property.
2021-07-09 08:45:18 -04:00
Kitware Robot
a5e865c178 CMake Nightly Date Stamp 2021-07-09 00:01:15 -04:00
NAKAMURA Takumi
9e9ab61e2f cmGlobalGenerator: Process targets in a stable order
`cmMakefile::Targets` is meant for efficient lookup but does not
have a stable order.  Use `cmMakefile::OrderedTargets` instead.
2021-07-08 15:16:46 -04:00
NAKAMURA Takumi
8a812dde61 cmGlobalGenerator: Use cmMakefile::CreateNewTarget to add global targets
`cmMakefile::CreateNewTarget` updates also `cmMakefile::OrderedTargets`.
2021-07-08 12:17:37 -04:00
NAKAMURA Takumi
854dcb0d01 cmMakefile: Split out CreateNewTarget from AddNewTarget
`CreateNewTarget` tells whether the target is inserted or not.
2021-07-08 12:15:10 -04:00
Brad King
554ebf643d CMake 3.21.0-rc3 2021-07-08 09:46:27 -04:00
Brad King
a42b753c41 Merge topic 'find_package-required-var'
a2e9fe38e4 find_package: Add variable to make package REQUIRED

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Michael Hirsch <michael@scivision.dev>
Merge-request: !6316
2021-07-08 08:06:12 -04:00
Eugene Shalygin
a2e9fe38e4 find_package: Add variable to make package REQUIRED
Add a `CMAKE_REQUIRE_FIND_PACKAGE_<PackageName>` variable is complement
to `CMAKE_DISABLE_FIND_PACKAGE_<PackageName>` with just the opposite
behaviour: it turns non-required find_package call into the required one.

While optional package dependencies usually result in simple and clean
build logic, sometimes people want to be sure those optional
dependencies will be found and used. Examples are reproducible builds
and build instructions for 3rd parties. People choose to make
find_package calls REQUIRED and put them behind an option(). Such
workarounds blend build logic with build environment management and do
not look elegant.
2021-07-08 08:03:38 -04:00
Brad King
c3a5dec0e8 Merge topic 'CPATH_symlinks'
c00f928ce1 Do not exclude include directory symlinks to entries of CPATH
5c02964aff cmLocalGenerator: Simplify CPATH lookup loop
86595b3002 cmLocalGenerator: Clarify check for membership in multiple sets
10969fd003 cmLocalGenerator: Remove unnecessary parentheses in a condition
3fd56472c6 cmLocalGenerator: Store realpath lookup result in a variable
429fb28f25 cmLocalGenerator: Factor out repeated condition into local variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6313
2021-07-08 07:54:53 -04:00
Marc Chevrier
8a93de080c cmGeneratorTarget: Add method for LINKER: prefix translation 2021-07-08 13:48:42 +02:00
Kitware Robot
94cad518bc CMake Nightly Date Stamp 2021-07-08 00:01:09 -04:00
Brad King
2cc6aa4ef4 Merge topic 'cmake-presets-list-no-generator'
d9a3c9fad5 CMakePresets.json: Make --list-presets show presets with no generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6314
2021-07-07 09:27:46 -04:00
Brad King
4564c5a77e Merge topic 'cmake-presets-list-no-generator' into release-3.21
d9a3c9fad5 CMakePresets.json: Make --list-presets show presets with no generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6314
2021-07-07 09:27:45 -04:00
Brad King
19cd773c44 Merge topic 'xcode13-old-buildsystem' into release-3.21
71a2664ebb Xcode: Ignore deprecated build system

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6309
2021-07-07 09:26:35 -04:00
Brad King
85ea0a9112 Merge topic 'xcode13-old-buildsystem'
71a2664ebb Xcode: Ignore deprecated build system

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6309
2021-07-07 09:26:35 -04:00
Alexander Grund
c00f928ce1 Do not exclude include directory symlinks to entries of CPATH
Extend the fix from commit 2d0b0e2b9d (Do not exclude include
directories made implicit by CPATH, 2019-05-29, v3.14.5~2^2) to cover
include directories that are symlinks to paths listed in `CPATH`.

Compare resolved paths against resolved entries of `CPATH`.
Resolve the entries as late as possible in case symlinks change.

Fixes: #22383
2021-07-07 08:04:59 -04:00
Alexander Grund
5c02964aff cmLocalGenerator: Simplify CPATH lookup loop 2021-07-07 08:04:30 -04:00
Alexander Grund
86595b3002 cmLocalGenerator: Clarify check for membership in multiple sets 2021-07-07 08:04:30 -04:00
Alexander Grund
10969fd003 cmLocalGenerator: Remove unnecessary parentheses in a condition 2021-07-07 08:04:29 -04:00
Alexander Grund
3fd56472c6 cmLocalGenerator: Store realpath lookup result in a variable 2021-07-07 08:04:15 -04:00
Kitware Robot
0f1efb58c8 CMake Nightly Date Stamp 2021-07-07 00:01:11 -04:00
Alexander Grund
429fb28f25 cmLocalGenerator: Factor out repeated condition into local variable 2021-07-06 19:19:46 -04:00
Kyle Edwards
d9a3c9fad5 CMakePresets.json: Make --list-presets show presets with no generator
Fixes: #22389
2021-07-06 14:36:27 -04:00
Brad King
7fdd806630 Merge topic 'makefile-normalize-depfile'
30926620bb Merge branch 'backport-3.21-makefile-normalize-depfile'
6bc6ffb9a9 Merge branch 'backport-3.20-makefile-normalize-depfile'
6a6efdcaed Makefiles: Normalize compiler-generated depfile paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6297
2021-07-06 09:48:45 -04:00
Gregor Jasny
71a2664ebb Xcode: Ignore deprecated build system
With Xcode 13 the key to suppress the check has changed.
Tested with Xcode 12.5 and 13.0-beta2.
2021-07-06 09:29:17 +02:00
Kitware Robot
a27fa90aa1 CMake Nightly Date Stamp 2021-07-06 00:01:10 -04:00
Kitware Robot
28979a5968 CMake Nightly Date Stamp 2021-07-05 00:01:22 -04:00
Kitware Robot
7f6552745d CMake Nightly Date Stamp 2021-07-04 00:01:09 -04:00
Kitware Robot
51485993e7 CMake Nightly Date Stamp 2021-07-03 00:01:12 -04:00
Brad King
30926620bb Merge branch 'backport-3.21-makefile-normalize-depfile' 2021-07-02 10:36:07 -04:00
Brad King
6bc6ffb9a9 Merge branch 'backport-3.20-makefile-normalize-depfile' 2021-07-02 10:01:09 -04:00
Marc Chevrier
6a6efdcaed Makefiles: Normalize compiler-generated depfile paths
Even though Makefile generators pass source files and include
directories by absolute path to the compiler, the compiler may generate
depfile paths relative to the current working directory.  For example,
`ccache` with `CCACHE_BASEDIR` may transform paths this way.  When
reading a depfile, convert relative dependencies to absolute paths
before placing them in `compiler_depend.make`, which is later evaluated
in the top-level build directory.

Fixes: #22364
2021-07-02 09:24:57 -04:00
Brad King
3736088310 Merge topic 'ctest_not_dart'
0962cbf21d help: update ctest attached file example
5489ce74b3 ctest: support <CTestMeasurement> for runtime measurements
7817aa6fa4 ctest: improve test for runtime labels

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6296
2021-07-02 09:00:56 -04:00