Commit Graph

29763 Commits

Author SHA1 Message Date
Brad King
c404f64289 cmCustomCommandGenerator: Collect genex target references in commands
These will become target-level dependencies.
2020-10-29 09:37:14 -04:00
Brad King
2a640d4199 cmCustomCommandGenerator: Add move operations 2020-10-27 14:58:15 -04:00
Brad King
fab772c3e1 cmAddCustomCommandCommand: Drop outdated comment 2020-10-27 14:58:15 -04:00
Brad King
84fecbf214 cmLocalNinjaGenerator: Remove leftover local debugging comment 2020-10-27 14:58:15 -04:00
Brad King
9e5e2d704a Remove unnecessary arbitrary CollapseFullPath second arguments
Some calls to CollapseFullPath that already have an absolute path were
updated by commit 22f38c0d6b (cmake: avoid getcwd in `CollapseFullPath`,
2020-01-14, v3.17.0-rc1~171^2) to pass an arbitrary second argument to
prevent unnecessary `getcwd` calls.  Since then, the KWSys
implementation of CollapseFullPath has learned to avoid unnecessary
`getcwd` calls on its own, so we can drop the arbitrary second arguments
to our CollapseFullPath calls.
2020-10-27 14:36:16 -04:00
Brad King
c300355aab Merge topic 'cuda_vs_skip_computation'
dd77dec18d VS: Don't compute CUDA options unless necessary

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5422
2020-10-27 08:20:55 -04:00
Craig Scott
105ef112c9 Merge topic 'cmake-presets-path-arg'
b7d7eca66d CMakePresets.json: Rework how --preset argument is handled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5416
2020-10-27 07:33:46 -04:00
Raul Tambre
dd77dec18d VS: Don't compute CUDA options unless necessary
In the following scenario (with 3.18 policies):
1. A CXX target is created.
2. CUDA language is enabled.

CMake 3.18 introduced CMP0104, which requires CUDA_ARCHITECTURES to be
set.  Because the CXX target was created before CUDA was enabled it
wouldn't have it set.  The Visual Studio generator would however end up
computing CUDA compile options for the CXX target, which would result in
a fatal error due to the policy violation.

There doesn't seem to be a reason to do this for targets that don't
actually use the CUDA language, so we can skip and generate the CXX
target just fine.

Fixes: #21341
2020-10-27 07:29:01 -04:00
Brad King
c79e02c4c3 Merge topic 'cmake-20866'
03ad0e61c1 configure_file: Add option for user defined permissions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5320
2020-10-27 07:11:13 -04:00
Brad King
ecab18bb7c Merge topic 'issue-21034'
1a3d125de8 target_sources: Support custom targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5421
2020-10-27 07:10:24 -04:00
Brad King
2a1da463e9 Merge topic 'ninja-multi-per-config-sources'
b8937a992b Merge branch 'release' into ninja-multi-per-config-sources
d13bd6ec3d Ninja Multi-Config: Don't try to calculate dependencies for "all"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !5430
2020-10-27 06:59:57 -04:00
Kitware Robot
9cadb345d9 CMake Nightly Date Stamp 2020-10-27 00:01:05 -04:00
Brad King
e9109dec36 Merge branch 'ninja-multi-per-config-sources' into release-3.18
Merge-request: !5430
2020-10-26 16:14:00 -04:00
Kyle Edwards
b8937a992b Merge branch 'release' into ninja-multi-per-config-sources 2020-10-26 15:43:57 -04:00
Kyle Edwards
d13bd6ec3d Ninja Multi-Config: Don't try to calculate dependencies for "all" 2020-10-26 15:37:04 -04:00
Brad King
388dc4d2ac Merge topic 'correct_profiling-output_exception'
afac7482d2 cmake: command arguments which use '=' behave consistently

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5414
2020-10-26 10:29:23 -04:00
Brad King
9fa7afe7d3 Merge topic 'correct_profiling-output_exception' into release-3.19
afac7482d2 cmake: command arguments which use '=' behave consistently

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5414
2020-10-26 10:29:22 -04:00
Brad King
a1fe3be2bf Merge topic 'per-config-source-TARGET_FILE' into release-3.19
cd33bfcad5 add_custom_command: Properly recognize if sources depend on config

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5410
2020-10-26 10:28:30 -04:00
Brad King
f87360b781 Merge topic 'per-config-source-TARGET_FILE'
cd33bfcad5 add_custom_command: Properly recognize if sources depend on config

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5410
2020-10-26 10:28:30 -04:00
Kyle Edwards
b7d7eca66d CMakePresets.json: Rework how --preset argument is handled
If a path argument with no -S or -B leads to a cache directory,
use that directory as the binary directory. Otherwise, use the
binary directory from the preset.

Fixes: #21311
2020-10-26 22:32:45 +11:00
Kitware Robot
d22a760cb9 CMake Nightly Date Stamp 2020-10-26 00:01:06 -04:00
Kitware Robot
d749d46814 CMake Nightly Date Stamp 2020-10-25 00:01:04 -04:00
Asit Dhal
1a3d125de8 target_sources: Support custom targets
Fixes: #21034
2020-10-24 21:13:25 +02:00
Asit Dhal
03ad0e61c1 configure_file: Add option for user defined permissions
User defined permissions and options to copy permissions are
implemented.

Fixes: #20866
2020-10-24 12:00:47 +02:00
Kitware Robot
a8e9208f70 CMake Nightly Date Stamp 2020-10-24 00:01:19 -04:00
Robert Maynard
afac7482d2 cmake: command arguments which use '=' behave consistently
Fixes: #21351

The `profiling-format`, `profiling-output`, and `preset` all would
crash when invoked without a trailing `=`.
2020-10-23 09:12:43 -04:00
Brad King
5988a4deea Merge topic 'no-override-flow-control'
8aee7fdb32 cmState: Prohibit override of flow control commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5409
2020-10-23 09:06:03 -04:00
Brad King
31848e35a7 Merge topic 'proper-command-nesting'
12f6e37eb7 cmListFileCache: Enforce proper nesting of flow control statements
67383725bd cm::optional: Add constructor delegation to nullopt_t constructor
0668120398 cm::optional: Fix move assignment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5401
2020-10-23 09:05:13 -04:00
Brad King
bc0c72f1f0 Merge topic 'vs-fortran-debugging-flags'
8ad6fabfc5 VS: Remove flag table entries for Fortran /Z* flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5406
2020-10-23 08:44:48 -04:00
Brad King
f2a59d400e Merge topic 'vs-fortran-debugging-flags' into release-3.19
8ad6fabfc5 VS: Remove flag table entries for Fortran /Z* flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5406
2020-10-23 08:44:47 -04:00
Craig Scott
5e1858c0c2 Merge topic 'cmake-presets-toolset-arch-config' into release-3.19
64afabdbcb CMakePresets.json: Split cmakeGeneratorConfig field

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5387
2020-10-23 06:37:56 -04:00
Craig Scott
dbd1d737f9 Merge topic 'cmake-presets-toolset-arch-config'
64afabdbcb CMakePresets.json: Split cmakeGeneratorConfig field

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5387
2020-10-23 06:37:56 -04:00
Craig Scott
5d20e6d803 Merge topic 'cmake-presets-source-dir-name'
25742c589c CMakePresets.json: Add ${sourceDirName} macro

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !5386
2020-10-23 06:36:03 -04:00
Kitware Robot
6d306a42da CMake Nightly Date Stamp 2020-10-23 00:01:14 -04:00
Kyle Edwards
8aee7fdb32 cmState: Prohibit override of flow control commands 2020-10-22 17:04:31 -04:00
Deniz Bahadir
cd33bfcad5 add_custom_command: Properly recognize if sources depend on config
Fixes: #21349
2020-10-22 23:03:05 +02:00
Kyle Edwards
3a82ff6a11 Merge topic 'cmake-16773'
3c324689a7 include: refactor call sites of cmMakefile::ReadDependentFile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !5405
2020-10-22 12:00:39 -04:00
Kyle Edwards
12f6e37eb7 cmListFileCache: Enforce proper nesting of flow control statements
Fixes: #19153
2020-10-22 11:40:48 -04:00
Kyle Edwards
64afabdbcb CMakePresets.json: Split cmakeGeneratorConfig field
Make this field separate for both architecture and toolset. Allow
architecture and toolset to be either strings or objects with value
and strategy fields.

Fixes: #21317
2020-10-22 11:24:39 -04:00
Kyle Edwards
25742c589c CMakePresets.json: Add ${sourceDirName} macro
Fixes: #21312
2020-10-22 11:09:28 -04:00
Kyle Edwards
609122007d Merge topic 'cmake-presets-invalid-macro' into release-3.19
638557cbfe CMakePresets.json: Properly report macro expansion errors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5397
2020-10-22 11:05:09 -04:00
Kyle Edwards
5ef9978087 Merge topic 'cmake-presets-invalid-macro'
638557cbfe CMakePresets.json: Properly report macro expansion errors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5397
2020-10-22 11:05:09 -04:00
Kyle Edwards
6abe14d226 Merge topic 'cmake-presets-boolean-cache'
920d180047 CMakePresets.json: Allow boolean for cache variable value

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5398
2020-10-22 11:04:19 -04:00
Volker Jacht
8ad6fabfc5 VS: Remove flag table entries for Fortran /Z* flags
These were included when the Fortran flag table was first created by
commit 10c91ded4f (ENH: add support for Intel Fortran Visual studio IDE,
2008-04-30, v2.8.0~2227), but they map to fields not actually supported
by the IDE.  Remove their table entries.

Instead use just `/debug:minimal` and `/debug:full` to control debug
information level in VS Intel Fortran.  Let flags like `/Z7` pass
through as raw additional options because they have no corresponding IDE
property and can be used to complement the supported options.

Fixes: #21340
2020-10-22 09:08:52 -04:00
Brad King
504aadf414 Merge topic 'move_pch_information_to_projects_where_possible'
9df1f33c9a VisualStudio: move PCH rules to projects when possible.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5395
2020-10-22 08:51:46 -04:00
Kitware Robot
3870f57ac5 CMake Nightly Date Stamp 2020-10-22 00:01:13 -04:00
Kyle Edwards
920d180047 CMakePresets.json: Allow boolean for cache variable value
Fixes: #21327
2020-10-21 10:37:08 -04:00
Brad King
ccd313a074 Merge topic 'constify'
bd705788f6 Constify some code as suggested by clang-tidy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5391
2020-10-21 10:19:47 -04:00
Kyle Edwards
638557cbfe CMakePresets.json: Properly report macro expansion errors
Make a distinction between strings which simply use the
$vendor{<...>} macro, which is valid but makes it unusable by CMake,
and strings which actually contain invalid macro expansions.

Fixes: #21308
2020-10-21 09:20:52 -04:00
Asit Dhal
3c324689a7 include: refactor call sites of cmMakefile::ReadDependentFile
Fixes: #16773
2020-10-21 11:20:37 +02:00