Commit Graph

33174 Commits

Author SHA1 Message Date
Kitware Robot
7988cb25c1 CMake Nightly Date Stamp 2022-11-05 00:01:09 -04:00
Brad King
dd8065fdda Merge topic 'vs-default-toolset'
c50df859c5 VS: Restore support for two-part default toolset version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7864
2022-11-04 11:27:00 -04:00
Kitware Robot
182ef53d3d CMake Nightly Date Stamp 2022-11-04 00:01:05 -04:00
Brad King
c50df859c5 VS: Restore support for two-part default toolset version
Since commit f972e4fd3a (cmVSGenerator: Add support for two-part toolset
versions for Visual Studio, 2022-09-01, v3.25.0-rc1~180^2), if a
two-part toolset version is requested, we fail early if globbing finds
no auxiliary toolsets with that version.  This broke our existing
support for detecting when the default toolset matches the two-part
version requested.  Fix the logic to ignore the two-part globbing
results if they are empty so we fall through to checking the default
version.

Fixes: #24107
2022-11-03 11:39:30 -04:00
Brad King
55ef776a62 Merge topic 'xcode-swift-include-dirs'
cb4e6702b2 Xcode: Implement Swift include directories
e1ccab12d7 Xcode: Restore Swift framework search directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7858
2022-11-03 08:14:15 -04:00
Kitware Robot
260cb58450 CMake Nightly Date Stamp 2022-11-03 00:01:08 -04:00
Brad King
cb4e6702b2 Xcode: Implement Swift include directories
Populate Xcode's `SWIFT_INCLUDE_PATHS` build setting with the
target-wide include directories.

Issue: #24116
2022-11-02 17:03:21 -04:00
Brad King
e1ccab12d7 Xcode: Restore Swift framework search directories
Previously we selected a single "language for preprocessor" with which
to compute both target-wide `GCC_PREPROCESSOR_DEFINITIONS` and
`{HEADER,FRAMEWORK}_SEARCH_PATHS`.  Since commit c0dd3dd2c1 (Xcode:
Evaluate Swift compile definitions separately, 2022-10-25,
v3.25.0-rc3~16^2) we never compute `GCC_PREPROCESSOR_DEFINITIONS` for
Swift.  Therefore we need to select the language for target-wide include
and framework directories separately.

Fixes: #24116
2022-11-02 16:57:36 -04:00
Kitware Robot
22188cb940 CMake Nightly Date Stamp 2022-11-02 00:01:06 -04:00
Brad King
b45f9b3643 CMake 3.25.0-rc3 2022-11-01 13:10:48 -04:00
Brad King
a9d5a0bf4b Merge topic 'compile-commands-output-field'
887a8874c3 EXPORT_COMPILE_COMMANDS: add `output` field

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7844
2022-11-01 09:02:15 -04:00
Brad King
3f5d8562df Merge topic 'cmp0141-pch-reuse'
183b9a9eca CMP0141: Fix PCH REUSE_FROM under policy NEW behavior
4d13f472a2 Tests: Drop redundant project init from RunCMake.PrecompileHeaders cases
2e65fe92db cmLocalGenerator: Clarify name of local PDB type variable
17096aeba8 cmLocalGenerator: Factor out helper to compute MSVC_DEBUG_INFORMATION_FORMAT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7854
2022-11-01 08:53:51 -04:00
Kitware Robot
eaaccaa230 CMake Nightly Date Stamp 2022-11-01 00:01:06 -04:00
Brad King
183b9a9eca CMP0141: Fix PCH REUSE_FROM under policy NEW behavior
Under the CMP0141 NEW behavior added by commit 0e96a20478 (MSVC: Add
abstraction for debug information format, 2022-08-25, v3.25.0-rc1~142^2~1),
the `-Zi` and `-ZI` flags do not appear in `CMAKE_<LANG>_FLAGS_<CONFIG>`
anymore.  Teach the PCH REUSE_FROM implementation to recognize the
`EditAndContinue` and `ProgramDatabase` debug information formats
through the policy's new abstraction.

Fixes: #24106
2022-10-31 12:19:06 -04:00
Brad King
2e65fe92db cmLocalGenerator: Clarify name of local PDB type variable 2022-10-31 12:16:54 -04:00
Brad King
17096aeba8 cmLocalGenerator: Factor out helper to compute MSVC_DEBUG_INFORMATION_FORMAT 2022-10-31 12:16:45 -04:00
Brad King
35a231bf0f Merge topic 'ewilde/swift-output-file-map-logic'
e88509d0e8 Swift: Omit output-file-map when used as a linker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7835
2022-10-31 09:54:12 -04:00
Brad King
353f850f29 Merge topic 'vs-CLRSupport'
eef13a4b33 VS: Add COMMON_LANGUAGE_RUNTIME support for "netcore"
0815329dbc Help: Format COMMON_LANGUAGE_RUNTIME values as a definition list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7807
2022-10-31 09:53:08 -04:00
Brad King
447921ef44 Merge topic 'file-download-log-with-hash'
d78671879b file(DOWNLOAD): Fix LOG with EXPECTED_HASH on download failure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7848
2022-10-31 09:47:19 -04:00
Brad King
c8f3ba7214 Merge topic 'file-download-log-with-hash' into release-3.25
d78671879b file(DOWNLOAD): Fix LOG with EXPECTED_HASH on download failure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7848
2022-10-31 09:47:18 -04:00
Brad King
5b23e3021b Merge topic 'ninja-showIncludes-encoding'
a0d4e3bf34 cmGeneratedFileStream: Drop unused WriteRaw method
2e5af30ce0 Ninja: Match showIncludes dependencies using console output code page
e1c1679148 cm_codecvt: Add support for the Windows console output code page
328c15189d cmGeneratedFileStream: Add support for a temporary alternate encoding

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7845
2022-10-31 09:44:12 -04:00
Brad King
d69b77a9ca Merge topic 'ninja-showIncludes-encoding' into release-3.25
a0d4e3bf34 cmGeneratedFileStream: Drop unused WriteRaw method
2e5af30ce0 Ninja: Match showIncludes dependencies using console output code page
e1c1679148 cm_codecvt: Add support for the Windows console output code page
328c15189d cmGeneratedFileStream: Add support for a temporary alternate encoding

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7845
2022-10-31 09:44:11 -04:00
Brad King
5752150c64 Merge topic 'xcode-obj-dir'
024e3d2bf6 Xcode: Put object files in a place that Xcode cleans

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7843
2022-10-31 09:42:29 -04:00
Kitware Robot
0a2e26bcbf CMake Nightly Date Stamp 2022-10-31 00:01:12 -04:00
Aurelien Regat-Barrel
d78671879b file(DOWNLOAD): Fix LOG with EXPECTED_HASH on download failure
When `file(DOWNLOAD <url> EXPECTED_HASH <hash> LOG <logs>)` fails to
download the requested file, the hash check will also fail and make the
command exit without actually returning the curl logs as requested
by the `LOG` argument.  Report the log before checking the hash.

Issue: #24093
2022-10-30 08:42:19 -04:00
Brad King
a0d4e3bf34 cmGeneratedFileStream: Drop unused WriteRaw method
It has been superseded by `WriteAltEncoding`.
2022-10-30 08:31:35 -04:00
Brad King
2e5af30ce0 Ninja: Match showIncludes dependencies using console output code page
Generalize the fix from commit 37a279f8d1 (Ninja: Write msvc_deps_prefix
as UTF-8 when console codepage is UTF-8, 2020-07-31, v3.19.0-rc1~349^2).
`cl /showIncludes` output is encoded using the console output code page,
so this is the byte sequence that Ninja must use to match its lines.

Fixes: #24068
2022-10-30 08:29:55 -04:00
Kitware Robot
b960c481d8 CMake Nightly Date Stamp 2022-10-30 00:01:06 -04:00
Kitware Robot
3ee1017ce6 CMake Nightly Date Stamp 2022-10-29 00:01:08 -04:00
Brad King
e1c1679148 cm_codecvt: Add support for the Windows console output code page
This is distinct from the Windows ANSI code page.
2022-10-28 20:23:25 -04:00
Brad King
328c15189d cmGeneratedFileStream: Add support for a temporary alternate encoding
The Ninja generator needs to be able to write some file content in a
different encoding than the rest of the file.  Add a method to do this.
2022-10-28 20:23:25 -04:00
Evan Wilde
e88509d0e8 Swift: Omit output-file-map when used as a linker
Swift is used as the linker for non-swift files because it needs to pull
files like swiftrt.o in when swift symbols are present to ensure that
the swift runtime is linked.

The swift driver uses clang as the underlying linker, which pulls in
crtbegin.o and friends when appropriate, so using Swift as a linker for
C/C++ libraries is fine.

The output-file-map was getting passed to all Swift invocations,
regardless of whether or not we generated one. This patch changes it so
that we only include the output-file-map in the Swift compiler
invocation if we have actually generated the file.
2022-10-28 16:44:26 -07:00
Brad King
024e3d2bf6 Xcode: Put object files in a place that Xcode cleans
Since commit dc5fc898f6 (Xcode: Set object file locations using
TARGET_TEMP_DIR, 2022-09-29, v3.25.0-rc1~64^2~1), `xcodebuild clean`
does not remove the object files in our explicit `TARGET_TEMP_DIR`
because it is not under the `SYMROOT`.  Put it there.

Fixes: #24096
2022-10-28 15:38:07 -04:00
Ben Boeckel
887a8874c3 EXPORT_COMPILE_COMMANDS: add output field
Also write for all configurations from multi-config generators.

This field was added in the Clang 5 documentation and not present in the
Clang 4 documentation (sometime between Dec 2016 and Mar 2017 according
to `web.archive.org`).
2022-10-28 13:54:43 -04:00
ζeh Matt
eef13a4b33 VS: Add COMMON_LANGUAGE_RUNTIME support for "netcore"
Generate `CLRSupport` for Visual Studio projects.

Fixes: #22054
2022-10-28 11:55:58 -04:00
Brad King
94983f1d96 Merge topic 'timestamp-timezone'
9da542d5c1 string(TIMESTAMP): Add %z and %Z for adding time zone string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7788
2022-10-28 10:04:47 -04:00
Brad King
3469d53b3f Merge topic 'extended-profiling'
0fe7aae91f cmake: Add profiling events for configure and generate
3d6a8d7eac cmMakefileProfilingData: Refactor to use RAII

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7828
2022-10-28 10:04:01 -04:00
Brad King
9acf79f6f8 Merge topic 'vs-dotnet-sdk-output-paths'
d2d1be0671 VS: Fix paths in multi-target SDK-style projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7836
2022-10-28 09:58:53 -04:00
Brad King
4910efb178 Merge topic 'vs-dotnet-sdk-output-paths' into release-3.25
d2d1be0671 VS: Fix paths in multi-target SDK-style projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7836
2022-10-28 09:58:52 -04:00
Brad King
2bc177b002 Merge topic 'xcode-restore-install-path'
8d5631f0d0 Xcode: Revert "Don't set INSTALL_PATH unless target is SHARED_LIBRARY"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7839
2022-10-28 09:52:37 -04:00
Kitware Robot
c59a955ad7 CMake Nightly Date Stamp 2022-10-28 00:01:06 -04:00
Vasiliy Koyrev
9da542d5c1 string(TIMESTAMP): Add %z and %Z for adding time zone string
Fixes: #24056
2022-10-27 11:13:46 -04:00
Brad King
8d5631f0d0 Xcode: Revert "Don't set INSTALL_PATH unless target is SHARED_LIBRARY"
The change in commit 61acaa12af (xcode: Don't set INSTALL_PATH unless
target is SHARED_LIBRARY, 2022-07-14, v3.25.0-rc1~291^2) breaks some
existing use cases.  Revert it pending further investigation.

Fixes: #24087
Issue: #15183
2022-10-27 10:28:39 -04:00
Sebastian Maisch
d2d1be0671 VS: Fix paths in multi-target SDK-style projects
Set the `AppendTargetFrameworkToOutputPath` property to `false` only for
single target SDK-style projects.  This prevents outputs from being
overwritten during the build.  This revises commit 7671d71299 (VS: Fix
target output paths in SDK-style projects, 2022-09-23, v3.25.0-rc1~82^2).

Fixes: #24094
Issue: #23989
2022-10-27 09:58:09 -04:00
Kyle Edwards
0fe7aae91f cmake: Add profiling events for configure and generate 2022-10-27 09:56:49 -04:00
Brad King
ab88011579 Merge topic 'cmake-presets-workflow-arguments'
7ecbe324b0 cmake --workflow: add --fresh option
7d9aa0f00c cmake::Workflow: Refactor to use enum class argument
322193afcd cmake --workflow: print usage and exit on unrecognized argument
70aef29427 cmake --workflow: print usage message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7825
2022-10-27 09:43:39 -04:00
Brad King
33d610a076 Merge topic 'cmake-presets-workflow-arguments' into release-3.25
7ecbe324b0 cmake --workflow: add --fresh option
7d9aa0f00c cmake::Workflow: Refactor to use enum class argument
322193afcd cmake --workflow: print usage and exit on unrecognized argument
70aef29427 cmake --workflow: print usage message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7825
2022-10-27 09:43:38 -04:00
Brad King
ca80e8bdf6 Merge topic 'xcode-swift-defs'
c0dd3dd2c1 Xcode: Evaluate Swift compile definitions separately

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7826
2022-10-27 09:42:03 -04:00
Brad King
7d181917de Merge topic 'xcode-swift-defs' into release-3.25
c0dd3dd2c1 Xcode: Evaluate Swift compile definitions separately

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7826
2022-10-27 09:42:02 -04:00
Brad King
12ca3c14a5 Merge topic 'cpack-trace-argument'
b5ebaa0d9c CPack: Require no argument for --trace and --trace-expand

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7824
2022-10-27 09:29:13 -04:00