Commit Graph

33156 Commits

Author SHA1 Message Date
Kitware Robot
eaaccaa230 CMake Nightly Date Stamp 2022-11-01 00:01:06 -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
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
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
ζ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
Brad King
f6034c5f6f Merge topic 'cpack-trace-argument' into release-3.25
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:12 -04:00
Brad King
643c05b1e2 Merge topic 'vswhere-support-x86'
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:08 -04:00
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
fa040cedad Merge topic 'ninja-intl-paths'
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:36 -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
Kitware Robot
f2432780b3 CMake Nightly Date Stamp 2022-10-27 00:01:05 -04:00
Kyle Edwards
3d6a8d7eac cmMakefileProfilingData: Refactor to use RAII
And add a more generic StartEntry() method.
2022-10-26 17:54:08 -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
Kyle Edwards
7ecbe324b0 cmake --workflow: add --fresh option
Fixes: #24073
2022-10-26 12:01:25 -04:00
Kyle Edwards
7d9aa0f00c cmake::Workflow: Refactor to use enum class argument 2022-10-26 12:01:01 -04:00
Kyle Edwards
322193afcd cmake --workflow: print usage and exit on unrecognized argument
Issue: #24073
2022-10-26 12:00:57 -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
Kitware Robot
fd57ced75a CMake Nightly Date Stamp 2022-10-26 00:01:19 -04:00
Brad King
c0dd3dd2c1 Xcode: Evaluate Swift compile definitions separately
Xcode has a separate setting for Swift compile definitions, so we can
compute a dedicated value for it.  Therefore we can:

* Support the COMPILE_LANGUAGE generator expression for Swift-specific
  filters.

* Avoid passing the `=value` part of definitions, which Swift does
  not support.

This revises commit 5cb625eb2f (Xcode: Pass compile definitions to
Swift, 2022-06-19, v3.25.0-rc1~493^2) and reverts commit 12c6fec6b4
(Xcode: Drop CMAKE_INTDIR= definition in Swift targets, 2022-09-30,
v3.25.0-rc1~60^2~2), as the latter is no longer needed.

Fixes: #24086
2022-10-25 14:09:28 -04:00
Kyle Edwards
70aef29427 cmake --workflow: print usage message 2022-10-25 10:52:07 -04:00
Kyle Edwards
b5ebaa0d9c CPack: Require no argument for --trace and --trace-expand
This was accidentally broken by commit 87c762d435 (CPack: Use
cmCommandLineArgument instead of cmsys::CommandLineArguments,
2022-04-18, v3.24.0-rc1~258^2).

Fixes: #24085
2022-10-25 10:11:20 -04:00
Kitware Robot
30e0358d84 CMake Nightly Date Stamp 2022-10-25 00:01:11 -04:00
Brad King
c2ec949a05 Merge topic 'set_environment_generator'
3c3bce133d cmake: Honor CMAKE_GENERATOR env var in --help output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !7808
2022-10-24 12:35:33 -04:00