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
Vitaly Stakhovsky
ef408dd232
cmState::GetTargetTypeName: return type is *cmProp
2020-03-19 08:55:03 -04:00
Vitaly Stakhovsky
0bf0e35e59
cmCacheManager::GetProperty: return cmProp
2020-03-19 08:18:42 -04:00
Vitaly Stakhovsky
bd89133543
cmState::GetCacheEntryValue: return cmProp
2020-03-17 12:09:20 -04:00
Brad King
d2e0b8bcfd
Merge topic 'prop_t'
...
60f57d0dcc
cmPropertyMap: Introduce cmProp as return type for GetProperty() functions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4471
2020-03-17 08:05:29 -04:00
Vitaly Stakhovsky
60f57d0dcc
cmPropertyMap: Introduce cmProp as return type for GetProperty() functions
...
Currently properties are usually stored internally as `std::string`.
However, family of GetProperty() functions return them as `const char *` using `c_str()`.
The proposed `cmProp`, typedef'ed as `const std::string *` will expose properties
more naturally.
2020-03-13 13:32:17 -04:00
Vitaly Stakhovsky
73d52a862b
cmPropertyDefinition: Construct directly in defined state
...
Move `cmPropertyDefinitionMap::DefineProperty` functionality
directly into the constructor to avoid an intermediate state.
2020-03-13 10:24:51 -04:00
Kyle Edwards
16a4ba5b31
Ninja Multi-Config: Use build.ninja if cmake --build has no --config
...
If cmake --build is called with no --config argument, and a
build.ninja file is available, use that instead of defaulting to the
Debug config.
2020-02-04 14:13:07 -05:00
Vitaly Stakhovsky
1398517f31
AppendProperty: convert value param to std::string
2020-01-25 10:37:00 -05:00
Vitaly Stakhovsky
93e9d10c7f
cmCacheManager: more members use std::string
2020-01-06 00:26:28 -05:00
Vitaly Stakhovsky
232d5bc333
cmState: more members will use std::string
2020-01-02 07:56:34 -05:00
Kyle Edwards
5a8a9f7229
Ninja: Add multi-config variant
...
Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
2019-12-13 10:51:46 -05:00
Robert Maynard
2467a2b318
CUDA: Add cuda meta-features (e.g. `cuda_std_11
`) support
2019-12-10 17:56:48 -05:00
Kitware Robot
ed98209ddc
Revise include order using clang-format-6.0
...
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`. Use `clang-format` version 6.0.
2019-10-01 12:26:36 -04:00
Daniel Eiband
61fdf326d8
cmState: Avoid lowering command name twice
...
The given command given to GetCommand is already lower case so we can use
GetCommandByExactName directly.
2019-09-21 12:56:05 +02:00
Marc Chevrier
c688b401d3
cmstd: Modernize CMake system headers
...
Provide a standardized way to handle the C++ "standard" headers
customized to be used with current CMake C++ standard constraints.
Offer under directory `cm` headers which can be used as direct
replacements of the standard ones. For example:
#include <cm/string_view>
can be used safely for CMake development in place of the `<string_view>`
standard header.
Fixes : #19491
2019-09-20 10:01:37 -04:00
Regina Pfeifer
f30523d090
clang-tidy: modernize-deprecated-headers
2019-09-16 10:11:13 -04:00
Regina Pfeifer
d25a5a7ec9
clang-tidy: modernize-use-auto
...
Set the MinTypeNameLength option to an impossibly high value in order
to limit the diagnostics to iterators. Leave new expressions and cast
expressions for later.
2019-09-10 22:21:41 +02:00
Regina Pfeifer
d63c1e4e6e
clang-tidy: modernize-return-braced-init-list
2019-09-06 22:27:39 +02:00
Gabor Bencze
11f35d340e
cmCommand refactor: remove unused AddDisallowedCommand overload
2019-08-26 11:48:47 -04:00
Brad King
de2c73d84f
Merge topic 'free-disallowed'
...
c55fb044a9
cmBuildNameCommand: Implement as free function
86bf1eef75
cmState: Support free function disallowed commands
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3688
2019-08-21 10:47:47 -04:00
Sebastian Holtermann
20e580be01
Source sweep: Use cmIsOn instead of cmSystemTools::IsOn
...
This replaces invocations of
- `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn`
- `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND`
- `cmSystemTools::IsOn` with `cmIsOn`
- `cmSystemTools::IsOff` with `cmIsOff`
2019-08-17 12:14:14 +02:00
Regina Pfeifer
c55fb044a9
cmBuildNameCommand: Implement as free function
2019-08-16 10:47:22 +02:00
Regina Pfeifer
86bf1eef75
cmState: Support free function disallowed commands
2019-08-13 13:48:10 +02:00
Sebastian Holtermann
f71f7ce3f0
cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.h
...
This adds the `cmStringAlgorithms.h` header and moves all string functions
from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
2019-07-29 21:13:56 +02:00
Sebastian Holtermann
9b5cc42531
cmDefinitions: Remove const char* based Set method
...
- Removes `cmDefinitions::Set` method overload that takes a `const char*`
value argument.
- Updates calls to `cmDefinitions::Set` to use the `cm::string_view` based
version instead.
2019-07-24 11:11:25 +02:00
Regina Pfeifer
dfaa87f1b3
cmState: Support BuiltinCommands as free functions
2019-07-22 15:27:56 +02:00
Regina Pfeifer
de77d355ac
cmState: Add scripted commands by value
2019-07-21 09:25:32 +02:00
Regina Pfeifer
0101ace131
cmUnexpectedCommand: Replace with lambda expression
2019-07-21 09:25:32 +02:00
Regina Pfeifer
015001aaf1
cmState: Hold commands by value
2019-07-21 09:25:32 +02:00