Commit Graph

10362 Commits

Author SHA1 Message Date
Brad King
b7810bfb18 Merge topic 'support_nvhpc_versions_without_isystem' into release-3.27
f73ae7c510 NVHPC: Support nvfortran versions that don't support isystem

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8588
2023-06-26 09:44:56 -04:00
Robert Maynard
f73ae7c510 NVHPC: Support nvfortran versions that don't support isystem
Fixes: #25019
2023-06-23 12:14:09 -04:00
Marc Chevrier
5945a98ced link dependencies: deactivate the feature
Unfortunately it breaks in combination with LTO due to a bug in the GNU
linker.

Fixes: #25014
2023-06-23 10:35:04 -04:00
Marc Chevrier
1cfaed0684 list(): restore SUBLIST behavior
Fixes: #25002
2023-06-16 15:14:03 +02:00
Brad King
15d9d591bd Tests: Require git to enable RunCMake.CMP0150 test
The test added by commit 550f63447d (ExternalProject/FetchContent:
Support relative remote URLs, 2023-04-21, v3.27.0-rc1~156^2) covers
Git-specific functionality, and requires a `git` tool to be available.
2023-06-12 17:56:53 -04:00
Brad King
0c2610bd30 Tests: Find GIT_EXECUTABLE early enough to use in all tests
Some tests work only if a `git` executable is available.
2023-06-12 17:53:56 -04:00
Brad King
a70fe8ec82 Merge topic 'add_test-empty-args' into release-3.27
1df3287bf6 add_test: Restore support for empty test arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8551
2023-06-12 06:41:40 -04:00
Marc Chevrier
1df3287bf6 add_test: Restore support for empty test arguments
This was regressed by refactoring in commit e08ba229ee (CMake code rely
on cmList class for CMake lists management (part. 1), 2023-04-14,
v3.27.0-rc1~174^2).  Fix it and add a test case.

Fixes: #24986
2023-06-09 09:47:52 -04:00
Ben Boeckel
8195aa3026 Makefiles: quote $(COLOR) expansions
This handles the case where `COLOR` is set to some ANSI-like color
sequence in the ambient environment. These sequences tend to include `;`
which terminates the command and tries to use the next component
(typically an integer, possibly with a trailing `m`) with errors like:

    /bin/sh: line 1: 2: command not found
    /bin/sh: line 1: 255: command not found
    /bin/sh: line 1: 221: command not found
    /bin/sh: line 1: 255m: command not found

Also add a test that sets `COLOR` in the environment which affects the
generated Makefiles behavior.

See: https://discourse.cmake.org/t/cmake-failing-gcc-compiler-checks/8277
2023-06-08 11:05:11 -04:00
Kyle Edwards
af69d59b09 Merge topic 'verify-interface-header-sets-skip-linting'
36ec89639a VERIFY_INTERFACE_HEADER_SETS: Skip header files that have SKIP_LINTING

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8540
2023-06-06 10:51:27 -04:00
Kyle Edwards
36ec89639a VERIFY_INTERFACE_HEADER_SETS: Skip header files that have SKIP_LINTING
Fixes: #24972
2023-06-06 10:45:22 -04:00
Brad King
ec472999dc Merge topic 'apple-clang-asm-compiler-id'
8c789bee83 AppleClang: Fix ASM compiler identification

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8537
2023-06-06 10:00:52 -04:00
Brad King
53d9234395 Merge topic 'Apple-tbd-runpath-handling'
bfa5b430b3 Apple text-based stubs: ensure runpath is correctly defined

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8536
2023-06-06 09:55:34 -04:00
Kyle Edwards
0eada92663 Merge topic 'cmuvprocesschain-status-getexception'
154fe00ca5 cmUVProcessChain: Add Status::GetException() method

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8528
2023-06-06 08:41:58 -04:00
Gregor Jasny
8c789bee83 AppleClang: Fix ASM compiler identification
Recent AppleClang compilers identify themselves as
`Apple clang version 14.0.3 (clang-1403.0.22.14.1)`.
2023-06-05 17:31:35 -04:00
Kyle Edwards
154fe00ca5 cmUVProcessChain: Add Status::GetException() method 2023-06-05 11:27:45 -04:00
Brad King
3760ac9845 Merge topic 'file-api-query-command'
99b2ccf80d cmake_file_api: New project command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8530
2023-06-05 09:45:02 -04:00
Brad King
bcbf415585 Merge topic 'orkun_24968_02_06_2023'
3e462202a7 Test: Generate pseudo linters generator independent

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8532
2023-06-05 06:41:53 -04:00
Brad King
7838ae4fd8 Merge topic 'ctest-timeout-signal'
54c5654f7d ctest: Optionally terminate tests with a custom signal on timeout
e38c05688e CTest/cmProcess: Adopt field tracking reason for the process timeout
25c1468314 cmCTestTestHandler: Remove outdated comment
41e8507ab7 IWYU: Add mapping for bits/chrono.h to chrono

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8472
2023-06-05 06:33:36 -04:00
Craig Scott
99b2ccf80d cmake_file_api: New project command
Projects can use the new command to request file API replies for the current
run. No query files are generated, the query is tracked internally. Replies are
created in the file system at generation time in the usual way.

Fixes: #24951
2023-06-05 06:20:50 -04:00
Marc Chevrier
bfa5b430b3 Apple text-based stubs: ensure runpath is correctly defined
This is a complement to !8204.
2023-06-04 15:29:42 +02:00
Orkun Tokdemir
3e462202a7 Test: Generate pseudo linters generator independent
Fixes: #24968
2023-06-02 15:55:47 +02:00
Brad King
54c5654f7d ctest: Optionally terminate tests with a custom signal on timeout
CTest normally terminates test processes on timeout using `SIGKILL`.
Offer tests a chance to exit gracefully, on platforms supporting POSIX
signals, by setting `TIMEOUT_SIGNAL_{NAME,GRACE_PERIOD}` properties.

Fixes: #17288
2023-06-02 06:51:13 -04:00
Ben Boeckel
0183e1bca3 cxxmodules: remove CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP variable
It is now subsumed by the UUID setting completely.
2023-06-01 14:43:26 -04:00
Brad King
f6435f799e Merge topic 'automoc-moc-options-test'
1f4b374d6e cmQtAutoGenInitializer: Reduce string copies
b6f66b445a cmQtAutoGenInitializer: Remove no-op calls
55d93bdabf cmQtAutoGenInitializer: Improve const correctness
feb56a666f cmTarget: Improve const correctness of AddUtility
5e513e562f Help: Add AUTOMOC_MOC_OPTIONS example
5380ad9d58 Tests: Add test for AUTOMOC_MOC_OPTIONS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8523
2023-06-01 11:19:19 -04:00
Kyle Edwards
99e80ea0ac Merge topic 'cmuvprocesschain-finished'
22e5775cde cmUVProcessChain: Add Finished() method

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8526
2023-06-01 10:30:02 -04:00
Brad King
64a4d1f104 Merge topic 'remove-header-unit-fileset-type'
7b62a83c6f cxxmodules: update the experimental UUID
6ff5cdc533 cxxmodules: remove support for `CXX_MODULE_HEADER_UNITS` filesets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8510
2023-06-01 09:53:34 -04:00
Brad King
54a4aa5779 Merge topic 'cuda-ipo-arch'
45584508fa CUDA/NVIDIA: fix LTO with explicit architectures

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !8508
2023-06-01 09:49:15 -04:00
Brad King
aa3675d281 Merge topic 'cmake-compile-no-warning-as-error'
da27ff1e96 Preserve --compile-no-warning-as-error in automatic CMake re-runs
e0b48284a1 Xcode: Internally uses -S instead of -H to specify source directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8522
2023-06-01 09:45:56 -04:00
Kyle Edwards
22e5775cde cmUVProcessChain: Add Finished() method 2023-05-31 17:21:52 -04:00
Orkun Tokdemir
5380ad9d58 Tests: Add test for AUTOMOC_MOC_OPTIONS
Fixes: #23894
2023-05-31 12:59:20 -04:00
Rafael Stahl
45584508fa CUDA/NVIDIA: fix LTO with explicit architectures 2023-05-31 11:44:10 -04:00
Ben Boeckel
7b62a83c6f cxxmodules: update the experimental UUID
Syntactic support for C++ header units has been removed, so a new UUID
is warranted.
2023-05-31 10:57:11 -04:00
Ben Boeckel
6ff5cdc533 cxxmodules: remove support for CXX_MODULE_HEADER_UNITS filesets
There's no backing implementation for header units anyways, so just
remove it for now.
2023-05-31 10:57:11 -04:00
Brad King
826825fe34 Merge topic 'orkun_24848_19_05_2023'
2bb3d9b644 Autogen: Fix multi-config generated file issue
3bd605f3d0 Autogen: Optimize cmake_autogen execution for CROSS_CONFIG usage
f2f21c5752 Improve Const Correctness

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8507
2023-05-31 09:34:23 -04:00
Brad King
5b063510f9 Merge topic 'cmake-verbose-print-build-tool-command'
8451a3f0b5 cmGlobalGenerator: use a stream for output in `Build`
e060666531 cmake: write the build command itself with `--verbose`
b017c9f127 cmGlobalGenerator: fix off-by-one for `&&` command joining
c715fd8d76 cmGlobalGenerator: quote commands in `::Build` output
d6c0e827bc cmGlobalGenerator: add a `QuotedPrintable` method for commands
28ee3bef34 cmGlobalGenerator: add missing spaces in output
465ab8d872 cmGlobalGenerator: use `cmStrCat` in `::Build`
81d45dabc4 cmOutputConverter: add a `static` version of `EscapeForShell`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !8183
2023-05-31 09:33:26 -04:00
Brad King
da27ff1e96 Preserve --compile-no-warning-as-error in automatic CMake re-runs
When the build system re-runs `cmake` to regenerate itself, preserve the
`--compile-no-warning-as-error` option if it was used when `cmake` was
last explicitly invoked.  Normally such settings are preserved in the
cache, but the purpose of this option is to be beyond the reach of
project code.
2023-05-30 17:44:43 -04:00
Glen Chung
a9a592f96e cmake: Add debugger
- Depends on cppdap and jsoncpp.
- Add --debugger argument to enable the Debugger.
- Add --debugger-pipe argument for DAP traffics over named pipes.
- Support breakpoints by filenames and line numbers.
- Support exception breakpoints.
- Call stack shows filenames and line numbers.
- Show Cache Variables.
- Show the state of currently defined targets,
  tests and directories with their properties.
- Add cmakeVersion to DAP initialize response.
- Include unit tests.

Co-authored-by: Ben McMorran <bemcmorr@microsoft.com>
2023-05-30 09:46:12 -04:00
Brad King
0283b2d2bd Merge topic 'cmuvprocesschain-merged-output'
ec80090ce3 cmUVProcessChain: Add option for merged output and error

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8513
2023-05-30 09:42:32 -04:00
Brad King
150f0f19bc Merge topic 'cmuvprocesschain-working-directory'
67bb1ee50c cmUVProcessChain: Add working directory option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8512
2023-05-30 09:41:35 -04:00
Ben Boeckel
8451a3f0b5 cmGlobalGenerator: use a stream for output in Build
This allows output to show up in output immediately instead of being
batched.
2023-05-27 07:04:17 -04:00
Orkun Tokdemir
2bb3d9b644 Autogen: Fix multi-config generated file issue
The default config was an empty string when a `multi-config`
generator is used. An if check was added for those situations.
If a source file has a specific config configuration,
it is used with `$<CONFIG>` in the `multi-config` generator usage.

Fixes: #24848
2023-05-27 12:55:21 +02:00
Kyle Edwards
ec80090ce3 cmUVProcessChain: Add option for merged output and error 2023-05-26 15:52:01 -04:00
Kyle Edwards
67bb1ee50c cmUVProcessChain: Add working directory option 2023-05-26 11:25:32 -04:00
Brad King
023de565d3 Optionally exclude implicit link directories via environment
A misconfigured compiler may pass extraneous implicit link directories
to its linker.  If they are in `CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES`,
CMake may generate extra `-L` flags on mixed-language link lines that
break linking.  Add an environment variable that users can set to work
around such misconfiguration of their compilers.
2023-05-25 13:42:58 -04:00
Tyler
28ece63fee cxxmodules: Fix exported path to installed module sources in subdirs
When generating the `IMPORTED_CXX_MODULES_[CONFIG]` target property,
there was a missing path separator after a non-empty relative directory
part of the path to a module source file.

Co-authored-by: Brad King <brad.king@kitware.com>
2023-05-23 15:01:52 -04:00
Tyler
f2a699261b cxxmodules: Do not expect collator install scripts with no CXX_MODULES
Calling `install(EXPORT)` with the `CXX_MODULES_DIRECTORY` parameter
leads to installation rules being generated which `include()` CMake
scripts that set the `IMPORTED_CXX_MODULES_[CONFIG]` target property for
relevant targets.  However, these scripts don't get generated for
targets in an export set which don't have any C++20 modules.  When the
installation rules attempt to `include()` the missing scripts, the
install fails.

Co-authored-by: Brad King <brad.king@kitware.com>
2023-05-23 15:01:32 -04:00
Brad King
f9677cc122 Tests: Improve RunCMake.CXXModules expectation matching and error reporting 2023-05-23 15:00:46 -04:00
Brad King
d491ea1973 Merge topic 'ep-update-disconnected'
8cc45e150a ExternalProject: Make hg download method respect UPDATE_DISCONNECTED
1512dc43cb ExternalProject: Avoid reconfigure when updates are disconnected
1d29cf37a1 Tests: Reduce warning noise in ExternalProjectUpdate test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8498
2023-05-23 11:06:19 -04:00
Brad King
6503ce9434 Merge topic 'correct_cuda_complex_adding_bad_rpath_entries'
4f10111e95 CUDA: Cuda* tests add rpath entry only for need cuda lib directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8473
2023-05-23 11:05:01 -04:00