CMake merge requestshttps://gitlab.kitware.com/cmake/cmake/-/merge_requests2022-03-31T08:46:34-04:00https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7124CMakeDependentOption: improve documentation2022-03-31T08:46:34-04:00Ben BoeckelCMakeDependentOption: improve documentationThis makes it far clearer that `<depends>` is a list up front instead of
burying the lede because a list is generally "trivially true" in
CMake[1]. Also clarify that `<force>` is only available as a local
variable and if queried outside ...This makes it far clearer that `<depends>` is a list up front instead of
burying the lede because a list is generally "trivially true" in
CMake[1]. Also clarify that `<force>` is only available as a local
variable and if queried outside of the "scope" of the
`cmake_dependent_option` call, will get the stored user cache value.
[1] The exception being when the last entry ends in `-NOTFOUND`.
Suggested-by: Rui Oliveira
---
Backport: release3.23.1https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7125Help: Add that CMAKE_CACHEFILE_DIR might not be defined2022-03-31T08:49:09-04:00Tobias NießenHelp: Add that CMAKE_CACHEFILE_DIR might not be definedCMake only sets `CMAKE_CACHEFILE_DIR` when writing `CMakeCache.txt`,
so the variable will usually be undefined when `CMakeLists.txt` runs.
Revise its documentation to clarify that `CMAKE_BINARY_DIR` should
be used instead.
I ran into th...CMake only sets `CMAKE_CACHEFILE_DIR` when writing `CMakeCache.txt`,
so the variable will usually be undefined when `CMakeLists.txt` runs.
Revise its documentation to clarify that `CMAKE_BINARY_DIR` should
be used instead.
I ran into this problem myself, and using `CMAKE_BINARY_DIR` works even before `CMakeLists.txt` has been written.
Backport: release3.23.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7126Help: Fix string(JSON ... LENGTH ...) signature2022-03-31T08:48:22-04:00Tobias NießenHelp: Fix string(JSON ... LENGTH ...) signatureThe list of indices and/or member names is optional, i.e., can be empty. For example, `string(JSON foo LENGTH "[0,0,0]")` sets `foo` to `3`.
```cmake
# Documented:
string(JSON foo LENGTH "{ \"a\": {}, \"b\": [1, 2, 3, 4] }" "b")
string(...The list of indices and/or member names is optional, i.e., can be empty. For example, `string(JSON foo LENGTH "[0,0,0]")` sets `foo` to `3`.
```cmake
# Documented:
string(JSON foo LENGTH "{ \"a\": {}, \"b\": [1, 2, 3, 4] }" "b")
string(JSON bar LENGTH "[[1], [1, 2], [1, 2, 3], [1, 2, 3, 4]]" 1)
message(STATUS "foo = ${foo} (expect 4), bar = ${bar} (expect 2)")
# Undocumented:
string(JSON foo LENGTH "{ \"a\": {}, \"b\": [1, 2, 3, 4] }")
string(JSON bar LENGTH "[[1], [1, 2], [1, 2, 3], [1, 2, 3, 4]]")
message(STATUS "foo = ${foo} (expect 2), bar = ${bar} (expect 4)")
```
Backport: release3.23.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7127GNUInstallDirs: Revert "Apply Debian multiarch LIBDIR to more prefixes"2022-04-05T08:41:37-04:00Brad KingGNUInstallDirs: Revert "Apply Debian multiarch LIBDIR to more prefixes"Revert !6748. There are separate
problems with activating multiarch `LIBDIR` for each prefix it added:
* Prefix `/` is often used to stage an installation with `DESTDIR`
for inclusion in a tarball package or similar.
* Prefix `/usr/...Revert !6748. There are separate
problems with activating multiarch `LIBDIR` for each prefix it added:
* Prefix `/` is often used to stage an installation with `DESTDIR`
for inclusion in a tarball package or similar.
* Prefix `/usr/local` is the default `CMAKE_INSTALL_PREFIX`, causing
the multiarch `LIBDIR` to be cached after the first configuration,
even if the prefix changes later.
Revert the change for now, except for the documentation update.
Further discussion will be needed to select a way to enable
multiarch `LIBDIR` for `/` and `/usr/local`.
Fixes: #23365
Issue: #19698
Backport: release3.23.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7129CUDA: Ninja generator generates valid compile database2022-03-31T08:47:29-04:00Robert MaynardCUDA: Ninja generator generates valid compile databaseThe ninja generator has been updated to poperly write the compile
database when the CUDA language has been enabled.
Fixes: #23368
Backport: releaseThe ninja generator has been updated to poperly write the compile
database when the CUDA language has been enabled.
Fixes: #23368
Backport: release3.23.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7134Help: Clarify when policy CMP0112 takes effect2022-04-04T09:29:10-04:00Brad KingHelp: Clarify when policy CMP0112 takes effectFixes: #23381
Backport: releaseFixes: #23381
Backport: release3.23.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7140Help: Fix typo in install command documentation2022-04-04T07:47:00-04:00Rolf Eike BeerHelp: Fix typo in install command documentationI extracted a typo fix from !6363 that is unrelated to the new features added there.
CC: @eugene.shalygin
Topic-rename: doc-install-typo
Backport: releaseI extracted a typo fix from !6363 that is unrelated to the new features added there.
CC: @eugene.shalygin
Topic-rename: doc-install-typo
Backport: release3.23.1Craig ScottCraig Scotthttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7142gitlab-ci: distinguish release and development pipeline schedules2022-04-04T13:42:49-04:00Brad Kinggitlab-ci: distinguish release and development pipeline schedulesRedefine the `CMAKE_CI_PACKAGE` pipeline schedule variable to
indicate whether it is for a development version (`dev`) or a
release version (`v[0-9]...`). Use this to automatically turn
package upload jobs on or off without having to ed...Redefine the `CMAKE_CI_PACKAGE` pipeline schedule variable to
indicate whether it is for a development version (`dev`) or a
release version (`v[0-9]...`). Use this to automatically turn
package upload jobs on or off without having to edit the jobs
in `.gitlab-ci.yml` for release branches.
Backport: release3.23.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7143gitlab-ci: start release package pipelines manually2022-04-05T15:53:15-04:00Brad Kinggitlab-ci: start release package pipelines manuallyA release pipeline is always created by manual execution of a pipeline
schedule. Require the initial pipeline jobs to be started manually too
so that we can later add separate components to play separately.
Also ensure that upload job ...A release pipeline is always created by manual execution of a pipeline
schedule. Require the initial pipeline jobs to be started manually too
so that we can later add separate components to play separately.
Also ensure that upload job destinations are not empty.
Backport: release3.23.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7144gitlab-ci: update cmake.org documentation in release package pipeline2022-04-06T12:55:26-04:00Brad Kinggitlab-ci: update cmake.org documentation in release package pipelineConsolidate the CI jobs for `cmake.org/cmake/help/git-{master,stage}` docs, and enable them in release package pipelines too.
Adopt `Utilities/Sphinx/` changes that we previously kept on a private branch for generating the reference doc...Consolidate the CI jobs for `cmake.org/cmake/help/git-{master,stage}` docs, and enable them in release package pipelines too.
Adopt `Utilities/Sphinx/` changes that we previously kept on a private branch for generating the reference documentation on `cmake.org`. Guard them with options activated only in the relevant CI jobs.
Backport: release:HEAD^23.23.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7146gitlab-ci: Build qthelp-format release documentation for cmake.org2022-04-06T13:04:12-04:00Brad Kinggitlab-ci: Build qthelp-format release documentation for cmake.orgPreviously the qthelp-format release documentation on `cmake.org` was
built manually.
Also add `objects.inv` to cmake.org html documentation, which was missing in !7144.
Backport: releasePreviously the qthelp-format release documentation on `cmake.org` was
built manually.
Also add `objects.inv` to cmake.org html documentation, which was missing in !7144.
Backport: release3.23.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7149FILE_SET: Forbid adding header sets to Apple FRAMEWORK libraries2022-04-07T10:57:08-04:00Kyle EdwardsFILE_SET: Forbid adding header sets to Apple FRAMEWORK librariesThe feature needs a specialized implementation to place headers
in the right place inside frameworks. To avoid silently doing
the wrong thing, make this case an error for the 3.23 series.
Issue: #23386
Backport: releaseThe feature needs a specialized implementation to place headers
in the right place inside frameworks. To avoid silently doing
the wrong thing, make this case an error for the 3.23 series.
Issue: #23386
Backport: release3.23.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7150Utilities/Sphinx: Update qthelp generation to qhelpgenerator2022-04-12T22:37:36-04:00Brad KingUtilities/Sphinx: Update qthelp generation to qhelpgenerator`qcollectiongenerator` is deprecated in favor of `qhelpgenerator`.
Also add a missing "Updates" section header in the 3.22 release notes.`qcollectiongenerator` is deprecated in favor of `qhelpgenerator`.
Also add a missing "Updates" section header in the 3.22 release notes.3.23.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7153CheckCompilerFlag: Fix regression in locale environment preservation2022-04-11T09:47:40-04:00Brad KingCheckCompilerFlag: Fix regression in locale environment preservationFix a typo from !6860 that caused locale environment variables to not be restored after they are set during the check.
Fixes: #23399
Backport: releaseFix a typo from !6860 that caused locale environment variables to not be restored after they are set during the check.
Fixes: #23399
Backport: release3.23.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7156CheckSourceCompiles: Avoid linker warning with -fembed-bitcode2022-04-11T08:51:06-04:00Craig ScottCheckSourceCompiles: Avoid linker warning with -fembed-bitcodeWhen the Apple linker sees -headerpad_max_install_names and
bitcode is enabled with a flag like -fembed-bitcode, it issues a warning
and ignores the -headerpad_max_install_names flag. This causes
unrelated compiler and linker flag checks...When the Apple linker sees -headerpad_max_install_names and
bitcode is enabled with a flag like -fembed-bitcode, it issues a warning
and ignores the -headerpad_max_install_names flag. This causes
unrelated compiler and linker flag checks to fail for valid flags.
In !6836, we started detecting linker warnings, which caused
a regression for projects that were setting -fembed-bitcode in their
CMAKE_CXX_FLAGS or similar. Prevent that regression by removing
the -headerpad_max_install_names linker flag when we know it will
warn and be ignored anyway.
Fixes: #23390
Issue: #23408
Backport: release3.23.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7157Help: Correct/add missing details for CheckPIESupported2022-04-12T08:18:14-04:00Craig ScottHelp: Correct/add missing details for CheckPIESupportedThis also includes a trivial change to fix a missing newline in status output. That trivial change is the only reason I didn't back port this to the release branch, but it is probably still safe enough to back port. @brad.king I'll assig...This also includes a trivial change to fix a missing newline in status output. That trivial change is the only reason I didn't back port this to the release branch, but it is probably still safe enough to back port. @brad.king I'll assign to you to decide.
Backport: release3.23.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7158FindPostgreSQL: add support for PostgreSQL 142022-04-12T08:17:20-04:00Even RouaultFindPostgreSQL: add support for PostgreSQL 14Backport: release
Topic-rename: FindPostgreSQL-14Backport: release
Topic-rename: FindPostgreSQL-143.23.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7164cmake: --list=presets=[type] doesn't generate incorrect warnings2022-04-12T08:16:05-04:00Robert Maynardcmake: --list=presets=[type] doesn't generate incorrect warningsFixes: #23407
Backport: releaseFixes: #23407
Backport: release3.23.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7166PCH: Fix Xcode non-pch language exclusion2022-04-12T08:12:51-04:00Cristian AdamPCH: Fix Xcode non-pch language exclusionFix a regression caused by !6435.
Fixes: #23138
Backport: release
Topic-rename: xcode-pchFix a regression caused by !6435.
Fixes: #23138
Backport: release
Topic-rename: xcode-pch3.23.1Brad KingBrad Kinghttps://gitlab.kitware.com/cmake/cmake/-/merge_requests/7168cmFileSet: store visibility with the fileset2022-04-12T12:58:09-04:00Ben BoeckelcmFileSet: store visibility with the filesetThe visibility is intrinsic to the fileset, so store it with it. This
avoids recalculating it on every addition to the fileset.
---
The core is extracted from !7145 to enforce additional restrictions in 3.23. Additional docs and test fi...The visibility is intrinsic to the fileset, so store it with it. This
avoids recalculating it on every addition to the fileset.
---
The core is extracted from !7145 to enforce additional restrictions in 3.23. Additional docs and test fixups to adapt to the changed internal storage.
Cc: @kyle.edwards @craig.scott
Backport: release3.23.1Brad KingBrad King