Commit Graph

2522 Commits

Author SHA1 Message Date
Orkun Tokdemir
033dc7ee2f Autogen: Add AUTOGEN_USE_SYSTEM_INCLUDE target property
`AUTOGEN_USE_SYSTEM_INCLUDE` was added. `AUTOGEN_USE_SYSTEM_INCLUDE`
is a boolean property that can be set on a target to indicate that the
autogen target include directory should be added as a system include
directory or normal include directory to the target.
2023-05-03 09:03:46 -04:00
Craig Scott
0ca98beb57 Merge topic 'ExternalProject-relative-git-urls'
550f63447d ExternalProject/FetchContent: Support relative remote URLs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7988
2023-04-27 09:12:26 -04:00
Zoran Angelov
f552ba6e6d presets: add support for macro expansion to includes
Only `$penv{}` can be expanded when processing includes.
2023-04-26 10:03:53 -04:00
Chris Wright
550f63447d ExternalProject/FetchContent: Support relative remote URLs
Teach `ExternalProject_Add` and `FetchContent_Declare` to resolve
relative remote URLs provided via `GIT_REPOSITORY`.  Add policy
CMP0150 to maintain compatibility.

Fixes: #24211
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
2023-04-26 16:30:36 +08:00
Marc Chevrier
31675964e7 GenEx LIST: list operations
Fixes: #24550, #24547
2023-04-16 12:00:20 +02:00
Craig Scott
e245b4df75 Merge topic 'automoc-macro-names'
c5c3aff1f5 Autogen: Add INTERFACE_AUTOMOC_MACRO_NAMES target property
69cf9700e6 Autogen: Defer setup until Generate step
7cecb6353e cmGeneratorTarget: Factor out EvaluatedTargetProperty infrastructure
2daba01ddf cmGeneratorTarget: Avoid incidental include-what-you-use warning
850b4d990c IWYU: Add mapping for 'std::remove_reference<Defer &>::type'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8391
2023-04-10 18:06:06 -04:00
Orkun Tokdemir
c5c3aff1f5 Autogen: Add INTERFACE_AUTOMOC_MACRO_NAMES target property
Add this target property to specify macro names that propagate to
dependents as `AUTOMOC_MACRO_NAMES`.  The dependents will automatically
generate MOC files for source files that contain the inherited macro
names.

Co-Authored-By: Craig Scott <craig.scott@crascit.com>
Fixes: #19679
2023-04-09 20:51:15 +10:00
Brad King
2f3d945f83 VS: Add CMAKE_GENERATOR_PLATFORM field to control Windows SDK selection
Add a `version=` field to explicitly control the SDK version selection
without relying on `CMAKE_SYSTEM_VERSION`.

Fixes: #16713
2023-04-05 12:06:22 -04:00
Brad King
a4c5b91f80 FindPython{Interp,Libs}: Add policy to remove these modules
The `FindPythonInterp` and `FindPythonLibs` modules have been deprecated
since CMake 3.12.  Add a policy to pretend they do not exist in order to
encourage projects to port to `FindPython` or `FindPython{2,3}`.
2023-03-30 12:05:09 -04:00
Brad King
f4b8176447 Merge topic 'lint-genex'
099934e313 Add generator expression support to static code analysis hooks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8361
2023-03-28 08:18:43 -04:00
Brad King
3beeca8e36 Merge topic 'FindPython-Windows-ARM'
9913c28ebb FindPython: Add Windows/ARM support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: David Lechner <david@lechnology.com>
Merge-request: !8354
2023-03-28 08:15:14 -04:00
Stefan Schober
099934e313 Add generator expression support to static code analysis hooks
Teach target properties `<LANG>_CPPCHECK`, `<LANG>_CPPLINT`,
`<LANG>_CLANG_TIDY` and `<LANG>_INCLUDE_WHAT_YOU_USE` to accept
generator expressions.
2023-03-27 11:48:41 -04:00
Brad King
5922c86ed6 file(GET_RUNTIME_DEPENDENCIES): Document case-preserving change on Windows
In commit fa45594407 (file(GET_RUNTIME_DEPENDENCIES): Preserve casing
for Windows PE binaries, 2023-03-06) we neglected to update associated
documentation.
2023-03-27 09:49:51 -04:00
Marc Chevrier
9913c28ebb FindPython: Add Windows/ARM support
Fixes: #24587
2023-03-26 10:58:12 +02:00
Brad King
5386dc582b Merge topic 'autogen-exe-vars'
b3d1797508 Autogen: Add CMAKE_AUTO*_EXECUTABLE variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8352
2023-03-23 08:46:45 -04:00
Orkun Tokdemir
b3d1797508 Autogen: Add CMAKE_AUTO*_EXECUTABLE variables
Add the `CMAKE_AUTOMOC_EXECUTABLE`, `CMAKE_AUTOUIC_EXECUTABLE`, and
`CMAKE_AUTORCC_EXECUTABLE` variables to initialize the corresponding
`AUTO{MOC,UIC,RCC}_EXECUTABLE` target properties.

Fixes: #20071
2023-03-22 07:31:56 -04:00
Brad King
2c2c2c2227 Merge topic 'vs-windows-min-version'
6546305b01 VS: Add CMAKE_VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8319
2023-03-16 09:11:07 -04:00
halx99
6546305b01 VS: Add CMAKE_VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION variable
Provide a way to initialize the `VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION`
target property on targets.  It sets `WindowsTargetPlatformMinVersion`
in `.vcxproj` files.
2023-03-15 10:03:16 -04:00
Brad King
db4f4ad24e Merge topic 'support_cubin_fatbin_optix_cuda_output'
2def6a874b CUDA: Add support for CUBIN, FATBIN, and OPTIXIR compilation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8259
2023-03-14 09:35:00 -04:00
Robert Maynard
2def6a874b CUDA: Add support for CUBIN, FATBIN, and OPTIXIR compilation 2023-03-13 09:54:00 -04:00
Brad King
7d43bcb4db Merge topic 'vs-BuildInParallel'
7a7793e6d7 FindCUDA: Disallow with CMP0147 under Visual Studio
d6353e74b4 VS: Add policy to build custom commands concurrently

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8314
2023-03-13 09:39:28 -04:00
Brad King
072372aeb8 Merge topic 'findopengl-gles'
beb0a56c86 FindOpenGL: support finding GLES2 and GLES3

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !8309
2023-03-13 09:37:41 -04:00
Brad King
d6353e74b4 VS: Add policy to build custom commands concurrently
In commit 33c15ae2b9 (VS: Build custom commands concurrently when
possible, 2023-01-19, v3.26.0-rc1~56^2) we added `BuildInParallel` to
custom commands in `.vcxproj` files, but that had to be reverted by
commit abb1c12162 (VS: Revert "Build custom commands concurrently when
possible", 2023-03-07, v3.26.0-rc6~3^2) because some projects may have
custom commands that accidentally rely on serial execution in MSBuild.

Add a policy to use `BuildInParallel` for custom commands in projects
that have been updated to set the policy to `NEW`.

Fixes: #18405
2023-03-12 07:51:58 -04:00
Jaswant Panchumarti
beb0a56c86 FindOpenGL: support finding GLES2 and GLES3
This also makes the EGL component not GLVND-specific, so documentation
and tests are updated accordingly.
2023-03-10 13:24:27 -05:00
Brad King
d95ac61225 Merge topic 'cxx-module-extensions'
45d1925efc Treat '.ccm', '.cxxm', and '.c++m' files as C++ sources
8c96d145c1 Tests/RunCMake: Match 'Tried extensions' output more robustly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8308
2023-03-10 11:08:11 -05:00
Brad King
45d1925efc Treat '.ccm', '.cxxm', and '.c++m' files as C++ sources
These extensions are used by convention for C++ module interface units
with Clang.

For now, do not add any tests using these extensions.
Very few compilers recognize them as C++ sources.
Tests can be added later as part of C++ modules support.
2023-03-09 14:36:01 -05:00
Brad King
2c146a7fc5 FindCUDA: Add policy to remove this module
The `FindCUDA` module has been deprecated since CMake 3.10.
Add a policy to pretend it doesn't exist in order to encourage
projects to port away from it.
2023-03-09 07:39:36 -05:00
CheesyNacho10
e36e455b7c FindwxWidgets: Add an imported target 2023-03-08 16:39:38 -05:00
Robert Maynard
21b102c77d FindCUDAToolkit: Add support for finding Tegra cudla library
Fixes #24575
2023-03-07 13:47:16 -05:00
Brad King
1d7fb31778 Merge topic 'Apple-handle-Text-Stubs'
ede33f30cf Apple: Handle generation and comsuption of text-based stubs (.tbd files)
fcbd723a50 Enhance support functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !8204
2023-03-02 09:53:03 -05:00
Marc Chevrier
ede33f30cf Apple: Handle generation and comsuption of text-based stubs (.tbd files)
Fixes: #24123
2023-03-01 12:23:28 +01:00
Brad King
2e469212c8 Dart,FindDart: Add policy to remove these modules
These modules and the "DART" tool they support have long been replaced
by CTest.
2023-02-28 08:43:45 -05:00
Brad King
40539096fd Merge topic 'dll-name-soversion'
a7f9c7da26 Add option to add SOVERSION to DLL names
9694504adc Tests: Simplify RunCMake.TargetArtifacts spec
3cd34eb279 Tests: Rename RunCMake.{ArtifactOutputDirs => TargetArtifacts}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8021
2023-02-28 08:29:20 -05:00
Ralf Habacker
a7f9c7da26 Add option to add SOVERSION to DLL names
Add variable/target property `[CMAKE_]DLL_NAME_WITH_SOVERSION`.

Fixes: #24251
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2023-02-27 09:18:34 -05:00
Kyle Edwards
18e02ace5b install(CODE|SCRIPT): Support $<INSTALL_PREFIX> genex
Fixes: #24534
2023-02-24 10:17:45 -05:00
Brad King
88b75204e5 Merge topic 'PATH-genex-handle-list-of-paths'
e395310a21 PATH-genex: handle lists for path decomposition and transformations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8238
2023-02-24 08:35:19 -05:00
Brad King
df9c4b1872 find_package: Use <PACKAGENAME>_ROOT variables as search prefixes
Extend commit eb35d8884b (find_package: Use PackageName_ROOT variables
as search prefixes, 2018-03-15, v3.12.0-rc1~349^2) to also check
upper-case `<PACKAGENAME>_ROOT` variables.  Add policy `CMP0144` to
enable the behavior in a compatible way.

Fixes: #24403
2023-02-23 09:15:14 -05:00
Marc Chevrier
e395310a21 PATH-genex: handle lists for path decomposition and transformations
Fixes: #24371
2023-02-21 19:34:43 +01:00
Abdelmaged Khalifa
ea2a05f402 Add variable CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY
Add CMake variable `CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY` to enable
option `DEPENDS_EXPLICIT_ONLY` on all uses of `add_custom_command`.

Fixes: #17097
2023-02-17 17:12:12 +02:00
Brad King
ef5a4d964b Deprecate "extra" generators in favor of cmake-file-api(7)
The "extra" generators were created in CMake's early years to provide
support for users of specific IDEs by directly generating their project
files alongside make or ninja files.  Nowadays the file-api provides a
more generic, maintainable, well-tested, and robust way for IDEs to view
CMake project build trees.  Deprecate the legacy "extra" generators to
encourage the corresponding IDEs to use the file-api.

Fixes: #19090
2023-02-15 10:48:26 -05:00
Brad King
e2ed34abf8 Merge topic 'ninja-custom-command-depends'
082ccd7530 add_custom_command: Add DEPENDS_EXPLICIT_ONLY option for Ninja

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8198
2023-02-15 08:57:32 -05:00
Abdelmaged Khalifa
082ccd7530 add_custom_command: Add DEPENDS_EXPLICIT_ONLY option for Ninja
Add option `DEPENDS_EXPLICIT_ONLY` to `add_custom_command` to indicate
that implicit dependencies coming from users of the output are not
needed, and only consider dependencies explicitly specified in the
custom command.

Fixes: #17097
2023-02-14 08:56:59 -05:00
Brad King
3a4791548d Deprecate compatibility with CMake versions older than 3.5
Issue a deprecation warning on calls to `cmake_minimum_required` or
`cmake_policy` that set policies based on versions older than 3.5.
Note that the effective policy version includes `...<max>` treatment.
Update the check from commit 5845c218d7 (Deprecate compatibility with
CMake versions older than 2.8.12, 2020-06-12, v3.19.0-rc1~629^2).
2023-02-11 06:25:11 -05:00
Brad King
d7f440c5db Deprecate Visual Studio 9 2008 generator
Update documentation to mark the generator deprecated.  Add a warning at
the end of generation plus an option to turn off the warning.
2023-02-08 11:49:27 -05:00
Kyle Edwards
33e27f6ca6 <LANG>_LINKER_LAUNCHER: Allow generator expressions 2023-02-02 11:58:56 -05:00
Brad King
641dd4ee73 Begin post-3.26 development 2023-02-01 14:46:16 -05:00
Brad King
e5fee37101 Help: Drop development topic notes to prepare release
Release versions do not have the development topic section of
the CMake Release Notes index page.
2023-02-01 14:42:26 -05:00
Brad King
4c63f031c1 Help: Consolidate 3.26 release notes
Run the `Utilities/Release/consolidate-relnotes.bash` script to move
notes from `Help/release/dev/*` into `Help/release/3.26.rst`.
2023-02-01 13:58:23 -05:00
Brad King
bc1ba6d56b Help: Document experimental feature gate affecting CXX_SCAN_FOR_MODULES
Also drop the release note for `CXX_SCAN_FOR_MODULES`, as the rest of
the C++ modules support has not yet been mentioned in release notes
(since it is still experimental).
2023-02-01 13:58:23 -05:00
Robert Maynard
2a94c762ed FindCUDAToolkit: Add support for CUDA::nvrtc_static 2023-01-20 12:05:43 -05:00