Commit Graph

2700 Commits

Author SHA1 Message Date
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
Brad King
e0355c4ea9 FindBoost: Add policy to remove this module
Upstream Boost 1.70 and above provide a proper `BoostConfig.cmake`
package configuration file.  Packages for all major distros now
provide it in at least one LTS release.  Add a policy to pretend
that the `FindBoost` module does not exist so that projects calling
`find_package(Boost)` use the upstream package directly.

Closes: #19402
2024-05-03 10:30:23 -04:00
Brad King
f0b40d451e Merge topic 'vs-filter-props'
56a96d1f1f VS: Add option to import .props in .vcxproj.filters files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9478
2024-05-02 09:43:17 -04:00
Brad King
1d8848c4ce Merge topic 'FindOpenMP-runtime-msvc'
b07c637e42 FindOpenMP: Add option to control OpenMP runtime with MSVC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9475
2024-05-02 09:34:29 -04:00
halx99
56a96d1f1f VS: Add option to import .props in .vcxproj.filters files
Adds new target property VS_FILTER_PROPS

Fixes: #25948
2024-05-02 00:30:00 +08:00
Brad King
de9faaf0a3 Merge topic 'genex-link-properties'
ddb9442f48 GenEx: Fix TARGET_PROPERTY evaluation of transitive link properties
862b8e28ad GenEx: Teach TARGET_PROPERTY evaluation to optionally pierce LINK_ONLY
8d1d6a1437 Tests: Cover TARGET_PROPERTY genex evaluation of transitive link properties
abf607c2ec Tests: Cover TARGET_PROPERTY genex evaluation of transitive build properties
7d3d728a72 Help: Clarify CMP0099 documentation and summary text
79a3ae9a0d cmGeneratorExpressionDAGChecker: Simplify transitive property table
e8010b67c7 cmGeneratorExpressionDAGChecker: Make local generator available in constructor
b36fb3f6f1 cmGeneratorExpressionNode: Remove outdated lint suppression

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9473
2024-05-01 10:06:11 -04:00
Axel Huebl
b07c637e42 FindOpenMP: Add option to control OpenMP runtime with MSVC
The MSVC compiler's `-openmp` flag accepts `:{experimental,llvm}`
values.  Add an option to specify one.

Closes: #25570
2024-05-01 08:25:14 -04: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
ddb9442f48 GenEx: Fix TARGET_PROPERTY evaluation of transitive link properties
In commit bbba701899 (Link properties: must be transitive over private
dependency on static library, 2019-12-06, v3.17.0-rc1~323^2) and
commit af9d4f24ae (Link properties: must be transitive over private
dependency on static library, 2019-12-11, v3.17.0-rc1~305^2) we
neglected to implement CMP0099 NEW behavior for `TARGET_PROPERTY`
evaluation.  Add policy CMP0166 to fix this.
2024-04-29 17:40:03 -04:00
Brad King
d550a1ebea Merge topic 'cpack-innosetup-linux'
d4a46314ac CPack: Enable Inno Setup generator on non-Windows hosts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9431
2024-04-16 08:55:57 -04:00
Brad King
f494bbaf8f Merge topic 'FindBacktrace-imported-library'
9433755e5d FindBacktrace: Add imported library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9406
2024-04-16 08:51:59 -04:00
Andreas Oetken
d4a46314ac CPack: Enable Inno Setup generator on non-Windows hosts
Innosetup tools can be run on Linux using Wine, thus there is no reason
to block this in CMake.
2024-04-15 16:34:22 -04:00
David Faure
9433755e5d FindBacktrace: Add imported library
This is to avoid (a future version of) Qt from having to wrap
FindBacktrace like [1].

[1] https://code.qt.io/cgit/qt/qtbase.git/tree/cmake/FindWrapBacktrace.cmake
2024-04-15 13:27:23 -04:00
Ben Boeckel
7146cf9248 cmTarget: support the CXX_MODULE_STD property 2024-04-11 10:19:44 -04:00
Raul Tambre
f21dbf8f26 C++26: Fix C++/CUDA/HIP compile feature support
In commit f808d8afb9 (CMake: Support upcoming C++26 language level,
2022-08-19, v3.25.0-rc1~218^2) we forgot some necessary scaffolding.

Fixes: #25819
2024-04-09 11:38:59 +03:00
Brad King
7fde843527 Merge topic 'enable_language-before-project'
97464aa970 enable_language(): Fail if called before project()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9396
2024-04-03 09:38:46 -04:00
Craig Scott
97464aa970 enable_language(): Fail if called before project()
Fixes: #25550
2024-04-02 23:00:38 +11:00
Brad King
b0315c83dc ci: package .zip source archives using LF newlines
Previously we provided a `.zip` archive with CRLF newlines and a
`.tar.gz` archive with LF newlines.  This is no longer consistent
with modern conventions.  Use LF newlines in both.

Fixes: #25467
2024-04-01 10:53:11 -04:00
Brad King
252c2a6fcb Merge topic 'add_library-no-static-fallback'
a61c9afdf8 add_library: Reject shared libraries on platforms that do not support them

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9347
2024-04-01 09:38:14 -04:00
Brad King
554a9b00c8 Merge topic 'tls-verify'
7139944264 ctest: Fall back to CMake environment variable for TLS server verification
c295df53c6 ctest: Test fallback to CMake options for TLS server verification
0d250dd021 ExternalProject: Honor CMAKE_TLS_VERIFY environment variable
e8404502b1 ExternalProject: Revise TLS_VERIFY wording to use TLS_VERSION pattern
46faaf9667 file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERIFY environment variable
8b0169fe2b file(DOWNLOAD|UPLOAD): Add test covering CMAKE_TLS_VERIFY cmake variable
93886f5c7d file(DOWNLOAD|UPLOAD): Avoid unnecessary CMAKE_TLS_VERIFY variable lookup
bed32f400e file(DOWNLOAD|UPLOAD): Document TLS_VERSION fallback to environment variable
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9389
2024-04-01 09:37:20 -04:00
Brad King
5ebd5daa93 Merge topic 'rel-win-PATH'
2e5330591d Utilities/Release/WiX: Modify PATH by default when installing on Windows
32388821e2 Utilities/Release/WiX: Save PATH modification preference persistently

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nazar Mokrynskyi <nazar@mokrynskyi.com>
Merge-request: !9386
2024-04-01 09:36:27 -04:00
Brad King
46faaf9667 file(DOWNLOAD|UPLOAD): Add CMAKE_TLS_VERIFY environment variable
Issue: #23608
2024-03-30 09:22:04 -04:00
Asit Dhal
a61c9afdf8 add_library: Reject shared libraries on platforms that do not support them
Add policy CMP0164 to provide compatibility.

Fixes: #25759
2024-03-29 11:06:32 -04:00
Brad King
f852f33c69 Merge topic 'prop-GENERATED-visibility'
071f0d6f98 CMP0163: Make GENERATED source file property globally visible
00c6573d86 cmSetPropertyCommand: Refactor checks for CMP0118
e04af1e9c2 cmGetSorceFilePropertyCommand: Simplify string comparisons

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9308
2024-03-29 09:59:06 -04:00
Brad King
2e5330591d Utilities/Release/WiX: Modify PATH by default when installing on Windows
If the PATH modification choice has not been saved persistently by an
existing installation of CMake, default to modifying the system PATH
environment variable to make our command-line tools available for all
users.  This is a common expectation.

Fixes: #21465
2024-03-29 09:32:27 -04:00
Brad King
32388821e2 Utilities/Release/WiX: Save PATH modification preference persistently
Our Windows installer provides an interactive dialog to choose whether
the PATH should be modified.  It may also be specified on the `msiexec`
command-line as an `ADD_CMAKE_TO_PATH={0,1}` property.  Save the choice
persistently in the Windows Registry and use the same choice by default
in future installations.

Issue: #21465
2024-03-29 09:32:27 -04:00
Deniz Bahadir
071f0d6f98 CMP0163: Make GENERATED source file property globally visible
This was originally attempted by policy CMP0118, but its
implementation did not cover all intended use cases.  We fixed its
documentation in commit 1dabbbb5e0 (CMP0118: Revise documentation to
describe actual behavior, 2024-03-20).

Add new policy CMP0163 to cover the remaining use cases.  In particular,
make the `GENERATED` property visible to `get_property` calls in other
directories.  In order to capture the original intention of CMP0118,
define CMP0163's NEW behavior to also imply CMP0118's NEW behavior.

Fixes: #25437
Fixes: #25058
2024-03-29 08:54:11 -04:00
Brad King
03884f4f32 CPack/WIX: Add support for WiX Toolset v4
Add a `CPACK_WIX_VERSION` option to specify version WiX for
which the project is configured.

Fixes: #23910
2024-03-24 15:26:39 -04:00
Arctic Lampyrid
6116bcb066 fileapi: Add CONFIGURE_DEPENDS glob info to cmakeFiles object
Fixes: #25668
Co-authored-by: Brad King <brad.king@kitware.com>
2024-03-19 14:55:25 -04:00
Brad King
6671f17f65 ctest: Add explicit options for TLS version
Add a dedicated `TLSVersion` ctest option and a `CTEST_TLS_VERSION`
variable to control it.

Issue: #25701
2024-03-12 10:46:23 -04:00
Brad King
0aba13a2f3 ctest: Add explicit options for TLS server verification
Add a dedicated `TLSVerify` ctest option and a `CTEST_TLS_VERIFY`
variable to control it.  Deprecate `CurlOptions` because it exposes
internal implementation details.
2024-03-12 10:46:11 -04:00
Brad King
edc936336e Merge topic 'CUDAToolkit_nvfatbin'
d420ee6b43 FindCUDAToolkit: Add support for nvfatbin added in 12.4

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9311
2024-03-08 09:26:27 -05:00
Robert Maynard
d420ee6b43 FindCUDAToolkit: Add support for nvfatbin added in 12.4 2024-03-05 16:43:09 -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
8e6776b9f3 file(DOWNLOAD|UPLOAD): Add TLS_VERSION option for https connections
Add an option to specify the minimum allowed TLS version for https
connections.

Issue: #25701
2024-02-28 08:40:14 -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
14ed766e12 Merge topic 'preset-includes-macro-expansion'
1a38ffc656 presets: Expand more macros in the `include` directive

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9108
2024-02-22 08:32:10 -05:00
Cristian Le
1a38ffc656 presets: Expand more macros in the include directive
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
2024-02-21 13:47:08 -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
Robert Maynard
879690ba14 GeneratorExpression: Add $<QUOTE> generator expression
Support inserting '"' literals in generator expressions

Fixes #20869
2024-02-14 14:23:18 -05:00
Brad King
b18165c2c6 Begin post-3.29 development 2024-02-06 14:58:46 -05:00
Brad King
1d1638c99d Help: Drop development topic notes to prepare release
Release versions do not have the development topic section of
the CMake Release Notes index page.
2024-02-06 14:48:37 -05:00
Brad King
ca7ef81c39 Help: Consolidate 3.29 release notes
Run the `Utilities/Release/consolidate-relnotes.bash` script to move
notes from `Help/release/dev/*` into `Help/release/3.29.rst`.
2024-02-06 09:29:11 -05:00
Jordan Williams
aebebf72df FindOpenGL: Add support for a separate GLU include directory
Add a OPENGL_GLU_INCLUDE_DIR cache variable for `GL/glu.h` and attach it
as an include directory to the `OpenGL::GLU` target.  Also add a
`OPENGL_INCLUDE_DIRS` result variable to list all include directories.
Account for the GLU header when deciding whether GLU is found.

Fixes: #25627
2024-02-05 14:06:06 -05:00
Brad King
58d424bca1 Merge topic 'add_custom_command-target-alias'
3b07ec631d add_custom_command: Allow adding build event via ALIAS target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9201
2024-02-01 08:32:20 -05:00
Chen Linxuan
3b07ec631d add_custom_command: Allow adding build event via ALIAS target
Signed-off-by: Chen Linxuan <me@black-desk.cn>
2024-02-01 08:21:41 -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