Commit Graph

1078 Commits

Author SHA1 Message Date
Brad King
5910da32b9 Merge topic 'doc-https'
53a542936e Help: Convert http URLs to https

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9313
2024-03-08 09:30:13 -05:00
scivision
53a542936e Help: Convert http URLs to https 2024-03-07 09:42:45 -05:00
Brad King
2ef3bd9186 ExternalProject: Add TLS version options for https connections
Add a `TLS_VERSION` option and honor `CMAKE_TLS_VERSION` variables.
Also map the version to Git options as we already do for `TLS_VERIFY`.

Issue: #25701
2024-02-28 19:11:29 -05:00
Brad King
434fe8a34b file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERSION environment variable
Issue: #25701
2024-02-28 08:40:27 -05:00
Brad King
fb9a6cf909 file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERSION variable
Issue: #25701
2024-02-28 08:40:27 -05:00
Brad King
7f1bdcc714 Merge topic 'vs-UseDebugLibraries'
721d8b192a VS: Add UseDebugLibraries to vcxproj files by default
47136b6959 VS: Suppress more MSBuild defaults affected by UseDebugLibraries
82a174182a cmVisualStudioGeneratorOptions: Add UsingDebugRuntime method
f498032141 cmVisualStudioGeneratorOptions: Rename {IsDebug => UsingDebugInfo}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9275
2024-02-23 08:35:04 -05:00
Brad King
721d8b192a VS: Add UseDebugLibraries to vcxproj files by default
Use heuristics to select a reasonable value.  Add policy CMP0162
to provide compatibility with existing projects.

Fixes: #25327
2024-02-22 08:43:16 -05:00
Brad King
a876991afc Merge topic 'doc-BUILD_SHARED_LIBS-top-level'
fb14a54a25 Help: Advise calling option(BUILD_SHARED_LIBS) early enough

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9280
2024-02-22 08:28:42 -05:00
Craig Scott
fb14a54a25 Help: Advise calling option(BUILD_SHARED_LIBS) early enough
Amends 01e33df83f (Help: Modernize BUILD_SHARED_LIBS
documentation, 2024-02-21) to highlight that BUILD_SHARED_LIBS
needs to be set early enough to prevent different behavior between
the first and subsequent runs.
2024-02-22 10:33:21 +11:00
Brad King
68add66ca5 Merge topic 'doc-BUILD_SHARED_LIBS'
01e33df83f Help: Modernize BUILD_SHARED_LIBS documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9278
2024-02-21 13:50:32 -05:00
Brad King
01e33df83f Help: Modernize BUILD_SHARED_LIBS documentation
Previously the documentation used long-outdated terminology from
CMake's early days.

Issue: #25699
2024-02-21 09:25:49 -05:00
Brad King
b814641444 VS: Add [CMAKE_]VS_USE_DEBUG_LIBRARIES options to control UseDebugLibraries
This indicates to MSBuild which configurations are considered debug
configurations.  This is useful for reference both by humans and tools.

Issue: #25327
2024-02-19 10:40:41 -05:00
Alan Phipps
9ba0a54554 TIClang: Add support for TI Clang-based compilers, including tiarmclang
Add TIClang compiler ID and support in compiler modules.  Update
documentation.  Add rudimentary RunCMake test for TIClang to test
basic functionality.

Fixes: #24619
2024-02-09 15:54:40 -05:00
Brad King
d968391a0f Merge topic 'doc-autogen' into release-3.29
ccaf529c4e Autogen: Update Documentation
16cc011fa5 cmQtAutoGenGlobalInitializer: Improve Const-correctness

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9223
2024-02-08 11:10:47 -05:00
Orkun Tokdemir
ccaf529c4e Autogen: Update Documentation
* Add Qt 6 to documentation
* Add explanation about `<ORIGIN>_autogen_timestamp_deps`

Fixes: #25201
2024-02-08 09:16:37 -05:00
Peter Kokot
ef2547bd6a Help: Document CMAKE_SYSTEM_NAME possible values
Fixes: #21489
2024-02-05 10:15:08 -05:00
Silvio Traversaro
06af18b9db cmake: Allow CMAKE_INSTALL_PREFIX to be set by environment variable
Fixes: #25023
2024-01-30 11:44:45 -05:00
Brad King
13ece67a58 Add genex support to TEST_LAUNCHER and CROSSCOMPILING_EMULATOR
Evaluate generator expressions in these properties, as they apply to
`add_test`, `add_custom_command`, and `add_custom_target`.

The `CMAKE_CROSSCOMPILING_EMULATOR` variable's `try_run` behavior occurs
at configure time and so cannot support generator expressions.
2024-01-29 10:30:24 -05:00
Brad King
c75047709f Merge topic 'autogen-exe-per-config'
596e84b0d5 NinjaMultiConfig: Update tests for the new dependency change
7c39dabdbc Autogen: AUTO*_EXECUTABLE: add support for per-config values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8919
2024-01-18 09:01:17 -05:00
Orkun Tokdemir
7c39dabdbc Autogen: AUTO*_EXECUTABLE: add support for per-config values
* Per-config values were added to `AUTO*_EXECUTABLE`.
* Dependency order was refactored for `cmake_autogen` and `cmake_autorcc` to avoid unnecessary rebuilds.
* A new parameter was added for `cmake_autogen` and `cmake_autorcc` to specify the config name of the `auto*_executable` to be used.
* Add `AUTOGEN_BETTER_GRAPH_MULTI_CONFIG` target property to change the behavior of the dependency graph.
* The timestamp target is split into three targets for per-config to avoid redundant `mocs_compilation` builds when `AUTOGEN_BETTER_GRAPH_MULTI_CONFIG`	 is ON
* Per-config `DEP_FILE_RULE_NAME` values were added to `AutogenInfo.json` for `Multi-Config` usage.
* Some functions were refactored to avoid code duplication.

This commit reimplements fddd0f0443

Fixes: #20074
2024-01-17 16:02:58 +01:00
Brad King
ff0085cf74 Help: Drop incorrect versionadded mark from CMAKE_MATCH_<n>
It was added by commit 496ec6036f (Help: Add Sphinx 'versionadded'
directives to each top-level document, 2020-07-06, v3.19.0-rc1~558^2)
because the document happened to be added during the 3.9 release series,
but the variable has existed since the beginning.
2024-01-09 16:31:53 -05:00
Brad King
6ba3bb0563 Merge topic 'cmake-test-launcher'
88863d83d6 fileapi: Add test launcher to codemodel-v2
1ec0372ed4 add_test: Optionally use a launcher for tests running in-project targets
478a5f4e04 fileapi: Make launcher attribute 'arguments' optional
b44e38a397 cmFileAPICodemodel: Add missing std::move()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8963
2023-12-15 09:34:20 -05:00
Ralf Habacker
1ec0372ed4 add_test: Optionally use a launcher for tests running in-project targets
Add a `CMAKE_TEST_LAUNCHER` variable and corresponding `TEST_LAUNCHER`
target property.

Issue: #23672
2023-12-13 10:20:43 -05:00
Brad King
2040b79a39 Merge topic 'compute-compiler-linker'
df025444b2 LinkerId: Identify AIX and SunOS system linkers
c1e48a19a5 LinkerId: Try multiple flags to detect linker id and version
1e42a0cf18 LinkerId: Match linker id and version more robustly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9057
2023-12-09 08:16:01 -05:00
Brad King
243f56c8e0 Merge topic 'LLVMFlang-Fortran-link-enhancements'
0502b345f2 LLVMFlang Fortran: enhance link capabilities

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9025
2023-12-09 08:14:06 -05:00
Brad King
df025444b2 LinkerId: Identify AIX and SunOS system linkers
Populate `CMAKE_<LANG>_COMPILER_LINKER_{ID,VERSION}` on these platforms.
2023-12-08 16:32:20 -05:00
Marc Chevrier
0502b345f2 LLVMFlang Fortran: enhance link capabilities
* Add support for "LINKER:" prefix.
* Add support, on Linux, for linker selection through CMAKE_LINKER_TYPE variable.
2023-12-08 19:22:24 +01:00
Daniel Ching
f20c5c6f20 MSVC: Teach find_library to consider Rust's '${name}.dll.lib' convention
This convention is used by Rust toolchains (rustc/cargo/cargo-c) for the
MSVC ABI.

Fixes: #25478
2023-12-07 19:19:00 -06:00
Brad King
43d218d970 VS: Add support for using Intel oneAPI Fortran compiler in .vfproj files
Add a `fortran={ifort,ifx}` field to `CMAKE_GENERATOR_TOOLSET` to
specify which Intel Fortran compiler to use.

Fixes: #25427
2023-11-22 10:22:12 -05:00
Brad King
4c1a6f2e23 Merge topic 'ci-fedora-39'
cdd741ebf9 Merge branch 'backport-ci-fedora-39' into ci-fedora-39
9283b20659 ci: Suppress CPack/RPM tests pending fix for Fedora 39
18145e8745 ci: Update FindMPI test environment for mpich on Fedora 39
a8be80ccf2 ci: Drop now-unnecessary Clang rules for CXXModules tests
99238b23e9 ci: use Fedora 39 images and environments
57eadec617 ci: update Linux image to Fedora 39
653262162c clang-tidy module: Update to build against LLVM/Clang 17
2cf9a65835 clang-tidy: ignore warnings new in version 17
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8983
2023-11-20 08:10:37 -05:00
Brad King
1f7a653e90 Merge topic 'swift-compilation-mode'
0f80101b73 Tests: Update Swift tests to use CMP0157 NEW behavior
c1d787e473 Swift: Add abstraction for compilation mode
c39384f540 Tests: Simplify RunCMake.Swift conditions to enable use of Swift

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8918
2023-11-19 11:47:37 -05:00
Brad King
cdd741ebf9 Merge branch 'backport-ci-fedora-39' into ci-fedora-39 2023-11-17 11:35:41 -05:00
Brad King
2744f14db1 codespell: Fix typos 2023-11-17 09:58:21 -05:00
Evan Wilde
c1d787e473 Swift: Add abstraction for compilation mode
Add a `CMAKE_Swift_COMPILATION_MODE` variable and corresponding
`Swift_COMPILATION_MODE` target property to control the compilation
mode.  Select among `wholemodule`, `singlefile`, and `incremental`.

Add policy CMP0157 to remove the default `-wmo` flags in favor of the
abstract setting.

Issue: #25366
2023-11-17 08:43:21 -05:00
Brad King
6f8532fbfa Merge topic 'autogen-rsp'
232610e60e Autogen: Use new API for limiting autogen command line lengths
7a07887055 Autogen: Add support for response files for moc predef targets
7eb5ab2c63 Autogen: Generalize MaybeWriteMocResponseFile to MaybeWriteResponseFile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8944
2023-11-17 08:23:18 -05:00
tophoo
7a07887055 Autogen: Add support for response files for moc predef targets
Add support for response files for moc predef targets and make the limit when
to use response files for autogen targets configurable.
2023-11-16 16:29:02 +01:00
Brad King
105ac2670b Merge topic 'doc-find_package-advice'
d007d304ff Help: FetchContent FIND_PACKAGE_ARGS REQUIRED usually inappropriate
6341267780 Help: Note ways CMAKE_..._FIND_PACKAGE_... vars can break projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8951
2023-11-15 08:38:54 -05:00
Kyle Edwards
c6e6861e63 install(EXPORT): Export find_dependency() calls
Issue: #20511
Co-Authored-by: Brad King <brad.king@kitware.com>
Co-Authored-by: Robert Maynard <rmaynard@nvidia.com>
2023-11-13 11:07:52 -05:00
William Sciaroni
5e0c1777a3 Optionally make test target depend on all
Fixes: #8774
2023-11-10 13:19:11 -05:00
Craig Scott
6341267780 Help: Note ways CMAKE_..._FIND_PACKAGE_... vars can break projects
Issue: #23779
2023-11-07 21:38:10 +08:00
Marc Chevrier
c26c6ac488 Link Step: compute effective linker used by the compiler
Extract the effective linker during the computation of implicit artifacts
delivered by the compiler to the linker.
Define various variables describing the linker:
* CMAKE_<LANG>_COMPILER_LINKER
* CMAKE_<LANG>_COMPILER_LINKER_VERSION
* CMAKE_<LANG>_COMPILER_LINKER_ID
* CMAKE_<LANG>_COMPILER_LINKER_FRONTEND_VARIANT

This is complementary to feature introduced by commit 96a953b1ed
(Add options to specify linker tool, 2023-09-27).

Fixes: #17596, #18209, #25344
2023-10-24 08:34:50 -04:00
Cristian Le
b37b912e8f CMAKE_PROJECT_INCLUDE: Allow to run module files
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2023-10-18 18:01:05 +02:00
Cristian Le
704acca96b CMAKE_PROJECT_INCLUDE: Add support for including multiple files
Fixes: #25341
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2023-10-18 13:39:55 +02:00
Marc Chevrier
96a953b1ed Add options to specify linker tool
Offer the capability, through variable `CMAKE_LINKER_TYPE`, as well as
the target property `LINKER_TYPE` to specify which linker must be used.

The implementation of this capability is specified by variables specific
to the language and linker type: `CMAKE_<LANG>_USING_LINKER_<TYPE>`.
Some definitions are provided as part of `CMake`.

For example, to select the `LLVM` linker rather than the standard one,
the type `LLD` should be specified through the variable `CMAKE_LINKER_TYPE`.
And, on `Apple`, `Linux` and some environments on `Windows`, the variable
`CMAKE_<LANG>_USING_LINKER_LLD` has value `-fuse-ld=lld`. And for `Windows`
environments  based on `MSVC`, where the linker is used directly, the tool
`lld-link.exe` will be used rather than `link.exe`.

Fixes: #19174, #24254, #24990
2023-10-13 11:52:35 +02:00
Ben Boeckel
0c07f39006 cmExperimental: remove the flag for C++ modules
All the major compilers now have scheduled releases with support for
scanning, so remove the experimental gate.

Fixes: #18355
2023-10-02 10:17:31 -04:00
Brad King
2a12a83037 Merge topic 'misc-cxxmodule-fixes'
3b632f32fa Tests/CXXModules: forward the default build type
5ab6b09691 Tests/CXXModules: fix multi-config and MSVC details
11b62ef118 Tests/CXXModules: add missing `bmi-only` and compiler id fields
5d9631fbdd Tests/CXXModules: fix key set mismatch error messages
86e7fb72cb Tests/CXXModules: use a less generic name for the config
6b940dc590 Tests/CXXModules: replace the object extension as well
1c9f83c8ec Tests/CXXModules: fix error detection propagation
7a4c02cb38 cmGlobalGenerator: factor out messaging for CMP0037
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Merge-request: !8834
2023-09-27 11:22:05 -04:00
Brad King
5d32320bf3 Merge topic 'hip-nvidia'
fd982eec10 HIP: Add tests for special NVIDIA values of CMAKE_HIP_ARCHITECTURES
8c8b3f1bfa HIP: Fix support for -DCMAKE_HIP_ARCHITECTURES=native with NVCC
b3e92775ab HIP: Add CMAKE_HIP_HOST_COMPILER when compiler is NVCC
e43918b4ca HIP: Fix linking mixed-lang binary with CXX compiler and Makefile generators
4794505122 HIP: Do not require hip-lang package for NVIDIA platform
09d759dc7f HIP: Simplify exclusion of AMD device runtime with NVIDIA GPUs
2a60663670 HIP: Simplify CMAKE_GENERATOR references for determining compiler
8124950f6c CUDA: Generalize CMAKE_{CUDA => <LANG>}_HOST_COMPILER variable docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8836
2023-09-26 09:40:25 -04:00
Ben Boeckel
43112cbb45 Help/CMAKE_EXPORT_COMPILE_COMMANDS: mention the output field
Added in 887a8874c3 (EXPORT_COMPILE_COMMANDS: add `output` field,
2022-10-28) via !7844. Sync the docs with this addition.
2023-09-25 17:39:35 -04:00
Brad King
b3e92775ab HIP: Add CMAKE_HIP_HOST_COMPILER when compiler is NVCC
Also add `HIPHOSTCXX` environment variable.
2023-09-25 16:11:18 -04:00
Brad King
8124950f6c CUDA: Generalize CMAKE_{CUDA => <LANG>}_HOST_COMPILER variable docs 2023-09-25 16:06:30 -04:00