CMake merge requestshttps://gitlab.kitware.com/cmake/cmake/-/merge_requests2022-12-08T09:32:49-05:00https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6790CMakeParseLibraryArchitecture: Fix parsing /lib/<arch> implicit object path2022-12-08T09:32:49-05:00Raphael GozzoCMakeParseLibraryArchitecture: Fix parsing /lib/<arch> implicit object pathThe current regular expression is able to match `/usr/lib/<arch>`, `/usr/usr/lib/<arch>`, `/usr/usr/usr/lib/<arch>`, ... but not `/lib/<arch>`.
This behavior ends up causing the detected architecture to be `x86_64-pc-linux-gnu` when the...The current regular expression is able to match `/usr/lib/<arch>`, `/usr/usr/lib/<arch>`, `/usr/usr/usr/lib/<arch>`, ... but not `/lib/<arch>`.
This behavior ends up causing the detected architecture to be `x86_64-pc-linux-gnu` when the Clang compiler is installed on a "non-system" location (like `/opt/llvm-13`) which, in turn, makes almost every `find_library()` fail because the correct architecture is `x86_64-linux-gnu`.
This is due to a typo in !5984, which used `+` instead of `?`.
Backport: release
Topic-rename: lib-arch-no-usr3.22.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6789HIP: Enable CMAKE_EXPORT_COMPILE_COMMANDS for HIP2021-12-07T10:37:50-05:00Brad KingHIP: Enable CMAKE_EXPORT_COMPILE_COMMANDS for HIPFixes: #22986
Backport: releaseFixes: #22986
Backport: release3.22.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6784Utilities/Release: Add script to sign/notarize macOS application bundle2021-12-07T10:41:33-05:00Brad KingUtilities/Release: Add script to sign/notarize macOS application bundleWe produce macOS binaries for `cmake.org` using GitLab CI jobs.
Binaries for official releases are additionally signed and notarized
manually by a maintainer with suitable signing certificates and Apple
developer account credentials. Ad...We produce macOS binaries for `cmake.org` using GitLab CI jobs.
Binaries for official releases are additionally signed and notarized
manually by a maintainer with suitable signing certificates and Apple
developer account credentials. Add a script to drive these steps.
Backport: release:HEAD~1^23.22.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6782ci: Enable more VS tests that use managed code2021-12-06T15:16:04-05:00Brad Kingci: Enable more VS tests that use managed codeA couple of VS tests were conditioned on `NOT CMAKE_GENERATOR_TOOLSET`,
but in CI jobs with VS we always set `CMAKE_GENERATOR_TOOLSET`. Make
the condition specific to excluding the `v90` toolset, which was its
original intention anyway....A couple of VS tests were conditioned on `NOT CMAKE_GENERATOR_TOOLSET`,
but in CI jobs with VS we always set `CMAKE_GENERATOR_TOOLSET`. Make
the condition specific to excluding the `v90` toolset, which was its
original intention anyway.
Backport: release3.22.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6781VS: Revert "Add missing label in C# project-build events"2021-12-03T08:54:38-05:00Brad KingVS: Revert "Add missing label in C# project-build events"Revert !6485. The change broke cases using
multiple successful custom commands. Revert it pending further
investigation into the interaction of the generated script code with
`Microsoft.Common.CurrentVersion.targets`, and whether this ...Revert !6485. The change broke cases using
multiple successful custom commands. Revert it pending further
investigation into the interaction of the generated script code with
`Microsoft.Common.CurrentVersion.targets`, and whether this is needed
for all managed projects or just C# projects.
Also add a test covering the case that was broken.
Fixes: #22964
Issue: #21440
Backport: release3.22.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6780FindPkgConfig: Restore finding pkg-config before pkgconf2021-12-03T08:53:30-05:00Brad KingFindPkgConfig: Restore finding pkg-config before pkgconfSince !6301, `pkgconf` is preferred over `pkg-config`
if they appear in the same directory. In some environments,
`pkg-config` may be a wrapper that adds semantics beyond either
`pkgconf` or the normal `pkg-config`. Prefer `pkg-config`...Since !6301, `pkgconf` is preferred over `pkg-config`
if they appear in the same directory. In some environments,
`pkg-config` may be a wrapper that adds semantics beyond either
`pkgconf` or the normal `pkg-config`. Prefer `pkg-config` over
`pkgconf` in order to preserve the prior behavior in such environments.
Fixes: #22976
Backport: release3.22.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6779file(RPATH): Restore tolerance of unknown formats if new RPATH is empty2023-03-27T17:09:24-04:00Brad Kingfile(RPATH): Restore tolerance of unknown formats if new RPATH is emptySince !6239 the `file(RPATH_...)` operations fail on
files that are not ELF or XCOFF format. Previously the RPATH operations
tolerated files of unknown format if the goal was to produce a file with
an empty RPATH. Restore this toleranc...Since !6239 the `file(RPATH_...)` operations fail on
files that are not ELF or XCOFF format. Previously the RPATH operations
tolerated files of unknown format if the goal was to produce a file with
an empty RPATH. Restore this tolerance in order to support setting an
empty RPATH on GNU ld scripts.
Fixes: #22963
Backport: release3.22.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6773GNUInstallDirs: Prefer system lib64 over conda lib when ambiguous2021-12-01T09:35:48-05:00Robert MaynardGNUInstallDirs: Prefer system lib64 over conda lib when ambiguousUpdate logic added by !6512. When it is ambiguous if we are doing a conda install or a system install prefer using the system library directory
Fixes: #22962
Backport: release
Topic-rename: GNUInstallDirs-conda-fixUpdate logic added by !6512. When it is ambiguous if we are doing a conda install or a system install prefer using the system library directory
Fixes: #22962
Backport: release
Topic-rename: GNUInstallDirs-conda-fix3.22.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6772FindPython: clarify static libraries hint usage2021-12-02T11:48:42-05:00Marc ChevrierFindPython: clarify static libraries hint usageFixes: #22956
Backport: release
Topic-rename: FindPython-static-libs-hintFixes: #22956
Backport: release
Topic-rename: FindPython-static-libs-hint3.22.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6768Help: Clarify behavior of if() basic expressions2021-12-01T09:37:45-05:00Craig ScottHelp: Clarify behavior of if() basic expressionsChanges are in response to the following forum discussion: https://discourse.cmake.org/t/if-something-strikes-again/4330
The behavior of `if(ENV{some_var})` is potentially unexpected. It is also easy to miss the effect of `CMP0054` when...Changes are in response to the following forum discussion: https://discourse.cmake.org/t/if-something-strikes-again/4330
The behavior of `if(ENV{some_var})` is potentially unexpected. It is also easy to miss the effect of `CMP0054` when the expression is a quoted string.
Backport: release
Topic-rename: doc-if-basic-expressions3.22.1Craig ScottCraig Scotthttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6762mingw: fix calling convention for strftime()2021-12-01T09:33:27-05:00Christoph Reitermingw: fix calling convention for strftime()`strftime` uses `__cdecl` and not `__stdcall`. This was exposed by refactoring in !6737.
This fixes a crash creating a timestamp with clang+mingw-w64 targeting x86.
Fixes: #22939
Backport: release
Topic-rename: mingw-strftime-crash`strftime` uses `__cdecl` and not `__stdcall`. This was exposed by refactoring in !6737.
This fixes a crash creating a timestamp with clang+mingw-w64 targeting x86.
Fixes: #22939
Backport: release
Topic-rename: mingw-strftime-crash3.22.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6760gitlab-ci: shorten job prefixes in 3.22 release branch2021-11-23T11:40:17-05:00Brad Kinggitlab-ci: shorten job prefixes in 3.22 release branchThis helps to maximize the amount of information visible in the GitLab
web interface.
Also document their meaning in the developer documentation and in the CI
configuration file directly.
This backports !6744 to the `release` branch, a...This helps to maximize the amount of information visible in the GitLab
web interface.
Also document their meaning in the developer documentation and in the CI
configuration file directly.
This backports !6744 to the `release` branch, and adds a maintainer guide documentation update missed in that MR.
See: https://gitlab.com/gitlab-org/gitlab/-/issues/8496
Backport: release:HEAD^23.22.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6759CompilerId: Restore support for classic C by avoiding C++ style comments2021-11-29T12:27:41-05:00Brad KingCompilerId: Restore support for classic C by avoiding C++ style commentsC++ style comments were added by !6177, but they may not be supported by the default mode of some C compilers. Use C-style comments instead. For consistency, do this for all languages.
Fixes: #22942
Backport: releaseC++ style comments were added by !6177, but they may not be supported by the default mode of some C compilers. Use C-style comments instead. For consistency, do this for all languages.
Fixes: #22942
Backport: release3.22.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6756Help: Document more use cases for CMAKE_POLICY_DEFAULT_CMPNNNN2021-11-23T09:53:46-05:00Brad KingHelp: Document more use cases for CMAKE_POLICY_DEFAULT_CMPNNNNThe documentation for this variable previously said it should not be set by project code so that users can set it as a cache entry instead. Generalize this explanation to mean that the project should not set its own policies with this v...The documentation for this variable previously said it should not be set by project code so that users can set it as a cache entry instead. Generalize this explanation to mean that the project should not set its own policies with this variable, and that the purpose of the variable is to allow policies not set by the project to be controlled externally.
Policies `CMP0077` and `CMP00126` are particularly important when using `add_subdirectory` to add a third-party project. Suggest `CMAKE_POLICY_DEFAULT_CMP{0077,0126}` as a way to set the policies without modifying third-party code.
Issue: #20490
Backport: release3.22.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6755try_compile: Do not use CMAKE_BUILD_TYPE or CMAKE_CONFIGURATION_TYPES env vars2021-11-23T09:59:04-05:00Brad Kingtry_compile: Do not use CMAKE_BUILD_TYPE or CMAKE_CONFIGURATION_TYPES env varsSince !6291 the environment variables are supposed to provide defaults for settings
the user otherwise can control via cache entries. However, they
accidentally affect `try_compile` projects too, which are supposed to be
programmaticall...Since !6291 the environment variables are supposed to provide defaults for settings
the user otherwise can control via cache entries. However, they
accidentally affect `try_compile` projects too, which are supposed to be
programmatically controlled.
Fixes: #22935
Backport: release3.22.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6753Help: ENVIRONMENT_MODIFICATION path_list_... separator is based on host2021-11-22T11:19:19-05:00Craig ScottHelp: ENVIRONMENT_MODIFICATION path_list_... separator is based on hostFixes: #22937
Backport: releaseFixes: #22937
Backport: release3.22.1Craig ScottCraig Scotthttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6746ci: add gmock to Debian base images2021-11-19T09:08:19-05:00Brad Kingci: add gmock to Debian base imagesIt is already in the Fedora base images.
Backport: releaseIt is already in the Fedora base images.
Backport: release3.22.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/6743help: improve CMAKE_INSTALL_MODE documentation2021-11-30T08:51:36-05:00Felix Lelchukhelp: improve CMAKE_INSTALL_MODE documentationThis enriches help on CMAKE_INSTALL_MODE with important details discussed in issue #22869.
Backport: release
Topic-rename: doc-CMAKE_INSTALL_MODEThis enriches help on CMAKE_INSTALL_MODE with important details discussed in issue #22869.
Backport: release
Topic-rename: doc-CMAKE_INSTALL_MODE3.22.1Craig ScottCraig Scott