Commit Graph

33437 Commits

Author SHA1 Message Date
Craig Scott ba981bb2ed TryCompileCode(): Prevent warning on return value
Some newer compilers warn in situations where the returned local
variable could be movable, but a C++11 defect meant older compilers
may still return a copy when a type conversion is involved. Adding
the suggested std::move prevents that warning on that compiler, but
creates a new warning on others. Constructing the actual return type
explicitly with the suggested std::move on the constructor argument
keeps both sets of compilers happy.
2022-12-30 10:42:55 +11:00
Brad King a1b71112d1 Merge topic 'configure-log'
6c40e0b25e ConfigureLog: Version individual events instead of the whole log
048a02d5bb ConfigureLog: Log try_compile and try_run checks
746c776caf ConfigureLog: Add infrastructure for structured configure event logging
e8b8d82cbf Tests: Generalize RunCMake expectation component names
8d29a0bda6 cmTryRunCommand: Factor out stdout/stderr capture conditions
fdda4095a3 cmCoreTryCompile: Return more semantic information from compile step

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8017
2022-12-17 08:44:50 -05:00
Kitware Robot 6755178d24 CMake Nightly Date Stamp 2022-12-17 00:01:10 -05:00
Brad King 6c40e0b25e ConfigureLog: Version individual events instead of the whole log
In order to support multiple log versions without buffering the
entire log, move versioning to the level of individual events.
Multiple versions of an event may then be logged consecutively.

Issue: #23200
2022-12-16 10:12:25 -05:00
Matthew Woehlke 048a02d5bb ConfigureLog: Log try_compile and try_run checks
Add configure log events for `try_compile` and `try_run` results.

Issue: #23200
2022-12-16 10:12:25 -05:00
Matthew Woehlke 746c776caf ConfigureLog: Add infrastructure for structured configure event logging
Add infrastructure for a "configure log".  Use YAML for a balance of
machine- and human-readability to records details of configure-time
events in a structured format.

Teach the RunCMake test framework to support matching the configure log.

Issue: #23200
2022-12-16 10:11:37 -05:00
Brad King eec3aa11fc Merge topic 'genex-config-mapping-imported-targets'
e455265d72 Genex: Fix CONFIG on imported target with no explicit mapping

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8016
2022-12-16 09:04:49 -05:00
Luis Caro Campos e455265d72 Genex: Fix CONFIG on imported target with no explicit mapping
When evaluating the `$<CONFIG>` genex on an imported target has the
`IMPORTED_CONFIGURATIONS` property set, the current project has a config
that does not match any of those, and no explicit configuration mappings
are defined, fall back to the same configuration as `IMPORTED_LOCATION`.

Fixes: #24222
2022-12-16 09:00:34 -05:00
Brad King 9be0cdc22f Merge topic 'masm-debug-format'
64303b9743 ASM_MARMASM: Fix VS flag table entry for debug flag
5f8e4de696 ASM_MARMASM: Populate MSVC debug information format abstraction table
f62a0f53bf Merge branch 'backport-masm-debug-format' into masm-debug-format
a9bd1e34ef VS: Do not enable ASM_MASM debug information unless requested
98ba122a30 ASM_MASM: Populate MSVC debug information format abstraction table

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8022
2022-12-16 08:55:22 -05:00
Kitware Robot 9a3c232dc0 CMake Nightly Date Stamp 2022-12-16 00:01:06 -05:00
Brad King f62a0f53bf Merge branch 'backport-masm-debug-format' into masm-debug-format 2022-12-15 11:55:09 -05:00
Brad King a9bd1e34ef VS: Do not enable ASM_MASM debug information unless requested
MSBuild enables debug information with MASM by default, but for us
that is not consistent with behavior on other generators.
2022-12-15 11:53:40 -05:00
Kitware Robot 26ab669173 CMake Nightly Date Stamp 2022-12-15 00:01:08 -05:00
Brad King 8d29a0bda6 cmTryRunCommand: Factor out stdout/stderr capture conditions 2022-12-14 11:42:29 -05:00
Brad King fdda4095a3 cmCoreTryCompile: Return more semantic information from compile step
Update the `TryCompileCode` signature to allow callers to distinguish
between administrative failures and a compilation failure.  Return
results in a structure to which more information can be added later.
2022-12-14 11:42:29 -05:00
Brad King 84c2518a7b Merge topic 'COMPILE_DEFINITIONS-property-cleanup'
7480fa0a5f COMPILE_DEFINITIONS property: ensure leading -D is removed in all cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8004
2022-12-14 09:03:08 -05:00
Brad King 15dcb41f20 Merge topic 'vectorfix'
6d15754814 Make vector operations more efficient

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !8010
2022-12-14 09:01:41 -05:00
Kitware Robot fd8c8e2103 CMake Nightly Date Stamp 2022-12-14 00:01:11 -05:00
Marc Chevrier 7480fa0a5f COMPILE_DEFINITIONS property: ensure leading -D is removed in all cases
Fixes: #24186
2022-12-13 16:54:56 +01:00
Kitware Robot ff875ed859 CMake Nightly Date Stamp 2022-12-13 00:01:09 -05:00
Kitware Robot 07fe1c9eb8 CMake Nightly Date Stamp 2022-12-12 00:01:17 -05:00
Kitware Robot 73766b5cd2 CMake Nightly Date Stamp 2022-12-11 00:01:09 -05:00
Rose 6d15754814 Make vector operations more efficient 2022-12-10 12:48:09 -05:00
Kitware Robot 192903b244 CMake Nightly Date Stamp 2022-12-10 00:01:11 -05:00
Brad King d83b1dbac6 Merge topic 'file-make-directory-descriptive-errors'
efae1ab68b file(MAKE_DIRECTORY): Provide a more descriptive error message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8003
2022-12-09 07:57:22 -05:00
Brad King 8e46329f35 Merge topic 'lcc-upd-warning'
b1577f7a6a LCC: Update -Wunused-variable warning number as of LCC 1.26.16

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8006
2022-12-09 07:54:00 -05:00
Kitware Robot d1b9e03b79 CMake Nightly Date Stamp 2022-12-09 00:01:18 -05:00
makise-homura b1577f7a6a LCC: Update -Wunused-variable warning number as of LCC 1.26.16 2022-12-08 20:34:58 +03:00
Brad King 986fce1fa7 Merge topic 'vs-version-var'
5ce0f03cce VS: Add a variable to report the Visual Studio version build number
55529c5e93 Help: Factor out VS Build Number components document fragment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8000
2022-12-08 08:03:20 -05:00
Brad King d5d4c698e9 Merge topic 'ccmake-aix-curses'
d91d9ec431 ccmake: Restore compilation with AIX curses.h

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8001
2022-12-08 07:58:07 -05:00
Terence Noone efae1ab68b file(MAKE_DIRECTORY): Provide a more descriptive error message
Previously, MAKE_DIRECTORY would print `problem creating directory: {}`,
which was very unhelpful for debugging.  Extend the message with the
OS error string.
2022-12-08 07:54:55 -05:00
Kitware Robot 51f5ed0a7a CMake Nightly Date Stamp 2022-12-08 00:01:11 -05:00
Brad King d91d9ec431 ccmake: Restore compilation with AIX curses.h
On AIX, including `<curses.h>` includes `<term.h>` which defines
a bunch of non-prefixed, lower-case macro names.  Undefine one
that conflicts with our source code.

Fixes: #24229
2022-12-07 17:57:28 -05:00
Brad King 5ce0f03cce VS: Add a variable to report the Visual Studio version build number
VS 2017 and above come with a Visual Studio Installer tool that tracks
four-component Visual Studio version numbers.  We already detect the VS
version number because it is needed to make some generation decisions.
Provide the number to projects in a `CMAKE_VS_VERSION_BUILD_NUMBER`
variable so they can use it similarly.

Fixes: #24230
2022-12-07 17:49:04 -05:00
Brad King 127fa54808 Merge topic 'vs-dotnet-sdk-xaml-resx'
c445dd2797 VS: Add Xaml and Resx files to .Net SDK style projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7991
2022-12-07 08:20:46 -05:00
Brad King 3b4337adc7 Merge topic 'clang-tidy-export-fixes-dir'
232467eb1c clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7982
2022-12-07 08:19:53 -05:00
Brad King 6bae244ad2 Merge topic 'cmstrcat-any-rvalue-arg'
1cca051470 cmStrCat(): allow any argument to be an rvalue string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !7993
2022-12-07 08:19:08 -05:00
Brad King e544f2427d Merge topic 'stop_parsing_after_first_script_arg'
08aa516880 cmake: Stop parsing after `--` when detecting script mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7992
2022-12-07 08:17:14 -05:00
Kitware Robot 68f8a01802 CMake Nightly Date Stamp 2022-12-07 00:01:10 -05:00
Kyle Edwards 1cca051470 cmStrCat(): allow any argument to be an rvalue string
This will allow us to re-use any rvalue allocation that is
available, not just from the first argument.
2022-12-06 13:54:42 -05:00
Robert Maynard 08aa516880 cmake: Stop parsing after -- when detecting script mode
Fixes #24220
2022-12-06 13:04:31 -05:00
Kyle Edwards 232467eb1c clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR property
Fixes: #21362
2022-12-06 10:39:29 -05:00
Quentin Berthet c445dd2797 VS: Add Xaml and Resx files to .Net SDK style projects
Improve parity with classic MSBuild projects.

Fixes: #23415
2022-12-06 15:42:23 +01:00
Brad King aeac9b4660 Merge topic 'automoc-case-change'
318ec07560 automoc: Remove existing output file before invoking moc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7985
2022-12-06 08:10:03 -05:00
Brad King f1f064b7b2 Merge topic 'cxx-module-map-clang'
2c558cfd1b gitlab-ci: add CI jobs for Clang with C++20 modules
abd42e9cfc ci: add a Docker container for clang support of C++20 modules
51093f3002 Clang-FindBinUtils: also find `clang-scan-deps`
0b333de923 ci: add C++ module rules file for Clang
21b9fb1e8c cmCxxModuleMapper: support the `clang` module map format
9c66224668 cmNinjaTargetGenerator: skip setting `depfile` for `none` scantypes
9123a0991f cmNinjaTargetGenerator: use `.clear()` to empty out some strings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Merge-request: !7978
2022-12-06 08:04:18 -05:00
Kitware Robot 85d89ca885 CMake Nightly Date Stamp 2022-12-06 00:01:09 -05:00
Brad King e0a35098bb Merge topic 'ArgumentFlags-function-args'
466f9b886d cmTargetPropCommandBase::HandleArguments: flags must be OR'able

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7983
2022-12-05 12:58:57 -05:00
Brad King 7006ca9190 Merge topic 'find_library-arch-unknown'
e7f78309e7 find_library: Construct paths by removing 'unknown' from library arch

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7921
2022-12-05 12:57:11 -05:00
Brad King 5b1150e0e7 Merge topic 'link-options-cache'
7c63372c22 cmGeneratorTarget: Fix regression in CUDA device link options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7981
2022-12-05 12:55:50 -05:00
Kitware Robot 03da25a44a CMake Nightly Date Stamp 2022-12-05 00:01:22 -05:00