summaryrefslogtreecommitdiffstats
path: root/Source/cmCPluginAPI.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-2/+2
| | | | | 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.
* cmMakefile: Remove AddUtilityCommand overload without byproductsDaniel Eiband2019-09-261-1/+3
|
* cmMakefile: Move enumerations into new headerDaniel Eiband2019-09-261-5/+5
| | | | The enumerations will also be used in cmLocalGenerator.
* cmSourceFile: Remove non-const GetProperties accessorDaniel Eiband2019-09-211-1/+1
| | | | | | Manipulating the property map of cmSourceFile directly may invalidate the class invariant of the cached value IsGenerated. Provide the setter SetProperties which also updates IsGenerated.
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-1/+1
|
* clang-tidy: modernize-use-autoRegina Pfeifer2019-09-101-1/+1
| | | | | | 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.
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-031-3/+3
|
* cmSourceFile: Rename mutating GetFullPath() overloadDaniel Eiband2019-08-291-1/+1
| | | | Rename mutating GetFullPath() overload to ResolveFullPath().
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)`
* Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-1/+1
| | | | | | | | | This replaces invocations of - `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn` - `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND` - `cmSystemTools::IsOn` with `cmIsOn` - `cmSystemTools::IsOff` with `cmIsOff`
* cmMakefile: Let AddDefinition accept a value as cm::string_viewSebastian Holtermann2019-07-241-2/+4
| | | | | | | | | | | | | | | | 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.
* cmCommand: deprecate functions GetMakefile and SetErrorDaniel Pfeifer2019-07-211-1/+1
| | | | | | | | | Replace the members for the Makefile and the Error with a cmExecutionStatus. Re-implement GetMakefile and SetError based on that. Both functions should be called directly on the cmExecutionStatus that is passed to InitialPass. This will help us make all Commands immutable and remove the need for cloning.
* cmSystemTools::Error(): remove const char* overloadVitaly Stakhovsky2019-05-221-2/+2
|
* Delete some default constructors and assignment operatorsAlbert Astals Cid2019-02-151-0/+4
| | | | | | They are unused, but if someone used them they would lead to problems since they would copy the internal raw pointers and the destructor would cause double delete
* Modernize: Use ranged for-loops when possibleArtur Ryt2019-02-071-14/+10
| | | | | | | Replaced most manual `const_iterator`-based loops and some reverse-iterator loops with range loops. Fixes: #18858
* Merge topic 'tidy-use-equals-default'Brad King2019-01-291-1/+0
|\ | | | | | | | | | | | | | | | | 094f01d0f0 cleanup: Prefer compiler provided special member functions 55671b41d2 clang-tidy: Use `= default` Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Brad King <brad.king@kitware.com> Merge-request: !2841
| * cleanup: Prefer compiler provided special member functionsRegina Pfeifer2019-01-251-1/+0
| |
| * clang-tidy: Use `= default`Regina Pfeifer2019-01-251-1/+1
| | | | | | | | | | | | Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and `Source/cmUVHandlePtr.h` where a few older compilers require a user-defined default constructor (with `{}`).
* | cmSystemTools::Error(): new overload accepting std::stringVitaly Stakhovsky2019-01-231-1/+1
|/
* clang-tidy: Use emplaceRegina Pfeifer2019-01-171-8/+7
|
* Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-2/+2
| | | | Reduce the number of files relying on `cmake.h`.
* Source: Fix various compiler warnings in Visual Studio 2017Bruno Manganelli2019-01-091-1/+1
|
* clang-tidy: Use default member initializationRegina Pfeifer2018-12-151-5/+2
|
* LINK_DIRECTORIES: Add new properties and commandsMarc Chevrier2018-09-251-1/+1
| | | | | | | | | | | | These new capabilities enable to manage link directories Two new properties: * target properties: LINK_DIRECTORIES and INTERFACE_LINK_DIRECTORIES One new command * target_link_directories(): to populate target properties Fixes: #17215
* cmMakefile: return directories as const std::string&Vitaly Stakhovsky2018-08-271-4/+4
|
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-4/+5
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* cmMakefile: Improve ExpandVariablesInString return typeVitaly Stakhovsky2018-05-011-1/+2
| | | | | Return `std::string const&` instead of a `const char*` that points into a string anyway. Update call sites accordingly.
* cmCPluginAPI: Remove a few unnecessary c_str() callsVitaly Stakhovsky2018-05-011-3/+3
|
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-2/+2
| | | | | | | | | | * Change some functions to take `std::string` instead of `const char*` in the following classes: `cmMakeFile`, `cmake`, `cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator` and a few others. * Greatly reduce using of `const char*` overloads for `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`. * Remove many redundant `c_str()` conversions throughout the code.
* server: return whether or not a target is generator providedJustin Goshi2017-11-201-2/+2
| | | | | | Some generators auto-generate targets. For example VS generators create the ALL_BUILD target. Add the ability to mark targets as generator provided and return that info through cmake-server codemodel.
* cmCPluginAPI: remove explicit casts to void*Rolf Eike Beer2017-09-231-5/+4
|
* cmCPluginAPI: do not check pointer before calling free()Rolf Eike Beer2017-09-231-3/+1
|
* cmCPluginAPI: use strdup() instead of open coding itRolf Eike Beer2017-09-231-17/+5
|
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-5/+4
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-11/+11
|
* clang-tidy: apply readability-redundant-control-flow fixesDaniel Pfeifer2016-12-121-1/+0
|
* cmCPluginAPI: Fix clang-tidy findingsDaniel Pfeifer2016-11-051-4/+4
|
* Separate compilation for commands included in cmCommandsDaniel Pfeifer2016-10-211-2/+4
|
* cmState: Move CacheEntryType enum to separate namespaceStephen Kelly2016-10-191-6/+6
| | | | Port dependent code to the change.
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-5/+5
|
* cmMakefile: Inline method into only remaining callerStephen Kelly2016-10-071-3/+32
|
* cmMakefile: Inline method into only callerStephen Kelly2016-10-071-1/+8
| | | | | cmMakefile should not have API which is only useful for deprecated systems like cmPluginAPI.
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* Avoid else after returnDaniel Pfeifer2016-09-161-9/+6
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-11/+11
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-358/+278
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Source: Stabilize include orderBrad King2016-04-291-1/+2
| | | | | Each source file has a logical first include file. Include it in an isolated block so that tools that sort includes do not move them.
* cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-141-1/+1
| | | | | | | Mostly automated: values=( "EXECUTABLE" "STATIC_LIBRARY" "SHARED_LIBRARY" "MODULE_LIBRARY" "OBJECT_LIBRARY" "UTILITY" "GLOBAL_TARGET" "INTERFACE_LIBRARY" "UNKNOWN_LIBRARY" "TargetType") for i in "${values[@]}"; do git grep -l cmTarget::$i | xargs sed -i "s|cmTarget::$i|cmState::$i|g"; done
* cmTarget: Move link type enum out.Stephen Kelly2015-10-141-3/+3
| | | | Remove a reason for generate time code to depend on the cmTarget header/type.
* Merge topic 'refactor-cache-manager'Brad King2015-10-121-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 79a309d7 cmState: Port away from cmake instance. e2eecae2 cmState: Move ParseCacheEntry from cmCacheManager. b5212c68 cmState: Add API for cache version. 95b0d761 cmState: Externalize logic to caller. 6f02034e cmState: Make AddCacheEntry method private. 435a2f3c cmCacheManager: Port away from cmake instance. 062ed22e cmState: Add cache file manipulation wrappers. a02e53eb Inline unary LoadCache. bec3487f cmCacheManager: Remove cmMakefile dependency. e0f740f1 Always cache entries through the cmake instance. 2afadb0d cmake: Port away from trivial cmCacheManager use. 3d8c299f cmake: Use existing cache API wrapper.