Commit Graph

1177 Commits

Author SHA1 Message Date
Marc Chevrier
7baf4a9aeb Help: LINK_LIBRARY:WHOLE_ARCHIVE clarification
Fixes: #26540
2024-12-19 16:41:50 +01:00
Brad King
5c7bb0bfd9 Merge topic 'rename-cmakelists'
fcbc883fa3 cmake: Allow configuration of default script names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !10059
2024-12-18 08:49:58 -05:00
Martin Duffy
fcbc883fa3 cmake: Allow configuration of default script names
Adds the ``--project-file`` command-line option to modify the default script
name loaded by CMake and ``add_subdirectory`` to values other than
``CMakeLists.txt``.

Fixes: #21570
2024-12-17 12:47:02 -05:00
Brad King
546be3530a Merge topic 'xcode-scheme-lldb-init-file'
419cfe30d0 Xcode: Support for 'LLDB Init File' scheme property
65ad1bbd4c vim: Remove duplicated keywords from cmake.vim
a96d6a98d3 Tests/RunCMake/XcodeProject: Improve XcodeSchemaProperty failure messages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10093
2024-12-16 09:08:56 -05:00
Brad King
e4cd54dab2 Help: Clarify intended purpose of LINK_WHAT_YOU_USE
Avoid implying that it can be used to intentionally link to
shared libraries whose symbols are not needed.

Issue: #26529
2024-12-13 10:53:54 -05:00
Cristiano Carvalheiro
419cfe30d0 Xcode: Support for 'LLDB Init File' scheme property
Fixes: #24002
2024-12-13 08:31:11 -05:00
Garrett Campbell
9ed178f9d8 Add generator-agnostic DEBUGGER_WORKING_DIRECTORY target property
Generalize the `VS_DEBUGGER_WORKING_DIRECTORY` property.

Issue: #16478
2024-12-09 10:47:10 -05:00
Marc Chevrier
521a6d409c Archive library: Add support for ARCHIVER: prefix
Add the support of the ARCHIVER: prefix to offer a portable way to pass
options to the archiver when the compiler is used as driver.
2024-11-26 19:26:07 +01:00
Brad King
7a05e8e994 Help: Reword AIX_SHARED_LIBRARY_ARCHIVE to avoid assuming a default 2024-11-23 15:23:25 -05:00
Brad King
1cd99d288f Merge topic 'aix-archive-shared-libraries-export'
cd6fb63093 AIX: Propagate AIX_SHARED_LIBRARY_ARCHIVE through exports

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10027
2024-11-23 15:12:51 -05:00
Brad King
cd6fb63093 AIX: Propagate AIX_SHARED_LIBRARY_ARCHIVE through exports
Teach `export()` and `install(EXPORT)` to record this setting on the
imported targets they generate.  Make this property's non-presence
authoritative on imported targets since they represent what was built
elsewhere.
2024-11-21 19:02:00 -05:00
Brad King
1224fbce3f Help: Document CLICOLOR and CLICOLOR_FORCE environment variables
Issue: #26451
2024-11-18 13:00:22 -05:00
Marc Chevrier
7907c83175 Link step: Add LINK_WARNING_AS_ERROR target property
Add a way to specify, in a portable way, to raise an error for any
warning during the link step. For that purpose, define:
* CMAKE_LINK_WARNING_AS_ERROR variable
* LINK_WARNING_AS_ERROR target property

Fixes: #25343
2024-11-12 15:11:53 +01:00
Marc Chevrier
35350c419d Add support of "LINKER:" prefix for CMAKE_<TYPE>_LINKER_FLAGS variable
The following variables now support the LINKER: prefix:
* CMAKE_<TYPE>_LINKER_FLAGS
* CMAKE_<TYPE>_LINKER_FLAGS_<CONFIG>

Fixes: #26171
2024-11-04 17:07:58 +01:00
Brad King
8779b1ad28 Merge branch 'backport-ci-fedora-41' into ci-fedora-41 2024-10-26 06:02:18 -04:00
Brad King
7605228f5e codespell: Fix typos 2024-10-25 08:43:04 -04:00
Brad King
0ba8bdb5c2 Merge topic 'doc-BUILD_TESTING'
9510820d58 Help: Document CTest module BUILD_TESTING variable
6e6e688b80 CTest: Improve formatting of documentation cmake code blocks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9927
2024-10-25 08:23:25 -04:00
Brad King
4cf0de3c3a Merge topic 'Help-CMAKE_LINK_DEPENDS_USE_LINKER'
686698a7b4 Help: Update note relative the GNU binutils linkers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9938
2024-10-25 08:13: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
Robert Maynard
9510820d58 Help: Document CTest module BUILD_TESTING variable
The `BUILD_TESTING` variable is referenced in `add_test` and
`enable_testing`.  It should be documented as it controls the
behavior tests working when projects use `include(CTest)`.
2024-10-24 11:46:37 -04:00
Marc Chevrier
686698a7b4 Help: Update note relative the GNU binutils linkers 2024-10-24 17:02:15 +02:00
Brad King
3ef7198e43 Merge topic 'fix-path-search-doc'
630e4a12a3 Help: Fix find_package search order w.r.t. globs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Matthew Woehlke <matthew.woehlke@kitware.com>
Merge-request: !9930
2024-10-24 08:59:43 -04: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
61bbc1f7d2 Merge topic 'doc-link-libraries-strategy'
1a119c5ad5 Help: Move LINK_LIBRARIES_STRATEGY details to target property docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !9919
2024-10-19 17:50:10 -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
Daniel Pfeifer
267b42bccc CTest: Remove declarative scripting mode 2024-10-09 22:30:58 +02: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