Commit Graph

5691 Commits

Author SHA1 Message Date
Kyle Edwards
b7cd51d18a Help: Note the version in which define_property() arguments became optional 2022-01-21 09:24:15 -05:00
Brad King
a86e42a0f5 Merge topic 'target-properties-from-variables'
fce24e4f10 define_property(): Add INITIALIZE_FROM_VARIABLE argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6865
2022-01-21 09:16:46 -05:00
Brad King
74eb6c5316 Merge topic 'CheckPIESUpported-supports-SYSROOT'
219dde4ea8 CheckPIESupported: now uses any SYSROOT settings
4fa105d34e Check{Compiler,Linker}Flag: Add possibility to retrieve check outputs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6877
2022-01-20 12:01:14 -05:00
Brad King
925d089a4d Merge topic 'ccmake-windows'
e674e02c55 Help: Add release note for experimental ccmake support on Windows
5c9310c714 ci: Enable ccmake on Windows
9278c6e01a ccmake: Add Windows support using PDCurses
b97c12babb ccmake: Refactor resizing logic into cmCursesForm
bf11dab49d ccmake: Refactor BUILD_CursesDialog option logic
bf94e01348 cmpdcurses: Add CMake build system
89703bc941 Merge branch 'upstream-PDCurses' into update-pdcurses
f84c4112c3 PDCurses 2021-12-08 (f1cd4f45)
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6832
2022-01-20 11:56:35 -05:00
Brad King
a47b4387b4 Merge topic 'cmake-presets-include-outside-project-dir'
0c2d234bc9 CMakePresets: Allow files included from CMakePresets.json to be anywhere

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Gerhard Olsson <gerhard.nospam@gmail.com>
Merge-request: !6867
2022-01-20 11:55:35 -05:00
Kyle Edwards
fce24e4f10 define_property(): Add INITIALIZE_FROM_VARIABLE argument
Fixes: #20698
2022-01-20 09:05:35 -05:00
Kyle Edwards
0c2d234bc9 CMakePresets: Allow files included from CMakePresets.json to be anywhere
There are some valid use cases for allowing these files to be outside
the project directory. Relax the restriction, and include a strong
warning in the documentation.
2022-01-19 11:21:35 -05:00
Brad King
e674e02c55 Help: Add release note for experimental ccmake support on Windows 2022-01-19 10:53:10 -05:00
Brad King
1ca83ae2bb Merge topic 'cpack-dmg-sla'
9e38bfa915 CPack/DMG: Add explicit option to use CPACK_RESOURCE_FILE_LICENSE for SLA
542ba6ac1a Tests: Add CPack/DMG case covering SLA from CPACK_RESOURCE_FILE_LICENSE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6876
2022-01-19 09:09:39 -05:00
Brad King
196243d668 Merge topic 'define-property-optional-args'
edb5059216 define_property(): Make BRIEF_DOCS and FULL_DOCS optional
7d26baff46 cmDefinePropertyCommand: Refactor to use cmArgumentParser

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6875
2022-01-19 09:06:58 -05:00
Brad King
6b44cd7d3a Merge topic 'depfile-parsing-update'
0b65a2b253 add_custom_command(DEPFILE): ensure all dependencies are taken into account
e04a352cca Depfile parsing: enhance compatibility with GNU Make

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6861
2022-01-19 09:02:57 -05:00
Marc Chevrier
219dde4ea8 CheckPIESupported: now uses any SYSROOT settings
Fixes: 23053
2022-01-19 10:49:23 +01:00
Kyle Edwards
edb5059216 define_property(): Make BRIEF_DOCS and FULL_DOCS optional
Issue: #20698
2022-01-18 15:52:01 -05:00
Brad King
9e38bfa915 CPack/DMG: Add explicit option to use CPACK_RESOURCE_FILE_LICENSE for SLA
Since macOS 12.0, the ``hdiutil udifrez`` and ``hdiutil udifderez``
commands to embed and extract resources in a disk image are deprecated.
The CPack DragNDrop Generator uses these to attach the SLA specified by
the `CPACK_RESOURCE_FILE_LICENSE` option.  Since that option is shared
by multiple CPack generators, we cannot deprecate it.  Instead, add an
explicit option to control the behavior.  This will give projects a way
to package on future macOS versions that remove the commands.

In order to provide a long-term transition away from attaching SLAs to
disk images, update `cpack` to default this behavior to OFF.  To retain
compatibility for CMake projects, teach the CPack module to default the
option to ON.  Later a policy can be added to change the default.

Issue: #22978
2022-01-18 15:39:51 -05:00
Brad King
a2e42a577b Merge topic 'cuda_host_env'
70f5d9eb49 CUDA: Fix CMAKE_CUDA_COMPILER_ARG1 cache description
ad6cd1074b Help: Correct CUDAHOSTCXX and CUDAARCHS as having higher precedence

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6872
2022-01-18 12:12:09 -05:00
Brad King
d77a039cd4 Merge topic 'doc-internal-linker-preference'
d2efc90598 Help: Move linker preference variables to the internal section

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6871
2022-01-18 12:09:59 -05:00
Marc Chevrier
e04a352cca Depfile parsing: enhance compatibility with GNU Make 2022-01-16 14:05:59 +01:00
Craig Scott
b748878880 Merge topic 'doc-LANG_STANDARD_REQUIRED'
acd65d78c4 Help: Actual language standard can be higher than <LANG>_STANDARD

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !6870
2022-01-15 15:45:08 -05:00
Raul Tambre
ad6cd1074b Help: Correct CUDAHOSTCXX and CUDAARCHS as having higher precedence
For CUDAHOSTCXX the behaviour seems to have been like this since the
introduction of it in commit 9cf5b98d ("CUDA: Prefer environment variables
CUDACXX and CUDAHOSTCXX.", 2016-11-08) and is likely unintentional judging by
the wording of the commit.

The documentation mistake seems to be a copy-paste error from when all the
environment variables were documented in commit e6b77c5f ("Help: Document
CMake's environment variables", 2017-09-01).
Describe this explicitly as it is unlike all other similar environment
variables.

For CUDAARCHS we got it wrong from the get-go in commit c4ae9384 ("CUDA:
Initialize CMAKE_CUDA_ARCHITECTURES using $ENV{CUDAARCHS}", 2020-11-24).

Correcting either to follow the more standard precedence behaviour will require
a policy.

Fixes #23081.
2022-01-15 21:51:21 +02:00
Craig Scott
d2efc90598 Help: Move linker preference variables to the internal section
These probably should not have been documented as public variables
to begin with. But since they have been documented for a long time,
we can't just remove them from the docs. Move them to the internal
section instead to make it clearer that they are not intended to be used
directly by projects.
2022-01-15 11:09:19 +11:00
Craig Scott
acd65d78c4 Help: Actual language standard can be higher than <LANG>_STANDARD
Fixes: #22885
2022-01-15 10:51:07 +11:00
Brad King
e9b237b6d7 Help: Document formatting of DEPRECATION target property
Also add a test case to verify it.
2022-01-13 15:56:54 -05:00
Brad King
a20d9e1463 Merge topic 'cudatoolkit_find_cufft_static_nocallback'
a4126d1c01 CUDAToolkit: Add CUDA::cufft_static_nocallback target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !6856
2022-01-13 15:24:39 -05:00
Brad King
6baf3b27c9 Merge topic 'ide_guide'
6a5936c596 Help: Add IDE Integration Guide section on IDEs supporting CMake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6851
2022-01-13 15:23:04 -05:00
Robert Maynard
a4126d1c01 CUDAToolkit: Add CUDA::cufft_static_nocallback target
Fixes: #23098
2022-01-12 16:04:02 -05:00
Semyon Kolton
6a5936c596 Help: Add IDE Integration Guide section on IDEs supporting CMake 2022-01-12 15:48:39 -05:00
Marc Chevrier
8a3aac990e Help: add_custom_command: describes depfile format 2022-01-11 12:51:11 +01:00
Brad King
39eabc17c4 Merge topic 'cmake-presets-include'
26a5512c0f CMakePresets: Add include field
a239f23a98 Refactor: Generalize file graph in CMakePresets
84d440caac Refactor: Split JSON processing into configure, build, and test presets
fd6ea2f67f Refactor: Rename cmCMakePresetsFile to cmCMakePresetsGraph

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6829
2022-01-10 17:12:03 -05:00
Kyle Edwards
94de63effa Guide: Recommend -C for IDE presets instead of -D
Issue: #23083
2022-01-07 12:43:53 -05:00
Kyle Edwards
26a5512c0f CMakePresets: Add include field
Fixes: #21331
2022-01-06 19:46:41 -05:00
David Wosk
da737d34e0 CPack/productbuild: add options to control domains element
The domains element determines the required authorization level needed
for the install. The auth attribute of the pkg-ref element has been
deprecated in favor of domains, so if the domains options are
specified, the auth attribute is omitted.

Fixes: #23030
2022-01-06 11:33:25 -05:00
Craig Scott
6b170578b8 Help: Non-zero floating point numbers are true in if() expressions
Fixes: #22991
2022-01-04 08:45:23 +11:00
Brad King
138aabfa9d Merge topic 'vs-csharp-dotnet-sdk'
0eea32a376 VS: Add DOTNET_SDK property to generate SDK-style C# projects
a450cc9533 VS: Set ResolveNugetPackages to false for ALL_BUILD and ZERO_CHECK
fa76e5d194 cmVisualStudio10TargetGenerator: Factor out helper for classic MSBuild project

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6634
2021-12-22 08:56:22 -05:00
Brad King
69eb5b2421 Merge topic 'doc-list-non-existent'
b573a732dc Tests: add tests to check claims in the documentation
b151db01f9 Help: mention non-existent case for list(PREPEND)
b3a249c2cb Help: clarify range for list(INSERT), mention nonexistent / empty case
b6fdcb3df0 Help: clarify description of list(INSERT)
e55f473ea9 Help: clarify that list(APPEND) on a non-existent list creates it

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6824
2021-12-22 08:53:02 -05:00
Brad King
217f363cac Merge topic 'link-only-targets'
37af6c3311 target_link_libraries: Optionally require only target names
5134f099a3 cmGeneratorTarget: Factor out message about reasons for a missing target
37a25072ea Tests: Rename RunCMake.{CMP0028 => LinkItemValidation}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6821
2021-12-22 08:52:13 -05:00
Sumit Bhardwaj
0eea32a376 VS: Add DOTNET_SDK property to generate SDK-style C# projects
Changes in cmVisualStudio10TargetGenerator::Generate to write .Net
SDK-style project for VS generators VS 19 and above. Also adds
documentation and tests.

Issue: #20227
2021-12-21 09:35:49 -08:00
Adriaan de Groot
b151db01f9 Help: mention non-existent case for list(PREPEND) 2021-12-21 10:55:43 -05:00
Adriaan de Groot
b3a249c2cb Help: clarify range for list(INSERT), mention nonexistent / empty case 2021-12-21 10:55:35 -05:00
Adriaan de Groot
b6fdcb3df0 Help: clarify description of list(INSERT)
Since the argument is called 'index', use that in the description.
2021-12-21 10:55:32 -05:00
Adriaan de Groot
e55f473ea9 Help: clarify that list(APPEND) on a non-existent list creates it
This is hinted-at in the introduction, which mentions creating
a new variable value in the current scope, but let's make it
explicit.

Fixes: #22910
2021-12-21 10:55:22 -05:00
Brad King
37af6c3311 target_link_libraries: Optionally require only target names
Optionally verify that items in `LINK_LIBRARIES` and
`INTERFACE_LINK_LIBRARIES` that can be target names are actually target
names.  Add a `LINK_LIBRARIES_ONLY_TARGETS` target property and
corresponding `CMAKE_LINK_LIBRARIES_ONLY_TARGETS` variable to enable
this new check.

Fixes: #22858
2021-12-20 12:14:07 -05:00
Brad King
6fda93faf8 FindGLUT: Provide modern-named GLUT_INCLUDE_DIRS result variable
Previously this module only provided `GLUT_INCLUDE_DIR`, which does not
follow the modern naming convention documented in `cmake-developer(7)`.

Issue: #23018
2021-12-20 09:53:33 -05:00
Brad King
ece1900731 Merge topic 'doc-if-defined'
a45e922768 Help: Clarify behavior of if(DEFINED) for cache and non-cache variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6817
2021-12-20 09:44:43 -05:00
Craig Scott
47168b2231 Help: Clarify CMP0126 OLD behavior for FORCE and INTERNAL
Fixes: #23022
2021-12-20 21:24:50 +11:00
Craig Scott
a45e922768 Help: Clarify behavior of if(DEFINED) for cache and non-cache variables
Fixes: #23023
2021-12-20 19:27:39 +11:00
John Parent
d7b18895bc cmake: Add filtered debug-find options
Add a `--debug-find-pkg=` option to debug find calls for specific
packages.

Add a `--debug-find-var=` option to debug find calls for specific
return variables.

Fixes: #21880
2021-12-17 08:55:21 -05:00
Brad King
74f1fbb7a1 Help/dev: Cover module function naming in CMake Documentation Guide 2021-12-08 17:05:25 -05:00
Brad King
2d4c3cf684 Merge topic 'ifw-sign-installer'
e8e07a90c1 CPackIFW: add support for signing the generated app bundles on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6754
2021-12-02 12:32:01 -05:00
Brad King
29c80aec94 Merge topic 'tutorial-cpack-source-archive'
39c410624a Tutorial: in step 7, disambiguate installed/source archive
44c527bc63 Tutorial: Package only one source archive

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6765
2021-12-01 09:47:57 -05:00
Brad King
e73de3b9cc Merge topic 'tutorial-install-arg-order'
4f524797dc Tutorial: Order install(TARGETS) EXPORT option consistently with docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6770
2021-12-01 09:47:08 -05:00