Commit Graph

33515 Commits

Author SHA1 Message Date
Brad King 28fd87aa1d Merge topic 'optimize-target-depends-closure'
1f16af01f4 cmGlobalNinjaGenerator: Optimize target depends closure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8079
2023-01-19 09:22:05 -05:00
Brad King cd87bebe49 Merge topic 'optimize-full-name-function'
a525f5f1bf cmGeneratorTarget: Cache full name components

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8033
2023-01-19 09:21:18 -05:00
Brad King d6d847607c Merge topic 'clang-format-15'
33abef7416 Revise C++ coding style using clang-format-15
57221fd56f Empty commit at end of history preceding clang-format-15 style transition
6739d57948 clang-format.bash: update to clang-format-15
9ee57226bc clang-format: Add comments to suppress some formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8086
2023-01-19 09:07:18 -05:00
Kitware Robot 4c5efdcfa8 CMake Nightly Date Stamp 2023-01-19 00:01:11 -05:00
Kitware Robot 33abef7416 Revise C++ coding style using clang-format-15
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`.  Use `clang-format` version 15.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.

Fixes: #24315
2023-01-18 16:20:47 -05:00
Brad King 9ee57226bc clang-format: Add comments to suppress some formatting
Preserve manually-formatted blocks.
2023-01-18 16:19:27 -05:00
Brad King 20bbd5f3d3 Merge topic 'configure-log'
a78cba5197 message: Add CONFIGURE_LOG mode to record a message in the configure log
645671d36f Help: Document configure log behavior in try_compile and try_run

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8080
2023-01-18 12:43:19 -05:00
Brad King 48639aa8fc clang-format.bash: Use generic clang-format attribute
Specify the clang-format version in the attribute value instead of its
name.

Issue: #24315
2023-01-18 11:48:49 -05:00
Brad King a78cba5197 message: Add CONFIGURE_LOG mode to record a message in the configure log
Provide a replacement for `file(APPEND .../CMake{Output,Error}.log)`
that records messages in the configure log.

Issue: #23200
2023-01-18 11:37:11 -05:00
Brad King 3e7f3e2ca9 Merge topic 'add_visbility_flags_to_device_link_line'
0c56bdf91e CUDA: device linking obeys CMAKE_CUDA_VISIBILITY_PRESET setting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8065
2023-01-18 10:52:12 -05:00
Brad King 63819be2eb Merge topic 'less-conversions'
b3edfcf46e cmValue: Use operator* explicitly to convert to std::string; avoid extra call

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8075
2023-01-18 10:44:18 -05:00
Pierre Testart a525f5f1bf cmGeneratorTarget: Cache full name components
Cache the result of cmGeneratorTarget::GetFullNameInternalComponents
to improve performance.
2023-01-18 09:12:17 -05:00
Kitware Robot 076848f558 CMake Nightly Date Stamp 2023-01-18 00:01:10 -05:00
Pierre Testart 1f16af01f4 cmGlobalNinjaGenerator: Optimize target depends closure
Rewrite AppendTargetDependsClosure method to only cache local target
outputs, not including outputs from dependencies.

Caching all recursive target outputs causes much time to be spent
merging sets that have many elements in common (from targets that are
included through multiple dependency paths).
It is faster to always iterate over all dependencies instead.
2023-01-17 18:07:07 +01:00
Brad King 45f86b9990 Merge topic 'configure-log'
48292c8624 try_compile: Record stack of in-progess checks in configure log
d4bf7d80c6 try_compile: Add a NO_LOG option to skip recording in the configure log
9d9e8450a8 try_compile: Add optional LOG_DESCRIPTION to record in configure log
65ed5c2ca8 try_compile: Report underlying error when COPY_FILE fails
0418efb7ad Tests: Add explicit ConfigureLog case to RunCMake.try_compile
189557bd74 cmake: Make entire in-progress check stack available internally
96ce3581ab Help: Clarify backtrace order in cmake-configure-log(7)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8072
2023-01-17 09:26:50 -05:00
Brad King dd18be5ebf Merge topic 'ctest-no-tests-action-env-var'
0661de58d8 ctest(1): Add CTEST_NO_TESTS_ACTION env var

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8044
2023-01-17 09:18:04 -05:00
Kitware Robot 304f133305 CMake Nightly Date Stamp 2023-01-17 00:01:07 -05:00
Brad King 48292c8624 try_compile: Record stack of in-progess checks in configure log
Many `try_compile` and `try_run` calls occur inside check modules
between `message(CHECK_START)` and `message(CHECK_{PASS,FAIL})` pairs.
Add a field to configure log entries to report this context.

Issue: #23200
2023-01-16 17:18:07 -05:00
Brad King d4bf7d80c6 try_compile: Add a NO_LOG option to skip recording in the configure log 2023-01-16 17:16:12 -05:00
Brad King 9d9e8450a8 try_compile: Add optional LOG_DESCRIPTION to record in configure log
Issue: #23200
2023-01-16 16:58:50 -05:00
Brad King 65ed5c2ca8 try_compile: Report underlying error when COPY_FILE fails 2023-01-16 16:58:49 -05:00
Brad King 189557bd74 cmake: Make entire in-progress check stack available internally
Represent it as a `vector` so we can iterate over the whole stack.
2023-01-16 16:58:49 -05:00
Robert Maynard 0c56bdf91e CUDA: device linking obeys CMAKE_CUDA_VISIBILITY_PRESET setting
Fixes #24272
2023-01-16 11:27:13 -05:00
Kitware Robot 87d28dd804 CMake Nightly Date Stamp 2023-01-16 00:01:26 -05:00
Vitaly Stakhovsky b3edfcf46e cmValue: Use operator* explicitly to convert to std::string; avoid extra call 2023-01-15 23:39:02 -05:00
Kitware Robot 701badbd20 CMake Nightly Date Stamp 2023-01-15 00:01:05 -05:00
Kitware Robot 6aeafcffe6 CMake Nightly Date Stamp 2023-01-14 00:01:13 -05:00
Brad King 485a72dc64 Merge topic 'vs-masm-flags'
81f670fa83 VS: Honor compile options for MASM

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8068
2023-01-13 08:59:01 -05:00
Brad King 5dddc49e03 Merge topic 'fea/add-copy_directory_if_different'
c1170b5602 cmake: Add -E copy_directory_if_different

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8059
2023-01-13 08:54:21 -05:00
Brad King 043ed0ce41 Merge topic 'try_run-cross-compile'
5cd5c8cac5 Merge branch 'backport-try_run-cross-compile' into try_run-cross-compile
0191e8b512 try_run: Do not require unrequested stdout/stderr when cross-compiling
2f85ec0a37 try_run: Avoid crash in keyword-dispatched signature when cross-compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8066
2023-01-13 08:47:20 -05:00
friendlyanon 0661de58d8 ctest(1): Add CTEST_NO_TESTS_ACTION env var
This environment variable provides a default value for the
--no-tests=<action> command line argument.
2023-01-13 13:33:39 +01:00
Kitware Robot c759f4605c CMake Nightly Date Stamp 2023-01-13 00:01:14 -05:00
Brad King 81f670fa83 VS: Honor compile options for MASM
The Ninja and Makefile generators honor `target_compile_options`
and friends for MASM `.asm` sources.  Teach the VS generator to
honor them too for consistency.

Fixes: #24289
2023-01-12 14:35:38 -05:00
Brad King 5cd5c8cac5 Merge branch 'backport-try_run-cross-compile' into try_run-cross-compile 2023-01-12 13:55:57 -05:00
Brad King 0191e8b512 try_run: Do not require unrequested stdout/stderr when cross-compiling
Since commit 048a02d5bb (ConfigureLog: Log try_compile and try_run
checks, 2022-11-23) we always capture the stdout/stderr for logging.
When cross-compiling, do not require `__TRYRUN_OUTPUT_STD{OUT,ERR}`
variables to be populated just for the logging.
2023-01-12 13:55:52 -05:00
Brad King 2f85ec0a37 try_run: Avoid crash in keyword-dispatched signature when cross-compiling
Since commit aa9220d3a0 (try_compile: Add keyword-dispatched signature,
2022-09-02, v3.25.0-rc1~178^2) the `DoNotRunExecutable` code path may be
reached with no single source-file argument.  Do not assume it exists.

Fixes: #24295
2023-01-12 11:04:16 -05:00
Brad King f31bb28c78 Merge topic 'ctest-error-newlines'
5e7a4ad1a1 ctest: Add missing newlines on several error messages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8047
2023-01-12 09:25:18 -05:00
Brad King 44dfe0bc13 Merge topic 'string-improve'
0ee984defa CTest: Use std::string arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8046
2023-01-12 09:23:53 -05:00
Robert Maynard c1170b5602 cmake: Add -E copy_directory_if_different
Fixes #21584
2023-01-12 08:39:41 -05:00
Kitware Robot df978c5aa8 CMake Nightly Date Stamp 2023-01-12 00:01:09 -05:00
Christian Häggström 5e7a4ad1a1 ctest: Add missing newlines on several error messages
Without this:

   user@host:~$ ctest --build-and-test foo
   --build-and-test must have source and binary dir
   Problem parsing command line arguments within a handleruser@host:~$
2023-01-11 15:52:37 -05:00
Kitware Robot 51a0292d9c CMake Nightly Date Stamp 2023-01-11 00:01:07 -05:00
Kitware Robot cda4310a82 CMake Nightly Date Stamp 2023-01-10 00:01:11 -05:00
Kitware Robot 1c3d56ed66 CMake Nightly Date Stamp 2023-01-09 00:01:28 -05:00
Kitware Robot 64004e9cb3 CMake Nightly Date Stamp 2023-01-08 00:01:05 -05:00
Kitware Robot 0038a71554 CMake Nightly Date Stamp 2023-01-07 00:01:05 -05:00
Kitware Robot b2a6527f37 CMake Nightly Date Stamp 2023-01-06 00:01:09 -05:00
Kitware Robot 12f9582f92 CMake Nightly Date Stamp 2023-01-05 00:01:06 -05:00
Kitware Robot 4fec7f9de5 CMake Nightly Date Stamp 2023-01-04 00:01:09 -05:00
Vitaly Stakhovsky 0ee984defa CTest: Use std::string arguments 2023-01-03 07:49:22 -05:00