Commit Graph

2388 Commits

Author SHA1 Message Date
Brad King
01e95efc34 Merge topic 'cmake-presets-package'
a8d73085f4 CPack: Add support for presets
b699610df4 cmCMakePresetsGraph: Add package presets
215b9148eb CMakePresets.json: Fix formatting of --list-presets=all

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7621
2022-09-02 09:04:13 -04:00
Brad King
18a8aa079c Merge topic 'E-capabilities-tls'
d0bb3286f0 cmake -E capabilities: Tell whether TLS is enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7593
2022-09-02 09:01:51 -04:00
Kyle Edwards
d0bb3286f0 cmake -E capabilities: Tell whether TLS is enabled
Fixes: #20507
2022-09-01 11:20:14 -04:00
Brad King
d10cbb0590 Merge topic 'add_language_levels_for_cxx26'
f808d8afb9 CMake: Support upcoming C++26 language level

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !7601
2022-09-01 10:04:46 -04:00
Brad King
2e86c02c24 Merge topic 'compiler-launcher-genexp'
36400e9dc1 COMPILER_LAUNCHER: Add support for generator expressions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7613
2022-09-01 10:02:11 -04:00
Robert Maynard
f808d8afb9 CMake: Support upcoming C++26 language level 2022-08-31 13:46:18 -04:00
Kyle Edwards
a8d73085f4 CPack: Add support for presets
Fixes: #23117
2022-08-31 11:56:21 -04:00
Brad King
fc4451dd31 Merge topic 'xcode-add-gpu-validation-and-default-configuration'
740bee97bd Xcode: Add settings to control a scheme's launch configuration
39456c70e1 Xcode: Add settings to control a scheme's GPU Validation values
4034272ed8 gitignore: Tell Git to ignore the .cache/ directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7581
2022-08-31 09:43:50 -04:00
Thomas Weißschuh
36400e9dc1 COMPILER_LAUNCHER: Add support for generator expressions
Fixes: #23441
2022-08-30 17:26:25 -04:00
Dawid Wróbel
e706da5f7e FindOpenSP: Add module to find the OpenSP library
OpenSP has not seen a release in seventeen years, so is unlikely to ever
provide a CMake package configuration file.  Add a find module instead.
2022-08-30 13:55:07 -04:00
PatriceJiang
740bee97bd Xcode: Add settings to control a scheme's launch configuration 2022-08-30 10:28:27 -04:00
PatriceJiang
39456c70e1 Xcode: Add settings to control a scheme's GPU Validation values 2022-08-30 10:26:48 -04:00
Brad King
5936d4f2ad Merge topic 'block-management'
44a2f3f332 Add new flow-control commands for variables and policies scopes management
604993248f cmMakefile::VariablePushPop: helper class to manage variable scopes
3d94ee0e03 cmMakefile::RaiseScope: Add support for cmValue argument
553da0685f cmFunctionBlocker: Add handling of close block without parameters.
02c067dee5 cm::enum_set: fix various bugs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: John Ericson <git@johnericson.me>
Merge-request: !7575
2022-08-23 08:01:18 -04:00
Craig Scott
a8b274c74e Merge topic 'bsd-variables'
a20d7a9707 BSD: Set *BSD variables when targeting a *BSD system
2ae42d0aa3 kFreeBSD: Do not unset LINUX variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7573
2022-08-22 17:37:49 -04:00
Marc Chevrier
44a2f3f332 Add new flow-control commands for variables and policies scopes management
Add block() and endblock() commands offering the capability to create
new scopes for variables and/or policies.

Fixes: #20171
2022-08-22 16:25:53 +02:00
Cristian Adam
a20d7a9707 BSD: Set *BSD variables when targeting a *BSD system
Fixes: #23853
2022-08-21 09:27:59 +10:00
Alex Reinking
c9d70a7cc3 cmake -E env: Add --modify flag
When `cmake -E env` is given the `--modify` flag, try to parse the
following argument as an `ENVIRONMENT_MODIFICATION` operation and apply
it to the environment.

This generalizes `--unset=`:

1.  When implementing `ENVIRONMENT_MODIFICATION` features for other CMake
    commands, the `MYVAR=OP:VALUE` strings do not need to be translated
    to OP-specific flags.
2.  This provides a natural and consistent extension point to introduce
    new operations without introducing very many flags.
3.  Users need to learn only one syntax to access the same functionality.

There is one difference between the behavior here as compared to CTest's
interpretation of the `ENVIRONMENT_MODIFICATION` test property.
The `MYVAR=reset:` command when run in `cmake -E env` will reset `MYVAR`
to whatever its value was when `cmake -E env` launched, rather than try
to checkpoint after plain `MYVAR=VALUE` options.  This makes `MYVAR=VALUE`
and `--modify MYVAR=set:VALUE` semantically equivalent.
2022-08-17 12:54:39 -04:00
Raul Tambre
cd200c6c2d FindCUDAToolkit: nvtx3 target
nvtx3 is a header-only replacement for the previous shared library
implementations.

I implemented it as a separate target since while the header names match and
ideally it should be API compatible, forcing its include directory into the old
target would lengthen the include search path and could cause confusion or
possible build differences for projects using multiple build systems. This
keeps it explicit as a developer opt-in.

Implements: #21377
Resolves: #23835
2022-08-13 23:52:42 +03:00
Cristian Adam
62cd3904bf variable: Set LINUX variable on Linux target systems
Fixes: #23840
2022-08-12 07:20:05 +10:00
Alex Turbov
e55c154c5b cmFindPackageCommand: Add one more search path
The `PREFIX/(Foo|foo|FOO).*/(cmake|CMake)/(Foo|foo|FOO).*/` search
path is the similar to the one already exists
`PREFIX/(Foo|foo|FOO).*/(lib/ARCH|lib*|share)/cmake/(Foo|foo|FOO).*/`.
2022-08-04 09:41:59 -04:00
Brad King
e2112b3778 Merge topic 'cpp-named-module-support-msvc'
4f95e6b284 ci: test BMI exporting and installation with GCC in CI
c49d5f137b RunCMake/CXXModules: add a "deep-chain" test
297e0f4dce cmCxxModuleMapper: support MSVC module map format
b3c2880cb2 cmCxxModuleMapper: track transitive modules for MSVC
a43713d615 CTestCustom: ignore `cm::optional` uninitialized memory false positive
b90de0b492 RunCMake/CXXModules: support MSVC extensions
a84c186a7d cmScanDepFormat: support the MSVC 17.3 toolchain temporarily
d7f5064ff7 cmScanDepFormat: support P1689R5
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7481
2022-08-03 09:45:15 -04:00
Brad King
f6917a2f1f Merge topic 'cuda_add_lto_support'
96bc59b1ca CUDA: Add Device LTO support for nvcc
1527d48cd0 CheckIPO: Refactor logic selecting test source files
4a552ab4ad remove unused variables
6eda92d037 remove unused variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7389
2022-08-03 09:42:17 -04:00
Ben Boeckel
d7f5064ff7 cmScanDepFormat: support P1689R5
This adds the `is-interface` key on provides fields.
2022-07-26 12:25:42 -04:00
Robert Maynard
96bc59b1ca CUDA: Add Device LTO support for nvcc
Fixes #22200
2022-07-22 10:34:45 -04:00
Brad King
96564c5b2d Merge topic 'FindVulkan-dxc'
1277b873c9 FindVulkan: Add `dxc` (DirectX Shader Compiler) component

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7474
2022-07-22 10:16:23 -04:00
Brad King
66998035c1 Merge topic 'try_run_split_output'
a2cd0687db try_run: Add RUN_OUTPUT_STDOUT_VARIABLE and RUN_OUTPUT_STDERR_VARIABLE.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7453
2022-07-22 10:14:34 -04:00
HellsingDarge
1277b873c9 FindVulkan: Add dxc (DirectX Shader Compiler) component 2022-07-20 17:06:31 -04:00
Patrick Northon
a2cd0687db try_run: Add RUN_OUTPUT_STDOUT_VARIABLE and RUN_OUTPUT_STDERR_VARIABLE. 2022-07-08 15:49:02 -04:00
Christian Heimlich
eaec9cf65d FindDoxygen: Implement more complete version checking
The foundation of the Doxygen Find Module's detection methodology
is the command `find_program`, which has inhibited the module from
properly handling user version restrictions when provided.

Because `find_program` historically has always returned after the first
match and does not consider version constraints, users of this module
are inadvertently at the mercy of the command's search procedure.
Essentially, `find_package(Doxygen ...)` will always provide the first
Doxygen build found through said procedure, even if it conflicts with
the user's version requirements, and even if another build exists on
the system that would satisfy those requirements (i.e. shadowing).

Utilizes the new `VALIDATOR` option of `find_program` to ensure all
otherwise detectable builds of Doxygen on a given system are evaluated
and that only a build in compliance with `Doxygen_FIND_VERSION`
et. al., when defined, will be matched against.

Also enables handling of version ranges specified within `find_package`
via the **FindPackageHandleStandardArgs** module.

Finally, ensures that only the major, minor, and patch components of
Doxygen's `--version` output are captured for comparison in cases where
it contains additional information, such as a git commit hash.

Fixes: #23692
2022-07-07 13:41:31 -04:00
Alexandru Croitor
23bbac941a Add cmake_language(GET_MESSAGE_LOG_LEVEL) sub command
The new sub-command writes a string representation of the
current log level to the output variable given to the
sub-command.

Given that the log-level might be set either via the --log-level
command line option or via the CMAKE_MESSAGE_LOG_LEVEL
cache / regular variables, the priority for each of the log level
sources is as follows, with the first one being the highest:
1) --log-level
2) CMAKE_MESSAGE_LOG_LEVEL regular variable
3) CMAKE_MESSAGE_LOG_LEVEL cache variable
4) default log level (STATUS)

Fixes: #23572
2022-06-28 16:03:22 +02:00
Brad King
6760180f57 Merge topic 'findvulkan-volk'
f849e33452 FindVulkan: Add 'volk' component

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7382
2022-06-23 09:29:59 -04:00
Aiden Lambert
f849e33452 FindVulkan: Add 'volk' component 2022-06-22 09:46:46 -04:00
Sam V
927e091949 FindOpenAL: Add imported target
Fixes: #20026
2022-06-22 09:16:19 -04:00
Da Quexian
9680b3b279 Add EXPORT_NO_SYSTEM target property, deprecate IMPORTED_NO_SYSTEM
Issue: #18040

Signed-off-by: Da Quexian <daquexian566@gmail.com>
2022-06-17 22:38:07 +08:00
Brad King
dd8befd9d3 Merge topic 'add_SYSTEM_prop'
69beee5314 Add SYSTEM target property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7308
2022-06-16 09:00:45 -04:00
Brad King
7eddfed10f Merge topic 'xcode-launch-mode'
a1a0ae3ad4 Xcode: Add Xcode SCHEME control for 'Launch' control

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7355
2022-06-16 08:59:51 -04:00
Harry Mallon
a1a0ae3ad4 Xcode: Add Xcode SCHEME control for 'Launch' control 2022-06-15 19:02:56 +01:00
Da Quexian
69beee5314 Add SYSTEM target property
If it is ON, treat INTERFACE_INCLUDE_DIRECTORIES as system include directories.

Issue: #18040

Signed-off-by: Da Quexian <daquexian566@gmail.com>
2022-06-16 00:25:27 +08:00
Marc Chevrier
f3b5a7d6df find_(program,library,file,path): add validation function
Fixes: #23603
2022-06-14 16:17:46 -04:00
Brad King
2121fc2de7 Begin post-3.24 development 2022-06-08 12:03:15 -04:00
Brad King
c72f3fca56 Help: Drop development topic notes to prepare release
Release versions do not have the development topic section of
the CMake Release Notes index page.
2022-06-08 11:58:33 -04:00
Brad King
a3fc469882 Help: Consolidate 3.24 release notes
Run the `Utilities/Release/consolidate-relnotes.bash` script to move
notes from `Help/release/dev/*` into `Help/release/3.24.rst`.
2022-06-07 15:05:57 -04:00
Marc Chevrier
be4b9e10af if command: Add PATH_EQUAL operator 2022-06-03 19:31:36 +02:00
Marc Chevrier
4d1883df11 Genex-PATH_EQUAL: path comparison
To complete issue #23498
2022-06-01 15:28:54 +02:00
Marc Chevrier
f11e66670b Genex-PATH: path handling
Fixes: #23498
2022-05-31 15:39:51 +02:00
Brad King
49e31d9c55 Merge topic 'msvc-compilers-default-to-ZI'
5fcadc481e MSVC: Default to -ZI instead of /Zi for x86 and x64

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7295
2022-05-27 09:10:43 -04:00
Brad King
9019537670 MSYS/MinGW Makfiles: Select the compiler occurring first in PATH
Extend the change from commit e01990999a (Ninja: On Windows, select the
compiler occurring first in PATH, 2020-04-17, v3.18.0-rc1~291^2) to
apply to the MSYS/MinGW Makefiles generators too.  Drop the implied
`gcc` and `g++` default compilers.  This allows MinGW/Clang environments
to work out of the box.

Inspired-by: Mehdi Chinoune <mehdi.chinoune@hotmail.com>
Fixes: #23542
2022-05-26 13:22:58 -04:00
Brad King
d45b4f59a4 Merge topic 'verify-interface-header-sets-list'
aadaac7f6d VERIFY_INTERFACE_HEADER_SETS: Add property for list of header sets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7298
2022-05-26 09:12:21 -04:00
Glen Chung
5fcadc481e MSVC: Default to -ZI instead of /Zi for x86 and x64
Add a policy for compatibility.

For more information, see [1].

[1] https://docs.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format?view=msvc-170

Fixes: #10189
2022-05-26 09:06:01 -04:00
Brad King
711496b672 Merge topic 'LLVMFlang-compiler'
85749766df LLVMFlang: Add support for LLVM Flang

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7246
2022-05-26 08:52:02 -04:00