| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many custom commands are created by CMake itself rather than by
the user. These custom commands should always have their policies
set to NEW, and user-created custom commands should have their
policy values set only from the state snapshot. In addition, we
want to genericize the mechanism of recording a policy at the time
of custom command creation.
Add a CM_FOR_EACH_CUSTOM_COMMAND_POLICY macro to genericize
custom command policies. Use this to define all custom command
policies. Make all such policies NEW instead of WARN by default.
Remove individual policy modifier methods and add a single method
that records relevant values from a cmStateSnapshot. Remove the
no longer needed explicit policy settings from synthesized custom
commands.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Before, a documentation entry was in/out parameter.
Now it's a normal return value.
This also makes possible to eliminate defaulted default ctor
for `cmDocumentationEntry` for C++ 11.
Also, simplify `cmake::AppendGlobalGeneratorsDocumentation()`.
|
|
|
|
| |
Fixes: 23435
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove unecessary logic for selecting gbuild
-- CMake defaults to the Cache entry
* Support building multiple targets
* Fix error when ctest passes in a vector potentially containing
an empty string.
-- At minimum build the ALL_BUILD project, never just the Top Project.
* Add verbose support
* There can only be one top-level project per directory because the
project() command can only be used once per directory. Multiple calls
of project() only use the last invocation.
|
|
|
|
|
|
|
|
| |
The top level project and the target projects are all in the same
directory so they are easier to find and looks nicer in the GUI.
All of the ancillary project files are located in the target
subdirectory.
|
|
|
|
|
|
|
|
| |
Use a Custom Target for ALL_BUILD instead of special code.
This also changes the name from <project>.ALL_BUILD.tgt to
ALL_BUILD.tgt. The name change is part of standardizing the
CMakePredefinedTargets names.
|
|
|
|
|
| |
Create a Custom Target that will re-run CMake on user demand if any of
the CMake input files have changed.
|
|
|
|
|
|
| |
gbuild command line is "-parallel[=n]".
Fixes: #23252
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update generator to use the current variable definition,
not the CACHE definition.
* Avoid overwriting toolchain variables and avoid developer warnings
when setting up the GHS variables.
-- A cache entry is only required when:
a) The toolchain uses set( CACHE ) to set the variable
b) A -D or preset value was used to set the variable
The cache entry is required so that the TYPE gets set properly.
-- Avoid the Policy CMP0126 warnings:
setting cache variable when normal variable exists
* Move GHS_PRIMARY_TARGET back into area so non-GHS generator
toolchain file can trigger the OS search.
|
|
|
|
|
|
|
|
|
|
| |
Selection of a BSP only needs to be performed if not set by user.
Remove all the logic for printing error and status messages about BSP
selection. These messages also breaks CMake tests.
NOTE: If BSP selection fails then the compiler checks will result in
a build error. The build error will report that the BSP does not exist.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Selection of an RTOS only needs to be performed if not set by user.
Avoid CMake developer warnings for setting GHS_OS_DIR multiple times.
Instead only set it once after searching has been performed.
Remove all the logic for printing error and status messages about RTOS
selection. This was broken and reporting incorrect messages. These
messages also breaks CMake tests.
NOTE: If RTOS selection fails then the compiler checks will result in
a build error. The build error will report that the RTOS
"GHS_OS_DIR-NOT-SPECIFIED" does not exist.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-- Ensure that GHS_TOOLSET_ROOT is used as a path
* Converts directory path slashes to CMake style
-- Use ComparePath() to properly check for path changes of build tool
* Accounts for Windows file-system case insensitivity.
-- Don't print message "defaulting" messages (this causes CMake test failures)
-- Don't force update CMAKE_GENERATOR_TOOLSET back into cache when `-T`
is not used on initial configure. This change avoids an unnessary
error message when accidentally using `-T` in subsequent runs but the same
tools are always used.
-- Use IssueMessage() for error messages.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes to ``-A`` handling:
* Don't force CMAKE_GENERATOR_PLATFORM into cache when using default
value (breaks using CMake presets).
* Don't print message when using default value (breaks CMake tests).
Changes to ``GHS_PRIMARY_TARGET`` handling:
* Add as a cache variable so its known to GUI
* Don't always include``GHS_TARGET_PLATFORM``, it's only needed if
``GHS_PRIMARY_TARGET`` wasn't set by the user.
* Set ``GHS_PRIMARY_TARGET`` during platform selection instead of when
a language is enabled. By performing this sooner
``GHS_TARGET_PLATFORM`` is not always required to be set into cache.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Our call to `MaybeConvertToRelativePath` uses paths that always pass the
"maybe" checks. Use `ForceToRelativePath` directly.
|
| |
|
|
|
|
|
| |
CMake uses explicit 'this->' style. Using custom clang-tidy check we can
detect and fix places where 'this->' was missed.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Add a `cmGeneratorTarget::IsInBuildSystem` helper method to tell
generators whether a target should participate in the generated build
system.
|
|
|
|
|
|
|
|
|
| |
This allows for setting EXCLUDE_FROM_ALL, conditional on the build
configuration. However, only the Ninja Multi-Config generator supports
different property values per config. All other multi-config
generators will yield an error in that situation.
Fixes: #20923
|
|\
| |
| |
| |
| |
| |
| | |
eaad8072ee cmNonempty: Convenience inlines to check for non-empty string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5017
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `std::endl` manipulator, except inserting `\n` character, also
performs `os.flush()`, which may lead to undesired effects (like
disk I/O in the middle of forming data strings). For the
`std::stringstream` it also has no meaning.
* replace multiple `operator<<` calls on a string literal w/
the only call and the only (bigger) string literal;
* replace one character string literal used in `operator<<`
w/ a char literal.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Extend the `cmGlobalGenerator::SetGeneratorToolset` signature to
indicate when it is called from `cmake::build`.
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces the code pattern
```
std::vector<std::string> args;
cmExpandList(valueStr, args, ...)
```
with
```
std::vector<std::string> args = cmExpandedList(valueStr, ...)
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is generated by a python script that uses regular expressions to
search for string concatenation patterns of the kind
```
std::string str = <ARG0>;
str += <ARG1>;
str += <ARG2>;
...
```
and replaces them with a single `cmStrCat` call
```
std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...);
```
If any `<ARGX>` is itself a concatenated string of the kind
```
a + b + c + ...;
```
then `<ARGX>` is split into multiple arguments for the `cmStrCat` call.
If there's a sequence of literals in the `<ARGX>`, then all literals in the
sequence are concatenated and merged into a single literal argument for
the `cmStrCat` call.
Single character strings are converted to single char arguments for
the `cmStrCat` call.
`std::to_string(...)` wrappings are removed from `cmStrCat` arguments,
because it supports numeric types as well as string types.
`arg.substr(x)` arguments to `cmStrCat` are replaced with
`cm::string_view(arg).substr(x)`
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
2dfc52675c cmAlgorithms: Add cmContains
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sebastian Holtermann <sebholt@web.de>
Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
Merge-request: !3700
|
| |
| |
| |
| | |
Also, use the new function where applicable.
|
|/
|
|
|
|
|
|
|
| |
This replaces invocations of
- `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn`
- `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND`
- `cmSystemTools::IsOn` with `cmIsOn`
- `cmSystemTools::IsOff` with `cmIsOff`
|
| |
|
|
|
|
|
|
|
| |
Enables the clang-tidy test performance-inefficient-string-concatenation
and replaces all inefficient string concatenations with `cmStrCat`.
Closes: #19555
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes `cmMakefile::AddDefinition` to take a `cm::string_view` as value
argument instead of a `const char *`.
Benefits are:
- `std::string` can be passed to `cmMakefile::AddDefinition` directly without
the `c_str()` plus string length recomputation fallback.
- Lengths of literals passed to `cmMakefile::AddDefinition` can be computed at
compile time.
In various sources uses of `cmMakefile::AddDefinition` are adapted to avoid
`std::string::c_str` calls and the `std::string` is passed directly.
Uses of `cmMakefile::AddDefinition`, where a `nullptr` `const char*` might
be passed to `cmMakefile::AddDefinition` are extended with `nullptr` checks.
|
|
|
|
|
|
|
|
|
| |
-- When using default values for the external project forward GHS platform
variables so that the external project builds with the same tools as
the original project.
-- Fix issue with bad top level project when GHS_PRIMARY_TARGET is set but has
no value. In this case treat it as unset and use default value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-- Do not use reference projects, use build hierarchy instead.
gbuild has three parallel levels:
* low -- Parallelizes compiling source files within a single project (.gpj)
file when safe to do so.
* medium -- Parallelizes processing files within a single linked output when
safe to do so.
* high [default] -- Parallelizes processing files whenever safe to do so,
including linking task.
Testing showed that for some combinations of gbuild / MULTI there are issues
with building a project that uses references to target project files along with
using {nobuild} option.
Sometimes the archiving of a library and linking of an executable were
happening in parallel and the build would fail when linking because the
archive wasn't complete.
This behavior was also inconsistent when running the build from MULTI and
from the command line with gbuild. In some cases MULTI did not parallelize
archiving and linking, but gbuild performed these actions in parallel.
The parallel build issue was not seen when using a build hierarchy where the
project listed the project files normally instead of using a reference link.
The other option was to add the -parallel_level=medium to the command line
when using "cmake --build" but this wouldn't fix the issue if gbuild itself
was used to and the user might not be aware of the extra option used by cmake.
|