CMake merge requestshttps://gitlab.kitware.com/cmake/cmake/-/merge_requests2022-11-03T08:14:20-04:00https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7858Xcode: Restore Swift include and framework search directories2022-11-03T08:14:20-04:00Brad KingXcode: Restore Swift include and framework search directoriesPreviously we selected a single "language for preprocessor" with which
to compute both target-wide `GCC_PREPROCESSOR_DEFINITIONS` and
`{HEADER,FRAMEWORK}_SEARCH_PATHS`. Since !7826 we never compute `GCC_PREPROCESSOR_DEFINITIONS` for
Swi...Previously we selected a single "language for preprocessor" with which
to compute both target-wide `GCC_PREPROCESSOR_DEFINITIONS` and
`{HEADER,FRAMEWORK}_SEARCH_PATHS`. Since !7826 we never compute `GCC_PREPROCESSOR_DEFINITIONS` for
Swift. Therefore we need to select the language for target-wide include
directories separately.
Also populate Xcode's `SWIFT_INCLUDE_PATHS` build setting with the target-wide include directories.
Fixes: #24116
Backport: release3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7857IAR: Restore support for CMAKE_CXX_FLAGS_INIT2022-11-02T13:36:54-04:00Daniel SchürmannIAR: Restore support for CMAKE_CXX_FLAGS_INITPrior to !6458 the `--c++`/`--eec++` flags
were stored in `CMAKE_IAR_CXX_FLAG` so that they would be used as part
of the `CMAKE_CXX_COMPILE_OBJECT` rule variable. That commit moved the
flags to `CMAKE_CXX_FLAGS`, which also broke initia...Prior to !6458 the `--c++`/`--eec++` flags
were stored in `CMAKE_IAR_CXX_FLAG` so that they would be used as part
of the `CMAKE_CXX_COMPILE_OBJECT` rule variable. That commit moved the
flags to `CMAKE_CXX_FLAGS`, which also broke initialization of
`CMAKE_CXX_FLAGS` from `CMAKE_CXX_FLAGS_INIT`. Restore the original
approach.
Fixes: #24111
Backport: release3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7854CMP0141: Fix PCH REUSE_FROM under policy NEW behavior2022-11-15T06:58:44-05:00Brad KingCMP0141: Fix PCH REUSE_FROM under policy NEW behaviorUnder the CMP0141 NEW behavior added by !7606,
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 info...Under the CMP0141 NEW behavior added by !7606,
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
Backport: release3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7853FindCUDAToolkit: Add nvptxcompiler_static dependency on Threads::Threads2022-11-02T11:56:57-04:00Robert MaynardFindCUDAToolkit: Add nvptxcompiler_static dependency on Threads::ThreadsAs brought up here: https://gitlab.kitware.com/cmake/cmake/-/issues/23892#note_1268311 the `nvptxcompiler_static.a` uses symbols defined in Threads::Threads.
Verified locally with:
```
nm libnvptxcompiler_static.a | grep pthread
...As brought up here: https://gitlab.kitware.com/cmake/cmake/-/issues/23892#note_1268311 the `nvptxcompiler_static.a` uses symbols defined in Threads::Threads.
Verified locally with:
```
nm libnvptxcompiler_static.a | grep pthread
U pthread_attr_destroy
U pthread_attr_init
U pthread_attr_setdetachstate
U pthread_attr_setinheritsched
U pthread_attr_setschedparam
U pthread_attr_setschedpolicy
U pthread_attr_setstacksize
U pthread_cond_destroy
U pthread_cond_init
U pthread_cond_timedwait
U pthread_create
U pthread_exit
U pthread_getspecific
U pthread_join
U pthread_key_create
U pthread_key_delete
U pthread_kill
U pthread_mutexattr_destroy
U pthread_mutexattr_init
U pthread_mutexattr_settype
U pthread_mutex_destroy
U pthread_mutex_init
U pthread_mutex_lock
U pthread_mutex_unlock
U pthread_setspecific
```
Backport: release
Topic-rename: FindCUDAToolkit-nvptxcompiler-static-deps3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7851curl: Update to version 7.86.02023-02-09T15:01:52-05:00Brad Kingcurl: Update to version 7.86.0See !7267 for the previous curl update.
Issue: #24093
Backport: releaseSee !7267 for the previous curl update.
Issue: #24093
Backport: release3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7849Linux: Avoid finding libraries using lib64 on ArchLinux2022-10-31T09:46:23-04:00FantasqueXLinux: Avoid finding libraries using lib64 on ArchLinuxArchLinux uses `/lib` for 64-bit libraries and there is no `/lib64`. However, unlike Debian, 32-bit libraries are in `/lib32`.
Backport: release
Topic-rename: ArchLinux-lib-dirArchLinux uses `/lib` for 64-bit libraries and there is no `/lib64`. However, unlike Debian, 32-bit libraries are in `/lib32`.
Backport: release
Topic-rename: ArchLinux-lib-dir3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7848file(DOWNLOAD): Fix LOG with EXPECTED_HASH on download failure2022-11-03T09:25:11-04:00Aurelien Regat-Barrelfile(DOWNLOAD): Fix LOG with EXPECTED_HASH on download failureWhen `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. Wh...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. Which does not help to diagnose why download failed.
This MR fixes this issue by ensuring the requested curl logs are returned even on download failure.
This fix is related to #24093 (to help diagnose the problem)
Issue: #24093
Backport: release
Topic-rename: file-download-log-with-hash3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7845Ninja: Match showIncludes dependencies using console output code page2022-10-31T15:25:22-04:00Brad KingNinja: Match showIncludes dependencies using console output code pageGeneralize the fix from !5089.
`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
Backport: releaseGeneralize the fix from !5089.
`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
Backport: release3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7843Xcode: Put object files in a place that Xcode cleans2023-02-10T11:14:59-05:00Brad KingXcode: Put object files in a place that Xcode cleansSince !7730, `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
Backport: releaseSince !7730, `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
Backport: release3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7842Tests: Fix RunCMake.VsDotnetSdk with VS >= 17.3 on ARM642022-10-31T09:45:17-04:00Anthony RobertsTests: Fix RunCMake.VsDotnetSdk with VS >= 17.3 on ARM64VS 17.3 provides an arm64-native version of the tool, but the test was looking for the x64 version.
Backport: release
Topic-rename: vs-dotnetsdk-arm64VS 17.3 provides an arm64-native version of the tool, but the test was looking for the x64 version.
Backport: release
Topic-rename: vs-dotnetsdk-arm643.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7841Help: Minor formatting and cross-ref cleanup for <CONFIG>_POSTFIX2022-10-28T07:26:04-04:00Craig ScottHelp: Minor formatting and cross-ref cleanup for <CONFIG>_POSTFIXBackport: releaseBackport: release3.25.0Craig ScottCraig Scotthttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7840FindGLUT: Fix regression when pkg-config is not available2022-10-28T10:00:10-04:00Brad KingFindGLUT: Fix regression when pkg-config is not availableIn !7770 we accidentally removed the entire condition around the `pkg-config` code path instead of just the multi-config part.
Fixes: #24095
Backport: releaseIn !7770 we accidentally removed the entire condition around the `pkg-config` code path instead of just the multi-config part.
Fixes: #24095
Backport: release3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7839Xcode: Revert "Don't set INSTALL_PATH unless target is SHARED_LIBRARY"2022-10-28T09:58:34-04:00Brad KingXcode: Revert "Don't set INSTALL_PATH unless target is SHARED_LIBRARY"The change in !7473 breaks some existing use cases. Revert it pending further investigation.
Fixes: #24087
Issue: #15183
Backport: releaseThe change in !7473 breaks some existing use cases. Revert it pending further investigation.
Fixes: #24087
Issue: #15183
Backport: release3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7836VS: Fix C# output paths in multi-target SDK-style projects2022-10-28T09:58:58-04:00Sebastian MaischVS: Fix C# output paths in multi-target SDK-style projectsSet the `AppendTargetFrameworkToOutputPath` property to `false` only for
single target SDK-style projects. This prevents outputs from being
overwritten during the build. This revises !7713.
Fixes: #24094
Issue: #23989
Backport: rel...Set the `AppendTargetFrameworkToOutputPath` property to `false` only for
single target SDK-style projects. This prevents outputs from being
overwritten during the build. This revises !7713.
Fixes: #24094
Issue: #23989
Backport: release
Topic-rename: vs-dotnet-sdk-output-paths3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7829Tutorial: Restore USE_MYMATH in place of MY_MATH2022-10-27T09:40:35-04:00Markus FerrellTutorial: Restore USE_MYMATH in place of MY_MATHIn !7577 we replaced some uses of `USE_MYMATH` with `MY_MATH`.
Restore the former name for consistency with the rest of the tutorial.
Thanks to @jason-m-reich for the highlighting this issue and writing the initial change.
Backport: re...In !7577 we replaced some uses of `USE_MYMATH` with `MY_MATH`.
Restore the former name for consistency with the rest of the tutorial.
Thanks to @jason-m-reich for the highlighting this issue and writing the initial change.
Backport: release3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7826Xcode: Evaluate Swift compile definitions separately2022-11-02T11:30:26-04:00Brad KingXcode: Evaluate Swift compile definitions separatelyXcode 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` p...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 !7388 and reverts commit 12c6fec6b46f8a55ab96404532fca1ff81ef029a, as the latter is no longer needed.
Fixes: #24086
Backport: release3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7825cmake --workflow: fix unrecognized arguments, add --fresh2022-10-27T09:43:49-04:00Kyle Edwardscmake --workflow: fix unrecognized arguments, add --freshFixes: #24073
Backport: releaseFixes: #24073
Backport: release3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7823VS: Fix MSBuild property for nostdlib flag2022-10-27T09:39:17-04:00Piotr MiśVS: Fix MSBuild property for nostdlib flagThe C# flag table added by !300 and preserved by !2611 was
written by hand. Fix the entry name for the `NoStdLib` property.
Fixes: #24077
Backport: release
Topic-rename: vs-nostdlib-flag-tableThe C# flag table added by !300 and preserved by !2611 was
written by hand. Fix the entry name for the `NoStdLib` property.
Fixes: #24077
Backport: release
Topic-rename: vs-nostdlib-flag-table3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7820CPack/NSIS: Document BOM for licence encoded in UTF-82022-10-25T10:36:34-04:00Mojca MiklavecCPack/NSIS: Document BOM for licence encoded in UTF-8The only hint that the file needs to have a BOM mark is included in release notes:
* https://cmake.org/cmake/help/latest/release/3.20.html#cpack
It would make a lot more sense to document this next to the option name.
(I first wanted to...The only hint that the file needs to have a BOM mark is included in release notes:
* https://cmake.org/cmake/help/latest/release/3.20.html#cpack
It would make a lot more sense to document this next to the option name.
(I first wanted to file a feature request to support UTF-8.)
Backport: release3.25.0Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7817Help: Use array consistently in presets manual2022-10-25T10:38:00-04:00Craig ScottHelp: Use array consistently in presets manualWhen referring to data in a JSON array, use "array" consistently
rather than "list". This avoids ambiguity over whether we mean
a string containing a CMake list, or a JSON array.
Backport: release
Fixes: #24074When referring to data in a JSON array, use "array" consistently
rather than "list". This avoids ambiguity over whether we mean
a string containing a CMake list, or a JSON array.
Backport: release
Fixes: #240743.25.0Craig ScottCraig Scott