Commit Graph

5996 Commits

Author SHA1 Message Date
Brad King
e00e67cb92 Merge topic 'presets-pathListSep'
ba969ce5fe cmake-presets: add ${pathListSep} macro

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7234
2022-05-13 08:54:08 -04:00
Brad King
392e73e01a Merge topic 'doc-install-example-components'
308b698f5d Help: Make install() example component names more consistent

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7240
2022-05-13 08:46:58 -04:00
Erin Melucci
ba969ce5fe cmake-presets: add ${pathListSep} macro
Fixes: #23282
2022-05-12 10:37:49 -04:00
Jean-Christophe Fillion-Robin
308b698f5d Help: Make install() example component names more consistent
This commit updates the documentation so that the component examples are
specified using title case to match convention used in both the existing
`Installing Exports` section and in the "Mastering CMake" book.
2022-05-12 10:15:42 -04:00
Brad King
f43c54260b Merge topic 'stl-containers-helpers'
95a1b2c7b8 stl containers: enhance compatibility with C++14, C++17 and C++20

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7244
2022-05-10 10:31:59 -04:00
Brad King
79b64690d9 Merge topic 'werror-property'
76a08cd253 COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Michael Hirsch <michael@scivision.dev>
Merge-request: !7187
2022-05-10 10:30:42 -04:00
Marc Chevrier
95a1b2c7b8 stl containers: enhance compatibility with C++14, C++17 and C++20
* Ensure various functions working with containers are available through
all headers as specified by the standard.
* Add C++20 std::ssize() function.
2022-05-07 11:04:06 +02:00
Martin Duffy
76a08cd253 COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errors
Add `COMPILE_WARNING_AS_ERROR` target property and supporting
`CMAKE_COMPILE_WARNING_AS_ERROR` variable.

`COMPILE_WARNING_AS_ERROR` is initialized by
`CMAKE_COMPILE_WARNING_AS_ERROR`. It is a boolean variable. If it is
true, it expands to a different flag depending on the compiler such that
any warnings at compile will be treated as errors.

Supports compiler ids that I could find a relevant flag for.
2022-05-06 12:14:37 -04:00
Cameron Cawley
6a2b016bbd OpenWatcom: Support CMAKE_WATCOM_RUNTIME_LIBRARY with Linux and OS/2 builds 2022-05-06 10:40:59 -04:00
Cameron Cawley
33da5824ac OpenWatcom: Allow specifying the runtime library
Add a `CMAKE_WATCOM_RUNTIME_LIBRARY` variable to control the
runtime library selection.  Add policy CMP0136 to switch to
in place of the old hard-coded default flags.

Fixes: #23178
2022-05-06 10:40:58 -04:00
Brad King
849ad97d95 Merge topic 'truncation_relnotes'
99cad40172 Help: Document version of ctest(1) adding output truncation mode
a6f2c13727 Help: Add release notes for test-output-truncation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7242
2022-05-06 09:00:26 -04:00
Craig Scott
c5dff5ace2 Merge topic 'FetchContent_find_package_integration'
29e31e2825 Packages: Integrate FetchContent and find_package()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: huangqinjin <huangqinjin@gmail.com>
Merge-request: !5688
2022-05-06 08:33:38 -04:00
Brad King
8a40680524 Merge topic 'HelpExit'
0aea13d20b Help: for message(FATAL_ERROR), document nonzero exit code
cc97725137 Help: document exit code of command cmake(1)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7175
2022-05-05 12:51:47 -04:00
Brad King
213f391715 Merge topic 'HelpEnv'
a693da21f3 Help: from command:if, link to environment variables
ab2bdbaf31 Help: Cross-reference ENV operator from cmake-language(7) manual
ee4e728a69 Help: From Environment Variables section, link to cmake -E env etc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7239
2022-05-05 12:50:53 -04:00
Brad King
99cad40172 Help: Document version of ctest(1) adding output truncation mode
While at it, fix mode value markup.

Issue: #23206
2022-05-05 12:42:59 -04:00
Frank Winklmeier
a6f2c13727 Help: Add release notes for test-output-truncation
Add missing release notes for test-output-truncation.

Issue: #23206
2022-05-05 17:50:29 +02:00
Joachim Wuttke (h)
0aea13d20b Help: for message(FATAL_ERROR), document nonzero exit code 2022-05-05 09:43:39 -04:00
Joachim Wuttke (h)
a693da21f3 Help: from command:if, link to environment variables 2022-05-05 09:37:20 -04:00
Joachim Wuttke (h)
ab2bdbaf31 Help: Cross-reference ENV operator from cmake-language(7) manual 2022-05-05 09:36:23 -04:00
Joachim Wuttke (h)
ee4e728a69 Help: From Environment Variables section, link to cmake -E env etc 2022-05-05 09:35:57 -04:00
Brad King
7d78dcbebb Merge topic 'cpack-wix-arch'
cae7e5e38d CPack/WIX: Add CPACK_WIX_ARCHITECTURE to support Windows for ARM installers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7236
2022-05-05 09:31:46 -04:00
Brad King
cd20592c6d Merge topic 'ExternalProject-no-extract-timestamp'
a283e58b51 ExternalProject: Add DOWNLOAD_EXTRACT_TIMESTAMP option and policy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7137
2022-05-05 09:20:41 -04:00
Brad King
f533b548ca Merge topic 'remove-PackageMaker-generator'
c150f89f4d CPack: Remove the deprecated PackageMaker generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7221
2022-05-05 09:17:35 -04:00
jakoblover
cae7e5e38d CPack/WIX: Add CPACK_WIX_ARCHITECTURE to support Windows for ARM installers 2022-05-05 09:11:57 -04:00
Kasper Laudrup
a283e58b51 ExternalProject: Add DOWNLOAD_EXTRACT_TIMESTAMP option and policy
Add the option to keep the current filestamps when extracting an
archive in ExternalProject_Add.

Enabling this option makes the behavior consistent with how
ExternalProject_Add is used when checking out code from revision
control instead of an archive.

Fixes: #22746
2022-05-05 09:01:54 +10:00
Craig Scott
c150f89f4d CPack: Remove the deprecated PackageMaker generator
This CPack generator has been deprecated since commit 7bf187499f
(CPack: Deprecate PackageMaker generator, 2020-01-31).

Fixes: #23344
2022-05-05 08:36:44 +10:00
Brad King
bdaa4b8459 Merge topic 'chsi-windows_registry-updates'
0c33f12a39 cmake_host_system_information(WINDOWS_REGISTRY) updates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7229
2022-05-04 11:10:12 -04:00
Joachim Wuttke (h)
cc97725137 Help: document exit code of command cmake(1) 2022-05-04 14:17:01 +02:00
Brad King
e0dbca93aa Merge topic 'find_item-query-windows-registry'
8d7e80cf3d find_* commands: add control over Windows registry views
08941a9a40 cmWindowsRegistry: Add helper for conversion between string and enum View
769f25aa3c cmWindowsRegistry: enhance unicode conversions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7211
2022-05-03 11:31:04 -04:00
Brad King
e253e57fe3 Merge topic 'restore-CPACK_PACKAGEMAKER_CHOICES'
d099136add productbuild: Restore CPACK_PACKAGEMAKER_CHOICES variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7220
2022-05-03 11:24:11 -04:00
Brad King
386496a544 Merge topic 'cpp-modules-prep'
c5b56b35c2 cmInstallExportGenerator: expose the temporary directory
c107760417 cmNinjaTargetGenerator: support msvc-style deps discovery for scanning
64c15ec018 cmNinjaTargetGenerator: add flags for scanning based on the fileset type
aaa18f15cf cmTarget: add support for querying all file set names
cc4e19710d cmGlobalNinjaGenerator: use an extention based on the modmapfmt
97a68198c9 cmGlobalNinjaGenerator: escape `:` in module names
499009b79c cmTarget: avoid creating export entries if they don't exist
0513a1fe10 cmInstallGenerator: use CMake-private variables in generated code
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7214
2022-05-03 11:20:26 -04:00
Craig Scott
29e31e2825 Packages: Integrate FetchContent and find_package()
Allow FetchContent_MakeAvailable() to try a call to
find_package() first, or redirect a find_package() call to
FetchContent_MakeAvailable(). The user can set variables
to control which of these are allowed or tried by default.

Fixes: #21687
2022-05-03 16:48:11 +10:00
Marc Chevrier
0c33f12a39 cmake_host_system_information(WINDOWS_REGISTRY) updates
* add a cross-reference in 'get_filename_component()' documentation
* rework tests for better 32bit systems support
2022-05-01 12:57:24 +02:00
Marc Chevrier
8d7e80cf3d find_* commands: add control over Windows registry views
Fixes: #22775
2022-04-29 22:00:02 +02:00
Craig Scott
d099136add productbuild: Restore CPACK_PACKAGEMAKER_CHOICES variable
In 2a8df7e7db (productbuild: Don't write rootVolumeOnly attribute if
writing domains, 2022-03-21), the variable holding the main contents
of the distribution.dist XML file was renamed from
CPACK_PACKAGEMAKER_CHOICES to CPACK_APPLE_PKG_INSTALLER_CONTENT.
This reflected the fact that the PackageMaker generator is deprecated.
The new variable also includes more details than the old one held.
Some projects were relying on the old variable name, so we need to still
set that to the same contents as it would have previously provided.

Neither of these variables were previously documented, but the older
variable was mentioned in enough semi-official places that it essentially
became semi-supported. Document both variables and highlight that the
older one is deprecated.

Fixes: #23467
2022-04-30 00:28:05 +10:00
Brad King
756e83fbe2 Merge topic 'doc-cmake.org-tutorial-archive'
4cb616fed6 Tutorial: Provide a source archive when published on cmake.org
37fb70591e Utilities/Sphinx: Add variables listing pre-sphinx commands
eb7d913a21 Utilities/Sphinx: Clarify names of variables listing post-sphinx commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7215
2022-04-29 09:26:17 -04:00
Brad King
4cb616fed6 Tutorial: Provide a source archive when published on cmake.org
Provide readers following the tutorial on `cmake.org` a direct link to
download the tutorial's source examples.  Previously readers had to
fetch the CMake source tree separately and look for the tutorial source
examples inside it.

Fixes: #22475
2022-04-28 13:36:20 -04:00
Brad King
90d5d4285b Merge topic 'doc-genex-REMOVE_DUPLICATES'
484b992f25 Help: Clarify which items are retained by $<REMOVE_DUPLICATES:...>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7217
2022-04-28 09:49:26 -04:00
Brad King
3b31397dc3 Merge topic 'manual-fileset-for-header-only-libraries'
4b25a0d512 Help/manual: Update header-only library example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7198
2022-04-28 09:38:37 -04:00
Craig Scott
484b992f25 Help: Clarify which items are retained by $<REMOVE_DUPLICATES:...> 2022-04-28 11:38:51 +10:00
Ben Boeckel
c107760417 cmNinjaTargetGenerator: support msvc-style deps discovery for scanning 2022-04-27 18:39:01 -04:00
Ben Boeckel
64c15ec018 cmNinjaTargetGenerator: add flags for scanning based on the fileset type 2022-04-27 15:14:50 -04:00
Marc Chevrier
b13eef5a90 cm::enum_set: container that contains a set of unique enum values.
The enum must be an `enum class` with an unsigned integer as base type.
2022-04-27 19:40:40 +02:00
Martin Duffy
4b25a0d512 Help/manual: Update header-only library example
Use target_sources with a named file set for the header-only library
example in cmake-buildsystem7.

Issue: #23400
2022-04-27 09:32:39 -04:00
Brad King
07a54b2bb2 Merge topic 'target-bundle-dir-name-genex'
997af2e1a6 Genex: Add TARGET_BUNDLE_DIR_NAME
627b2eba6c Help: Make TARGET_BUNDLE[_CONTENT]_DIR examples more precise

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7177
2022-04-26 11:15:47 -04:00
Ben Leadbetter
997af2e1a6 Genex: Add TARGET_BUNDLE_DIR_NAME
Evaluate to the name of the bundle directory for a given bundle target.

Fixes: #23409
2022-04-22 09:23:46 -04:00
Brad King
627b2eba6c Help: Make TARGET_BUNDLE[_CONTENT]_DIR examples more precise
The `TARGET_BUNDLE_DIR` and `TARGET_BUNDLE_CONTENT_DIR` generator
expressions produce absolute paths.  Show them in the examples.

Suggested-by: Ben Leadbetter <ben.leadbetter@native-instruments.com>
2022-04-22 09:22:11 -04:00
Brad King
4f15a57060 Merge topic 'verify-header-sets-doc-clarification'
5fe0e3627c VERIFY_HEADER_SETS: Clarify that header sets must be PUBLIC or INTERFACE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7195
2022-04-22 09:12:26 -04:00
Brad King
1bd85e8f3f Merge topic 'NO_CMAKE_INSTALL_PREFIX'
42f7e39789 Find: Support per call disabling of CMAKE_INSTALL_PREFIX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7163
2022-04-22 08:59:09 -04:00
Brad King
85e5818d2e Merge topic 'wrong-header-referenced-in-guide'
27589da705 Help/guide: Fix wrong header file reference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7196
2022-04-22 08:54:24 -04:00