Commit Graph

1156 Commits

Author SHA1 Message Date
Brad King
7605228f5e codespell: Fix typos 2024-10-25 08:43:04 -04:00
Brad King
8e99e70297 Merge topic 'Help-CMAKE_LINK_DEPENDS_USE_LINKER' into release-3.31
686698a7b4 Help: Update note relative the GNU binutils linkers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9938
2024-10-25 08:13:02 -04:00
Marc Chevrier
686698a7b4 Help: Update note relative the GNU binutils linkers 2024-10-24 17:02:15 +02:00
Matthew Woehlke
630e4a12a3 Help: Fix find_package search order w.r.t. globs
Add documentation to clarify that `find_package` searches paths in the
specified order and stops at the first match.  Clarify documentation of
`CMAKE_FIND_PACKAGE_SORT_*` to match the actual behavior.

Note that no behavior is actually changed, this merely improves the
documentation to reflect actual behavior rather than seeming to imply
something else.

Also, update the test to verify that what we claim in the updated
documentation is what's actually happening.
2024-10-23 12:46:07 -04:00
Craig Scott
1a119c5ad5
Help: Move LINK_LIBRARIES_STRATEGY details to target property docs
For cases where a CMAKE_XXX variable provides a default value for a
XXX target property, the convention used in the documentation is to
put the detailed explanation in the target property docs, leaving the
variable docs to be fairly minimal and cross-reference the target
property docs for details.

When the (CMAKE_)LINK_LIBRARIES_STRATEGY docs were first added,
they were the opposite of this convention, putting the details in the
variable docs instead of the property docs. This change moves the
details to the property docs to make it consistent with the prevailing
convention used elsewhere.
2024-10-19 10:38:10 +11:00
Brad King
aa6bbc3135 Help: Update Sphinx versionadded directives for 3.31 release
Run the script:

    Utilities/Sphinx/update_versions.py --since v3.30.0 --overwrite
2024-10-09 09:32:54 -04:00
Brad King
e78ae03893 Merge topic 'cmake-host-executable-suffix'
5d2b89d5fa Add CMAKE_HOST_EXECUTABLE_SUFFIX for Unix/Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: shiz01 <shiz01@tutanota.com>
Merge-request: !9863
2024-10-03 08:07:39 -04:00
leha-bot
5d2b89d5fa Add CMAKE_HOST_EXECUTABLE_SUFFIX for Unix/Windows
Closes: #17553
2024-10-02 10:39:40 -04:00
Marc Chevrier
cd418d4bb6 Static libraries de-duplication: keep first occurrence
Fixes: #26335
2024-10-02 10:17:08 -04:00
Brad King
f7e2422c3e Merge topic 'curl-tls-version'
38390245a2 ctest: Require minimum TLS 1.2 by default
5e1a59dc2b file(DOWNLOAD/UPLOAD): Require minimum TLS 1.2 by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9848
2024-09-27 08:03:01 -04:00
Brad King
5e1a59dc2b file(DOWNLOAD/UPLOAD): Require minimum TLS 1.2 by default
Fixes: #25701
2024-09-26 10:10:20 -04:00
Brad King
53f3e5da1e Merge topic 'link-strategy'
7abd3137b7 Linking: Optionally reorder direct dependencies from LINK_LIBRARIES
9285a9dc9a cmComputeLinkDepends: Add final dependency ordering to debug output
f792db4ca2 cmComputeLinkDepends: Add undocumented per-target debug property
80b469a51d cmComputeLinkDepends: Factor out string literals as named constants
3bd73fcc76 cmComputeLinkDepends: Modernize member initialization
8db69c767b cmComputeLinkDepends: Remove redundant member
dccdd030cd cmComputeLinkDepends: Replace depender index sentinel value with cm::optional
6c9d8dc243 cmComputeLinkDepends: Replace group index sentinel value with cm::optional
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9835
2024-09-26 08:47:47 -04:00
Brad King
7abd3137b7 Linking: Optionally reorder direct dependencies from LINK_LIBRARIES
Traditionally CMake generates link lines by starting with the direct
link dependencies specified by `LINK_LIBRARIES` in their original order
and then appending indirect dependencies that the direct dependencies
do not express.  This gives projects control over ordering among
independent entries, which can be important when intermixing flags
and libraries, or when multiple libraries provide the same symbol.
However, it may also result in inefficient link lines.

Add support for an alternative strategy that can reorder direct link
dependencies to produce more efficient link lines.  This is useful
for projects that cannot easily specify their targets' direct
dependencies in an order that satisfies indirect dependencies.

Add a `CMAKE_LINK_LIBRARIES_STRATEGY` variable and corresponding
`LINK_LIBRARIES_STRATEGY` target property to select a strategy.

Fixes: #26271
2024-09-25 06:48:57 -04:00
Brad King
ea3405ff60 Merge topic 'curl-tls-verify'
4e62bc943c ctest: Verify TLS server certificate by default
8e92ee34f6 file(DOWNLOAD/UPLOAD): Verify TLS server certificate by default
dcaea54898 cmCTestCurl: Clarify names and logic using optional<bool>
03d37ae3ff cmFileCommand: Clarify names and logic using optional<bool>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9843
2024-09-24 10:35:19 -04:00
Brad King
4e62bc943c ctest: Verify TLS server certificate by default
Issue: #23608
2024-09-24 08:37:23 -04:00
Brad King
8e92ee34f6 file(DOWNLOAD/UPLOAD): Verify TLS server certificate by default
If the connection fails in a way that might be a certificate error, and
verification was enabled by the new default, mention environment
variable `CMAKE_TLS_VERIFY` in the diagnostic to help users that were
relying on the old behavior turn off server certificate verification in
their environment.

Fixes: #23608
2024-09-24 08:37:23 -04:00
Brad King
3b4d0df670 NVCC: Detect host compiler id and version
Report them in `CMAKE_<LANG>_HOST_COMPILER_{ID,VERSION}` variables.

Fixes: #20901
2024-09-20 17:48:33 -04:00
Brad King
9c5f6d22f3 Merge topic 'windows-kernel-mode-driver-includes'
b151bcfc9e WindowsKernelModeDriver: Add WDK include and link paths on MSVC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9705
2024-09-05 09:21:35 -04:00
Brad King
2daeb0b504 Merge topic 'build-databases'
e77655555c cmExperimental: gate build database support behind a flag
23cbeb5035 ci: enable `build_database` CXXModules tests
6863c1d823 Tests/CXXModules: add tests for module commands
123107c1a4 Tests/CXXModules: add support for running targets under a given config
438038b5e1 Tests/CXXModules: support building specific targets of example trees
84bc710d84 cmGlobalGenerator: generate build database files for targets
670f753f24 cmDyndepCollation: write build database metadata
dcf9a66ffe cxxmodules: plumb control data for exporting build databases
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9708
2024-09-05 09:20:23 -04:00
Joseph Snyder
b151bcfc9e WindowsKernelModeDriver: Add WDK include and link paths on MSVC
Detect Windows Kernel-Mode Driver include directories and library search
paths from the WDK command-line environment.  Require toolchain files to
specify the KMDF target version via a new variable.

Since this changes the behavior of the WindowsKernelModeDriver
experimental feature, update its UUID.
2024-09-03 11:10:35 -04:00
Ben Boeckel
e77655555c cmExperimental: gate build database support behind a flag
Given that the feature currently only supports C++ sources and is not
formally accepted by ISO yet, gate it behind a flag.
2024-09-03 10:05:40 -04:00
Brad King
e25f95c4cc Merge topic 'standard-link-directories'
20e9b59d5e Linking: Add CMAKE_LANG_STANDARD_LINK_DIRECTORIES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9707
2024-08-29 08:31:17 -04:00
Vito Gamberini
20e9b59d5e
Linking: Add CMAKE_LANG_STANDARD_LINK_DIRECTORIES
Closes: #18222
2024-08-28 15:54:43 -04:00
Brad King
241f923a6f Drop Visual Studio 12 2013 generator
This generator has been deprecated since CMake 3.28.  Remove it.
2024-08-28 14:13:05 -04:00
Ben Boeckel
dcf9a66ffe cxxmodules: plumb control data for exporting build databases
This includes the target property, its initializing variable, its
initializing environment variable, and updating related docs to mention
the new bits.
2024-08-27 12:37:36 -04:00
Peter Kokot
4086e81e38
Help: Rename Oracle Solaris Studio to Oracle Developer Studio
With version 12.5 Oracle Solaris Studio was renamed to Oracle Developer
Studio.
2024-08-09 10:05:52 +02:00
Alex Turbov
ecef0313f7
Help: Add a link to cmake(1) CLI option to CMAKE_VS_NUGET_PACKAGE_RESTORE 2024-08-01 20:08:52 +04:00
Christoph Junghans
98d0f918ba LFortran: Add support for this compiler
Fixes: #25419
2024-07-22 16:50:33 -04:00
Brad King
f36d09a0b8 Merge topic 'cpack-wix-per-machine'
d588e81ffb CPack/WIX: Generate perMachine installers by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9672
2024-07-22 10:17:57 -04:00
Brad King
a8d8f26828 Merge topic 'aix-archive-shared-libraries'
d27fe9dfba AIX: Add option to archive shared libraries
98013ad1ca cmXCOFF: Add support for editing binary inside an archive

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9606
2024-07-19 09:55:58 -04:00
Brad King
d588e81ffb CPack/WIX: Generate perMachine installers by default
Add policy CMP0172 to set `CPACK_WIX_INSTALL_SCOPE` to `perMachine` by
default.  Follow up commit 60661f6770 (CPack/WiX: Make InstallScope
configurable, 2023-11-07, v3.29.0-rc1~413^2) and commit 614100dbf6
(CPack/WiX: Restore default (missing) InstallScope from 3.28 and lower,
2024-06-05, v3.30.0-rc1~7^2~1).

Issue: #20962
Issue: #26029
2024-07-18 14:16:54 -04:00
Aditya Vidyadhar Kamath
d27fe9dfba AIX: Add option to archive shared libraries
Add option `CMAKE_AIX_SHARED_LIBRARY_ARCHIVE`.

There will no versions for the shared objects when this option is used.

Closes: #26033
2024-07-17 11:52:09 -04:00
Jacob Hummer
68cd5281e4 WASI: Add platform modules
Add minimal platform modules to support toolchain files like those in

* https://github.com/WebAssembly/wasi-sdk

or direct use of `-DCMAKE_SYSTEM_NAME="WASI"`

Fixes: #19223
2024-07-16 12:28:19 -04:00
Marc Chevrier
576567f028 Link feature attributes: stabilization
* enhance OVERRIDE handling
* Update wording
2024-06-21 11:18:20 +02:00
Craig Scott
c4fdf01a84
Help: Improve link library feature properties docs 2024-06-15 15:45:38 +10:00
Brad King
e0a11dfa24 Merge topic 'dep-provider-try_compile'
4cb5bb014d try_compile: Propagating top level includes into whole-project calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !9532
2024-05-31 09:20:27 -04:00
Brad King
c02dd58080 Merge topic 'msvc-v143-versions'
3873574f89 Help: Update MSVC_VERSION range for VS 17.10's MSVC 14.40 toolset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9554
2024-05-30 10:00:54 -04:00
Craig Scott
4cb5bb014d
try_compile: Propagating top level includes into whole-project calls
Fixes: #24151
2024-05-30 19:01:03 +10:00
Brad King
3873574f89 Help: Update MSVC_VERSION range for VS 17.10's MSVC 14.40 toolset
According to this blog post:

* https://devblogs.microsoft.com/cppblog/msvc-toolset-minor-version-number-14-40-in-vs-2022-v17-10/

the 14.40 through 14.49 version range will be used by the v143 toolsets.

Fixes: #26015
2024-05-29 11:48:08 -04:00
Brad King
5d93c421f1 HIP: Populate CMAKE_HIP_KNOWN_FEATURES global property
Fixes: #26013
2024-05-28 14:36:42 -04:00
Marc Chevrier
6e5e7968c3 GenEx $<LINK_LIBRARY>: Add the support of properties attached to features
Fixes: #24504, #25954
2024-05-15 10:02:36 +02:00
Brad King
760ad9bcc7 Merge topic 'remove-vs9-generator'
03c31b0395 Drop Visual Studio 9 2008 generator
88c70dde34 cmGlobalVisualStudioGenerator: Use member 'Version' more directly
0bdcf1cb17 cmLocalVisualStudio7Generator: Make vfproj conditions more explicit
acc5ea7390 cmLocalVisualStudio7Generator: Reset per-target members after every target
252702bb35 cmVisualStudioGeneratorOptions: Order version check branches consistently

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9496
2024-05-09 10:31:01 -04:00
Brad King
03c31b0395 Drop Visual Studio 9 2008 generator
This generator has been deprecated since CMake 3.27.  Remove it.
2024-05-08 10:37:34 -04:00
Juan Ramos
8763da8268 Help: Provide simple CMAKE_MODULE_PATH example 2024-05-07 12:45:04 -07:00
Tyler
7c38e6bb52 Add CMAKE_<LANG>_STANDARD_LATEST variables
Add a variable to indicate the latest standard known to be supported for
each language:

* `CMAKE_C_STANDARD_LATEST`
* `CMAKE_CXX_STANDARD_LATEST`
* `CMAKE_CUDA_STANDARD_LATEST`
* `CMAKE_HIP_STANDARD_LATEST`
* `CMAKE_OBJC_STANDARD_LATEST`
* `CMAKE_OBJCXX_STANDARD_LATEST`

These variables, more generally referred to as
`CMAKE_<LANG>_STANDARD_LATEST`, are assigned an integer value which
represents the minimum between the latest version of the associated
language standard supported by the current compiler and the latest
version supported by CMake.

Add documentation for these variables in a new page called
`CMAKE_<LANG>_STANDARD_LATEST` was added under the "Variables for
Languages" section of the `cmake-variables(7)` page.

Update each compiler-specific CMake script under
`${CMAKE_ROOT}\Modules\Compiler` to manually define the relevant
`CMAKE_<LANG>_STANDARD_LATEST` variable as necessary. This will
require updating and maintaining as newer compiler versions become
recognized by CMake.

Closes: #25717
2024-04-30 11:05:03 -04:00
Brad King
ad98b352ba Merge topic 'doc-install-prefix-override-default'
062c9dda89 Help: update CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9445
2024-04-22 08:26:28 -04:00
Etienne Doms
062c9dda89 Help: update CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
Suggests to override CMAKE_INSTALL_PREFIX value with set_property(CACHE)
instead of set(FORCE).
2024-04-19 18:31:12 +02:00
Brad King
bf8c0d625d Merge topic 'doc-objc-lang-flags'
31e6017bb6 Help: Document ObjC/ObjC++ flag variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9437
2024-04-19 08:57:28 -04:00
Alexander Borsuk
31e6017bb6 Help: Document ObjC/ObjC++ flag variables
Signed-off-by: Alexander Borsuk <me@alex.bio>
2024-04-18 17:48:59 +02:00
Ben Boeckel
678717f3e4 cxxmodules: provide a detection variable for import std 2024-04-18 09:53:21 -04:00