1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-06-12 16:52:44 +08:00

241 Commits

Author SHA1 Message Date
Brad King
5d93c421f1 HIP: Populate CMAKE_HIP_KNOWN_FEATURES global property
Fixes: #26013
2024-05-28 14:36:42 -04:00
Brad King
6010e007c7 cmState: Add method to check for the Borland Makefiles generator 2024-05-14 12:52:08 -04:00
Brad King
388f7bc11b Merge topic 'fileapi-provide-glob-dependent'
6116bcb066 fileapi: Add CONFIGURE_DEPENDS glob info to cmakeFiles object
f578515d02 cmGlobCacheEntry: Add helper to carry CONFIGURE_DEPENDS glob cache arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9348
2024-03-21 09:29:00 -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
Arctic Lampyrid
f578515d02
cmGlobCacheEntry: Add helper to carry CONFIGURE_DEPENDS glob cache arguments 2024-03-20 02:30:53 +08:00
Vitaly Stakhovsky
1a49b439a5 Source: Use cmValue::IsOn and IsOff
Speed up a bit by calling members directly.
2024-03-17 19:05:37 -04:00
Marc Chevrier
255c2e1430 Ninja: LINK_OPTIONS property should support newlines
Fixes: #25513
2023-12-20 17:05:09 +01:00
Kyle Edwards
8313d26198 cmState::AddDisallowedCommand(): Allow additional warning info 2023-10-27 09:42:53 -04:00
Marc Chevrier
45f17e5a85 cmList: Add container conversion to string 2023-06-22 15:44:17 +02:00
Marc Chevrier
4fc322bab4 AddCacheEntry: Suppress raw pointer usage 2023-05-30 16:41:59 +02:00
Marc Chevrier
aa5fed5052 SetProperty: suppress raw pointer usage 2023-05-26 14:48:22 +02:00
Meekness Adesina
8c066045ec Source: Improve some code readability and efficiency
- Replace raw loop with STL find algorithm for improved efficiency
- Update functions for enhanced readability and understandability
2023-05-19 09:56:07 -04:00
Brad King
eee0c6ec0d Merge topic 'block-var-scope'
96ddcbee60 cmState: Clarify name of member tracking the active scope in a directory
cb53d9309e block: Fix variable scope protection from modification by subdirectories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7885
2022-11-08 09:00:14 -05:00
Brad King
96ddcbee60 cmState: Clarify name of member tracking the active scope in a directory
The `DirectoryEnd` member added by commit 52dbe654de (cmState: Record
the end position of each directory., 2015-08-01, v3.4.0-rc1~251^2~1)
actually tracks the current top-most scope in a directory's stack.  This
is evidenced by the use case in commit 3f4e5e8c3d (cmState: Return end
snapshot for GetBuildsystemDirectoryParent., 2015-09-01,
v3.4.0-rc1~100^2~1).  Rename the member to `CurrentScope` to clarify
this role.
2022-11-07 14:36:46 -05:00
Brad King
cb53d9309e block: Fix variable scope protection from modification by subdirectories
When `cmStateSnapshot::RaiseScope` raises a variable in to a parent
directory scope, it uses `GetBuildsystemDirectoryParent` to find the
current top-most scope on the directory's stack.  Since commit 3f4e5e8c3d
(cmState: Return end snapshot for GetBuildsystemDirectoryParent.,
2015-09-01, v3.4.0-rc1~100^2~1), that depends on the `DirectoryEnd`
field in the directory's state.  However, when variable-only scopes were
added by commit 6954c8936f (cmState: Add a VariableScope snapshot type.,
2015-08-01, v3.4.0-rc1~179^2~1), we neglected to account for the
addition of that field by commit 52dbe654de (cmState: Record the end
position of each directory., 2015-08-01, v3.4.0-rc1~251^2~1).

Prior to commit 44a2f3f332 (Add new flow-control commands for variables
and policies scopes management, 2022-08-05, v3.25.0-rc1~257^2) this
problem went unnoticed because there was no way to have a variable scope
at the top of a directory's stack while processing a subdirectory. Now
the `block()/endblock()` commands enable the behavior, so fix tracking
of a variable scope as the top-most scope in a directory.

Fixes: #24138
2022-11-07 14:24:24 -05:00
Juan Ramos
3c3bce133d cmake: Honor CMAKE_GENERATOR env var in --help output 2022-10-20 19:53:14 -06:00
FeRD (Frank Dana)
98a10290a8 cmSystemTools: Fix 'ErrorOccurred' spelling
Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to
's_ErrorOccurred' and 's_FatalErrorOccurred', respectively.

Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and
'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
2022-06-13 09:05:24 -04:00
Craig Scott
2aa83fa15b Dependency providers: Add find_package and FetchContent support
Fixes: #22619
2022-05-25 08:46:18 +10:00
Kyle Edwards
fce24e4f10 define_property(): Add INITIALIZE_FROM_VARIABLE argument
Fixes: #20698
2022-01-20 09:05:35 -05:00
Brad King
3d378541bb cmMessenger: Adopt backtrace printing functions
Move backtrace printing functions from `cmListFileBacktrace` over to
`cmMessenger`, their primary caller.  Thread `cmMessenger` instances
through APIs needed to update other call sites.
2021-12-08 10:03:48 -05:00
Sean McBride
37859e3244 Source: Fix clang -Wimplicit-fallthrough warnings 2021-09-28 10:53:54 -04:00
Marc Chevrier
cc56dc7468 Rename cmProp in cmValue 2021-09-21 17:14:04 +02:00
Marc Chevrier
9488f8a7b7 Merge topic 'enh-AddCacheEntry-accepts-new-types'
f84193292c Use new AddCacheEntry signatures
3c2e58eeb8 AddCacheEntry accept cmProp or std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6495
2021-09-10 09:47:39 -04:00
Marc Chevrier
3c2e58eeb8 AddCacheEntry accept cmProp or std::string 2021-09-10 15:45:51 +02:00
Kyle Edwards
ab94c369c9 Refactor: Convert parallel string/backtrace vectors to BT vectors 2021-09-03 09:52:14 -04:00
Marc Chevrier
6dfa581bab Enhancement: SetProperty accept cmProp or std::string
Methods SetProperty of classes cmPropertyMap, cmStateDirectory
and cmMakefile accept now cmProp or std::string as argument.
2021-08-25 10:09:02 +02:00
Marc Chevrier
e5cd39ca80 cmProp: refactoring: transform alias in class
To handle safely the values used by CMake variables and properties,
introduce the class cmProp as a replacement from the simple pointer
to std::string instance.
2021-08-08 16:19:08 +02:00
Brad King
6c440ea3ce cmake: Model normal and try-compile project kinds explicitly
Construct with the project kind instead of mutating state after
construction.
2021-07-12 12:21:52 -04:00
Brad King
2065bd73cb cmState: Construct with mode 2021-07-12 12:21:44 -04:00
Brad King
1aa16906e6 Merge topic 'fix-flow-control-override'
c017098d4d CMake: Allow override of unexpected non-flow-control commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6232
2021-06-17 06:47:42 -04:00
Kyle Edwards
c017098d4d CMake: Allow override of unexpected non-flow-control commands
Fixes: #22310
2021-06-16 10:39:39 -04:00
Brad King
ea6d338ea1 cmState: Record imported target names in each directory
Model the change after commit 089868a244 (cmState: Record buildsystem
target names in each directory, 2016-09-16, v3.7.0-rc1~79^2~3).
2021-06-10 15:41:18 -04:00
Ben Boeckel
ef935b17ab clang-tidy: fix readability-use-anyofallof warnings 2021-01-27 08:54:18 -05:00
Ben Boeckel
cdfc4e3195 clang-tidy: fix readability-qualified-auto warnings 2021-01-27 08:45:45 -05:00
Oleksandr Koval
209daa20b2 Code style: add missed explicit 'this->'
CMake uses explicit 'this->' style. Using custom clang-tidy check we can
detect and fix places where 'this->' was missed.
2021-01-05 14:32:36 +02:00
Craig Scott
105ef112c9 Merge topic 'cmake-presets-path-arg'
b7d7eca66d CMakePresets.json: Rework how --preset argument is handled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5416
2020-10-27 07:33:46 -04:00
Kyle Edwards
b7d7eca66d CMakePresets.json: Rework how --preset argument is handled
If a path argument with no -S or -B leads to a cache directory,
use that directory as the binary directory. Otherwise, use the
binary directory from the preset.

Fixes: #21311
2020-10-26 22:32:45 +11:00
Kyle Edwards
8aee7fdb32 cmState: Prohibit override of flow control commands 2020-10-22 17:04:31 -04:00
Brad King
e8b0359a43 cmake_language: Add signature to DEFER calls to later times
Fixes: #19575
2020-09-29 17:12:33 -04:00
Vitaly Stakhovsky
11425041f0 cmMakefile::GetDefinition: return cmProp 2020-09-02 07:27:32 -04:00
Vitaly Stakhovsky
7156911242 cmIsOn: add overload accepting const std::string* 2020-07-14 08:22:24 -04:00
Vitaly Stakhovsky
b36d1bdd9d Single location for cmProp typedef 2020-06-01 08:54:20 -04:00
Tushar Maheshwari
6728f0fa85 cmPropertyDefinitionMap: simplify and shorten 2020-05-15 18:58:02 +05:30
Vitaly Stakhovsky
e267c3fddf cmState::GetInitializedCacheValue: return cmProp
cmProp alias is used; no actual change in type
2020-04-30 10:45:45 -04:00
Tushar Maheshwari
80d8b20351 cmCacheManager: Cleanup CacheIterator interface
- Expose required functionality from CacheEntry.
- Modify usage in cmState member functions.
- Remove cmState access to CacheEntry members.
2020-04-18 18:35:57 +05:30
Vitaly Stakhovsky
3eec21a01c cmTarget::GetProperty: return cmProp 2020-03-30 15:00:14 -04:00
Brad King
a6611577c3 Merge topic 'cmprop-getglobalprop'
c84cf42897 cmState::GetGlobalProperty: return cmProp

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4521
2020-03-27 07:50:28 -04:00
Vitaly Stakhovsky
a7f2ff16a4 cmState::GetCacheEntryProperty: return cmProp 2020-03-25 14:46:52 -04:00
Brad King
952fbd9ee5 Merge topic 'cmprop-state'
ef408dd232 cmState::GetTargetTypeName: return type is *cmProp

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4505
2020-03-25 09:25:26 -04:00
Vitaly Stakhovsky
c84cf42897 cmState::GetGlobalProperty: return cmProp 2020-03-25 09:10:46 -04:00