Commit Graph

30839 Commits

Author SHA1 Message Date
Brad King
ccaaca4e7d Merge topic 'ci-clang-analyzer'
da14f4e19e gitlab-ci: add job to build with clang-analyzer
adc38da49f ci: add clang-analyzer to Fedora base image
b6c4d93dcd clang-analyzer: Suppress warnings in intentional use-after-move cases
c1b575f4d1 clang-analyzer: rename from scan-build in comments
dbfb50cd72 cmFileAPICodemodel: Assert input in DirectoryObject::DumpInstaller
410bf8ed4f cmStandardLevelResolver: Fix size assertion in constructor
82584b99e3 jsoncpp: Revert "Code style: add missed explicit 'this->'"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6189
2021-06-04 06:57:51 -04:00
Kitware Robot
186e6aa66f CMake Nightly Date Stamp 2021-06-04 00:01:10 -04:00
Brad King
c1b575f4d1 clang-analyzer: rename from scan-build in comments 2021-06-03 14:59:55 -04:00
Brad King
dbfb50cd72 cmFileAPICodemodel: Assert input in DirectoryObject::DumpInstaller
This tells clang-analyzer that the `gen` argument is never `nullptr`.
2021-06-03 14:59:55 -04:00
Brad King
410bf8ed4f cmStandardLevelResolver: Fix size assertion in constructor
Assert sizes of the constructed vectors, not the moved-from inputs.
2021-06-03 14:59:55 -04:00
Brad King
9c33ff4dda Merge topic 'find_item-NO_CACHE'
87b71eec62 find_*: Add support for option NO_CACHE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6181
2021-06-03 08:11:04 -04:00
Brad King
4297357087 Merge topic 'ctest-coverage-no-dir'
5d5610b04f CTest: Exit coverage handling early if no binary dir

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6144
2021-06-03 08:08:42 -04:00
Brad King
9f7c6a67e5 Merge topic 'update-kwsys'
1b6fbdf1d7 Merge branch 'upstream-KWSys' into update-kwsys
fc5b7905ed KWSys 2021-06-02 (ad35b3ba)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6183
2021-06-03 08:06:32 -04:00
Brad King
bf0d56a1fb Merge topic 'depfile-no-vstlog'
f0e9d74a2d cmake_transform_depfile: Remove unused incomplete vstlog support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6182
2021-06-03 08:05:42 -04:00
Kitware Robot
2ff2085fb8 CMake Nightly Date Stamp 2021-06-03 00:01:11 -04:00
Marc Chevrier
87b71eec62 find_*: Add support for option NO_CACHE
Request that find result is stored in a normal variable rather than a
cache entry.

Fixes: #20687
Issue: #20743
2021-06-02 14:55:00 -04:00
Joseph Snyder
5d5610b04f CTest: Exit coverage handling early if no binary dir
Check for the existence of the Binary directory string before checking
for coverage files.  If the directory is not specified, write an error
message and do not do any checking.

Fixes: #22102
2021-06-02 08:41:09 -04:00
Brad King
1b6fbdf1d7 Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2021-06-02 (ad35b3ba)
2021-06-02 07:46:47 -04:00
Brad King
f0e9d74a2d cmake_transform_depfile: Remove unused incomplete vstlog support
In commit b2c14bc774 (cmake -E: Add cmake_transform_depfile internal
command, 2020-10-02, v3.20.0-rc1~684^2~2) a partial implementation for
converting MSBuild "TLog" format files was added.  However, it is
unused and incomplete:

* Does not enforce absolute paths as TLog docs require.
* Does not upper-case paths as TLog docs recommend.
* The TLog format semantics are not equivalent to `out: in`.

Remove the unused TLog transform infrastructure to avoid confusion.

Issue: #20286
2021-06-02 07:41:05 -04:00
Brad King
cf470d8dac Merge topic 'command_target'
1cb4f592a0 add_custom_command: Target-dependent generator expression support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6176
2021-06-02 07:39:44 -04:00
Brad King
399a321a64 Merge topic 'get-runtime-dependencies-file-filter'
a12639e658 file(GET_RUNTIME_DEPENDENCIES): Add POST_{IN,EX}CLUDE_FILES arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6170
2021-06-02 07:38:17 -04:00
Kitware Robot
2104cfe388 CMake Nightly Date Stamp 2021-06-02 00:01:11 -04:00
Kyle Edwards
a12639e658 file(GET_RUNTIME_DEPENDENCIES): Add POST_{IN,EX}CLUDE_FILES arguments 2021-06-01 09:02:33 -04:00
Brad King
02957bb589 Merge topic 'install-imported-runtime-artifacts'
f7ba3a0589 FileAPI: Populate information for IMPORTED_RUNTIME_ARTIFACTS
df7040a271 install(): Add IMPORTED_RUNTIME_ARTIFACTS mode
60e752ced8 Refactor: Move common methods into cmInstallGenerator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6162
2021-06-01 08:42:16 -04:00
Brad King
5eb2aa1f57 Merge topic 'link-objects-first'
3941555d93 target_link_libraries: Place $<TARGET_OBJECTS> before libraries
f530b3a267 OpenWatcom: Add infrastructure to link to object files
8a4ca110e4 cmComputeLinkInformation: Improve type safety of item IsPath member
83ad066ed1 cmComputeTargetDepends: Factor out helper to add object library dependency
7f506b95a7 cmGeneratorTarget: Refactor link item lookup
96809a8541 cmGeneratorTarget: Give temporary link impl item an explicit name
ddffbb8adb cmMakefile: Register explicit object sources more efficiently
18e42d3e63 cmGeneratorExpressionNode: Constify local variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6166
2021-06-01 08:35:56 -04:00
Kitware Robot
76d583accd CMake Nightly Date Stamp 2021-06-01 00:01:10 -04:00
Kyle Edwards
f7ba3a0589 FileAPI: Populate information for IMPORTED_RUNTIME_ARTIFACTS 2021-05-31 09:02:45 -04:00
Kyle Edwards
df7040a271 install(): Add IMPORTED_RUNTIME_ARTIFACTS mode 2021-05-31 09:02:45 -04:00
Kyle Edwards
60e752ced8 Refactor: Move common methods into cmInstallGenerator 2021-05-31 08:41:44 -04:00
Raul Tambre
1cb4f592a0 add_custom_command: Target-dependent generator expression support
OUTPUT variant with a TARGET given to allow resolving target-based generator
expressions wouldn't work because OUTPUT is resolved before generator targets
are created, i.e. FindGeneratorTargetToUse() returns nullptr.
This is a known limitation, see #21364.

Implements #21336.
2021-05-31 10:39:58 +03:00
Kitware Robot
7ed2a1a66f CMake Nightly Date Stamp 2021-05-31 00:01:22 -04:00
Kitware Robot
bf4e494773 CMake Nightly Date Stamp 2021-05-30 00:01:09 -04:00
Brad King
6da12f2611 Merge topic 'linker-launcher'
ae108418ae Launchers: Support setting linker launchers
92c8b83641 cmNinjaNormalTargetGenerator: Fix "Language" rule variable
d93bfd95f8 Tests/CompilerLauncher: Fix file names and clarify comment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6092
2021-05-29 09:48:42 -04:00
Brad King
37cda77d16 Merge topic 'fix-compile-db-crash'
316cbbe8d5 Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6173
2021-05-29 09:45:33 -04:00
Brad King
3941555d93 target_link_libraries: Place $<TARGET_OBJECTS> before libraries
Linkers always use object files explicitly specified on the command line
regardless of where they appear.  Move them to the front of the list of
linked libraries in so that symbols required by the object files can be
resolved by any library.

Issue: #22149
2021-05-29 09:28:36 -04:00
Brad King
f530b3a267 OpenWatcom: Add infrastructure to link to object files 2021-05-29 09:28:36 -04:00
Brad King
8a4ca110e4 cmComputeLinkInformation: Improve type safety of item IsPath member
Use an enum to avoid implicit conversions to bool.
2021-05-29 09:28:35 -04:00
Kitware Robot
7676e11943 CMake Nightly Date Stamp 2021-05-29 00:01:14 -04:00
Brad King
316cbbe8d5 Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule
Extend the fix from commit 67e2130c96 (Makefiles: Fix
CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule,
2020-11-20, v3.19.1~8^2) to work for the `<FLAGS>` placeholder too.
Also fix the test case to actually enable `EXPORT_COMPILE_COMMANDS`
on the test target.

Fixes: #22261
2021-05-28 15:41:38 -04:00
Brad King
83ad066ed1 cmComputeTargetDepends: Factor out helper to add object library dependency 2021-05-28 15:25:28 -04:00
Brad King
7f506b95a7 cmGeneratorTarget: Refactor link item lookup
Look up items individually so the call sites can do something with the
result besides appending to a vector.
2021-05-28 14:27:38 -04:00
Brad King
96809a8541 cmGeneratorTarget: Give temporary link impl item an explicit name 2021-05-28 14:27:38 -04:00
Brad King
ddffbb8adb cmMakefile: Register explicit object sources more efficiently
`AddTargetObject` knows the location of object files.
2021-05-28 14:27:38 -04:00
Brad King
18e42d3e63 cmGeneratorExpressionNode: Constify local variable 2021-05-28 14:27:38 -04:00
Bobby D Reynolds
ae108418ae Launchers: Support setting linker launchers
Fixes: #18316
2021-05-28 12:28:43 -04:00
Bobby D Reynolds
92c8b83641 cmNinjaNormalTargetGenerator: Fix "Language" rule variable
Fixes: commit 3bc63e99e4 (Refactor: Prepare Ninja generator for multi-config, 2019-11-14, v3.17.0-rc1~290^2~3)
2021-05-28 12:28:43 -04:00
Brad King
4523da9a12 Merge topic 'vs-toolset-version'
a60141feaa VS: Add special case for '-T version=14.29.16.10' under VS 16.10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6169
2021-05-28 12:24:52 -04:00
Kitware Robot
c186dfcd01 CMake Nightly Date Stamp 2021-05-28 00:01:11 -04:00
Brad King
a60141feaa VS: Add special case for '-T version=14.29.16.10' under VS 16.10
Extend the table of special cases from commit 58a50a3a0a (VS: Fix '-T
version=14.28' under VS 16.9, 2021-03-11, v3.19.7~1^2~1).  Add a special
case for the name VS 16.11 will use for VS 16.10's default toolset, so
that it can be used with VS 16.10 too.

Using '-T version=14.29.16.10' actually works under VS 16.10 without
this change, but only because there is only one 14.29 toolset so the
two-component prefix happens to match the right one.  Make it explicit.

Issue: #21922
2021-05-27 17:06:27 -04:00
Brad King
13d112ea03 CMake 3.20.3 2021-05-27 14:05:04 -04:00
Brad King
34a5163fec Merge topic 'xcode-link-TARGET_OBJECTS'
2ae72ef74b Xcode: Enable multi-arch TARGET_OBJECTS genex in [INTERFACE_]LINK_LIBRARIES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6161
2021-05-27 09:10:30 -04:00
Kitware Robot
e55c86873e CMake Nightly Date Stamp 2021-05-27 00:01:13 -04:00
Craig Scott
445c73d3fa Merge topic 'cpack-install-opts'
26e36111d3 CPack: Implement new variable CPACK_CUSTOM_INSTALL_VARIABLES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6141
2021-05-26 18:53:40 -04:00
Brad King
2ae72ef74b Xcode: Enable multi-arch TARGET_OBJECTS genex in [INTERFACE_]LINK_LIBRARIES
This was an oversight in the original implementation.
2021-05-26 15:43:38 -04:00
Brad King
c5657a2fe4 Merge topic 'ninja-absolute-paths'
c564a3e3ff Ninja: Always compile sources using absolute paths
eb98d45111 Ninja: Handle depfiles with absolute paths to generated files in Ninja < 1.7
48471cfd18 cmNinjaNormalTargetGenerator: Factor out build event byproduct collection
18408c0b88 cmGlobalNinjaGenerator: Add helper to compute absolute paths for build.ninja
efb8d7b4a1 cmNinjaTargetGenerator: Reduce string copies in ConvertToNinjaPath wrapper
fb3a57575a cmNinjaTargetGenerator: Rename source file path lookup method for clarity
0f2b1c9d1b cmNinjaTargetGenerator: Remove GetSourceFilePath call with different semantics
dfc98774a2 cmNinjaTargetGenerator: Rename local variable for clarity
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6148
2021-05-26 11:57:22 -04:00