Commit Graph

33076 Commits

Author SHA1 Message Date
Brad King
fdabb69e2e Merge topic 'vswhere-support-x86' into release-3.25
6eee8c9000 VS: Fix crash finding vswhere on 32-bit Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7832
2022-10-27 09:28:07 -04:00
Brad King
74057c72d6 Merge topic 'ninja-intl-paths' into release-3.25
a12050666c Tests: Add case for ninja with non-ascii chars
02a04dd9c7 Ninja: Restore support for non-ascii paths on Windows with ninja<=1.10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7833
2022-10-27 09:26:34 -04:00
Brad King
02a04dd9c7 Ninja: Restore support for non-ascii paths on Windows with ninja<=1.10
Revert commit bbdb000c55 (GlobalNinjaGenerator: enlarge file stream
buffer, 2022-01-25, v3.23.0-rc1~68^2).  Somehow `rdbuf()->pubsetbuf()`
is resetting our imbued locale and `cm_codecvt` that handles encoding.

Fixes: #24089
2022-10-26 15:24:43 -04:00
Brad King
6eee8c9000 VS: Fix crash finding vswhere on 32-bit Windows
Since commit f85913fa08 (VS: Add support for enumerating VS instances
with vswhere, 2022-04-11, v3.24.0-rc1~282^2), if the COM lookup does not
report any VS instances, we fall back to finding vswhere.  However, the
`getenv` call returns nullptr if the `ProgramFiles(x86)` environment
variable is not set.  Update the logic to tolerate not-set environment
variables.  Also check the plain `ProgramFiles` environment variable.

Fixes: #24090
2022-10-26 11:12:46 -04:00
Brad King
c3f04fe44d Merge topic 'cmake-presets-list-workflow-type' into release-3.25
75cfbef780 cmake: Support --list-presets=workflow

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Tested-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !7816
2022-10-24 12:33:31 -04:00
Werner, Joerg
f3c918ef1b cmGlobalVisualStudioGenerator: Fix compiling as C++20 in VS 2022
Adding missing narrow string conversion.
2022-10-21 11:01:16 -04:00
Kyle Edwards
75cfbef780 cmake: Support --list-presets=workflow
Fixes: #24072
2022-10-21 10:21:21 -04:00
Brad King
d44340115f Merge topic 'filesystem-path-c++03-abi' into release-3.25
ee9805ccd1 cm/filesystem: Fix crash with pre-C++11 std::string GNU ABI in C++17

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7813
2022-10-21 10:06:20 -04:00
Brad King
47063db58d Merge branch 'filesystem-path-c++03-abi' into release-3.24
Merge-request: !7813
2022-10-20 19:03:52 -04:00
Brad King
ee9805ccd1 cm/filesystem: Fix crash with pre-C++11 std::string GNU ABI in C++17
The `remove_filename` and `replace_extension` methods compute an offset
between the whole path in a `std::string` and a part of a path in a
`std::string_view`.  This is done by subtracting their `.data()`
pointers.  However, C++17 adds a non-const `.data()` through which
modification of the string is allowed.  This means the copy-on-write
implementation used by the pre-C++11 std::string GNU ABI must reallocate
if the string has been copied.  Our subtraction then computes an offset
between two different allocations, which is undefined behavior.

The workaround in commit b3ca4f9ad1 (cm/filesystem: Work around crash
when compiled for CYGWIN/MSYS runtime, 2021-04-22, v3.21.0-rc1~271^2~2)
avoided the problem by calling the non-const `.data()` to reallocate
before constructing the `string_view`.  Instead, explicitly call the
const `.data()` method on the string, which does not reallocate.

Fixes: #22090, #23328
2022-10-20 18:31:50 -04:00
Brad King
7d710abc87 CMake 3.25.0-rc2 2022-10-19 11:22:54 -04:00
Brad King
6fa189f716 Merge topic 'cmake-presets-output-junit' into release-3.25
bea4ed5430 CTest: Add support for outputJUnitFile in presets
9270a02003 CMakePresets.json: Add outputJUnitFile to test presets schema
757786bb73 Tests: Add test for outputLogFile in CMakePresets.json
b68c3596e7 CMakePresets.json: Disallow extra properties in test output schema

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !7806
2022-10-19 10:04:29 -04:00
Brad King
86ed35cf63 Merge topic 'mingw-unc' into release-3.25
9777e4c30e MinGW Makefiles: Quote UNC paths on command lines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7802
2022-10-19 09:59:59 -04:00
Brad King
177c56e3fa Merge topic 'try_compile-CMP0128' into release-3.25
50e90e2828 try_compile: Honor CMP0128 setting in test project

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !7803
2022-10-19 09:57:08 -04:00
Kyle Edwards
bea4ed5430 CTest: Add support for outputJUnitFile in presets
Fixes: #22400
2022-10-18 16:52:23 -04:00
Kyle Edwards
9270a02003 CMakePresets.json: Add outputJUnitFile to test presets schema 2022-10-18 15:41:29 -04:00
Ed Hartley
9777e4c30e MinGW Makefiles: Quote UNC paths on command lines
UNC paths (starting with `\\`) need quotes when generating MinGW
Makefiles to avoid gmake interpreting the first `\` as an escape
character.

Fixes: #24061
2022-10-18 14:30:57 -04:00
Brad King
588c9c4145 Merge branch 'try_compile-CMP0128' into release-3.24
Merge-request: !7803
2022-10-18 14:25:52 -04:00
Brad King
599e49cf9b Merge topic 'revert_nvcc_marking_include_as_system' into release-3.25
d0e52219eb CUDA: Revert "Always mark cuda toolkit as system include"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7798
2022-10-18 13:45:56 -04:00
Brad King
50e90e2828 try_compile: Honor CMP0128 setting in test project
Some projects pass a raw `-std=` flag to the compiler in the
`try_compile` project.  If they do not set CMP0128 to NEW,
we should not append a `-std=` flag where we did not before
the policy was added.

Fixes: #24063
2022-10-18 13:38:00 -04:00
Robert Maynard
d0e52219eb CUDA: Revert "Always mark cuda toolkit as system include"
We need to revert this change as it can disable error messages
when compiling invalid CUDA code.

This reverts commit ea659b155d (CUDA: Always mark cuda toolkit as system
include, 2022-06-27, v3.25.0-rc1~269^2).
2022-10-17 10:17:33 -04:00
Marc Chevrier
4aa86da827 Xcode: ensure framework with custom output directory can be consumed
Fixes: #24046
2022-10-14 09:13:37 -04:00
Brad King
ed084886b7 CMake 3.25.0-rc1 2022-10-12 10:23:58 -04:00
Brad King
5d132113b1 Begin 3.25 release versioning 2022-10-11 11:13:05 -04:00
Kitware Robot
e21071ec4b CMake Nightly Date Stamp 2022-10-11 00:01:15 -04:00
Brad King
4507237960 Merge topic 'verify-header-sets-iwyu'
6942234bf5 VERIFY_INTERFACE_HEADER_SETS: Add IWYU pragma: associated to verification file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7762
2022-10-10 10:21:09 -04:00
Brad King
1fea40c85a Merge topic 'cuda_sanitizer_false_positives'
59fcbba65e ctest_memcheck: ignore false-positives in CUDA's compute-sanitizer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7760
2022-10-10 10:19:56 -04:00
Brad King
eebbe36ae6 Merge topic 'Intel-Fortran-warn-errors'
13f3382b1c Intel/IntelLLVM: Fortran has distinct "-Werror"-like flag
ab8a0a106e COMPILE_WARNING_AS_ERROR: Fix internal formatting of options table

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7758
2022-10-10 09:49:46 -04:00
Kitware Robot
86e7704d0e CMake Nightly Date Stamp 2022-10-10 00:01:17 -04:00
Kitware Robot
8b15f532db CMake Nightly Date Stamp 2022-10-09 00:01:12 -04:00
Kitware Robot
5a0b9e5f88 CMake Nightly Date Stamp 2022-10-08 00:01:15 -04:00
Daniel Hannon
6942234bf5 VERIFY_INTERFACE_HEADER_SETS: Add IWYU pragma: associated to verification file 2022-10-07 19:00:28 +01:00
Tobias Ribizel
59fcbba65e ctest_memcheck: ignore false-positives in CUDA's compute-sanitizer
Add a list of false-positive messages from CUDA's compute-sanitizer to
the CTest memcheck.

Fixes: #24001
2022-10-07 11:36:12 -04:00
Brad King
a07be2ffd1 Merge topic 'clang-tidy-prefer-p-option'
3f4e0839c4 clang-tidy: Don't append compiler commands if using -p

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7753
2022-10-07 11:20:03 -04:00
Brad King
5f9994a6c1 Merge topic 'improve-symlink-error-reporting'
569fb1893e file(INSTALL): Report "Installing:" for a symlink to a directory
1461ae4933 file(INSTALL): Clarify symlink vs dir conflict errors
85f01a1ec2 file(INSTALL): Improve formatting of symlink creation error
aba48bd6ac cmSystemTools: Provide quiet link creation methods

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7706
2022-10-07 10:47:23 -04:00
Craig Scott
3f4e0839c4 clang-tidy: Don't append compiler commands if using -p
When the -p option is given to clang-tidy, it doesn't need the compile
command line to be appended. It can get everything it needs from the
compile_commands.json file in the directory specified with the -p option.
When the compiler being used is not the system default compiler,
clang-tidy has been observed to pick up the wrong headers when the
compiler command line is given, but not if only the -p option is used.
Therefore, don't append the compiler command line if -p is present in
the <LANG>_CLANG_TIDY target property.

Fixes: #24017
2022-10-07 10:33:32 -04:00
Brad King
6d65e8a5ab Merge topic 'automoc-skip-pch'
681714ce20 AUTOMOC: Skip PCH when all sources files skip the PCH file too

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7759
2022-10-07 10:17:26 -04:00
Brad King
ab8a0a106e COMPILE_WARNING_AS_ERROR: Fix internal formatting of options table
In commit 76a08cd253 (COMPILE_WARNING_AS_ERROR: Add options to treat
warnings as errors, 2022-04-21, v3.24.0-rc1~173^2) we formatted the
options table entries as command-line string fragments.  Since they are
part of the `CMAKE_${lang}_COMPILE_OPTIONS_*` tables, they should be
formatted as `;`-separated lists of compiler options.
2022-10-07 10:05:21 -04:00
Kitware Robot
c09152ad4b CMake Nightly Date Stamp 2022-10-07 00:01:16 -04:00
Cristian Adam
681714ce20 AUTOMOC: Skip PCH when all sources files skip the PCH file too
Fixes: #23464
2022-10-06 22:12:22 +02:00
John Parent
569fb1893e file(INSTALL): Report "Installing:" for a symlink to a directory 2022-10-06 15:10:23 -04:00
John Parent
1461ae4933 file(INSTALL): Clarify symlink vs dir conflict errors
Clarify error reporting in scenario creating a symlink where a directory
previously exists.
2022-10-06 15:10:05 -04:00
Brad King
85f01a1ec2 file(INSTALL): Improve formatting of symlink creation error
Avoid printing two error messages.  Format paths without wrapping.
2022-10-06 15:08:06 -04:00
Brad King
aba48bd6ac cmSystemTools: Provide quiet link creation methods
Offer variants that let the caller handle error messages.
2022-10-06 14:38:53 -04:00
Brad King
2133cf2c8e Merge topic 'try_compile-more-debug-logging'
7e6b2a92a0 try_compile: Report build dir with --debug-trycompile
cbf3252975 Tests: Remove stray debugging flag from RunCMake.CheckCompilerFlag case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7746
2022-10-06 08:45:25 -04:00
Brad King
1e364201e6 Merge topic 'self-target_sources'
440822fa5c Source: Fix regression causing CMakeLib sources to be compiled repeatedly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7748
2022-10-06 08:27:20 -04:00
Matthew Woehlke
7e6b2a92a0 try_compile: Report build dir with --debug-trycompile
When `--debug-trycompile` is enabled, issue a log (with trace) for every
`try_compile` noting what directory is being used for the compilation.
This will make it easier to find the corresponding artifacts.

Closes: #24022
2022-10-06 08:13:03 -04:00
Kitware Robot
eaeb9b6040 CMake Nightly Date Stamp 2022-10-06 00:01:12 -04:00
Brad King
440822fa5c Source: Fix regression causing CMakeLib sources to be compiled repeatedly
In commit 4ff8604604 (Build: Do not use variables for sources lists,
2022-08-21) the sources of `CMakeLib` were accidentally made PUBLIC.
This causes them to be compiled again in all consuming targets.
Make the sources PRIVATE instead.
2022-10-05 12:51:44 -04:00
Kitware Robot
f2a4d7b2c3 CMake Nightly Date Stamp 2022-10-05 00:01:12 -04:00