summaryrefslogtreecommitdiffstats
path: root/Source/cmCPluginAPI.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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.
| * cmState: Add API for cache version.Stephen Kelly2015-10-101-4/+4
| |
* | cmCPluginAPI: Inline code to get project name.Stephen Kelly2015-10-081-1/+1
|/
* cmMakefile: Use std::string in ProjectName API.Stephen Kelly2015-08-251-1/+3
|
* cmListFileArgument: Remove FilePath member.Stephen Kelly2015-06-211-2/+1
| | | | It is now unused.
* cmPropertyMap: Remove chaining logic.Stephen Kelly2015-06-071-8/+2
| | | | | | | The chaining logic doesn't belong to the container, and the CMakeInstance pointer doesn't need to be in cmPropertyMap. Size goes from 56 to 48 bytes with GNU libstdc++-5.1.
* cmPropertyMap: Remove scope parameter from API where not used.Stephen Kelly2015-06-071-3/+2
|
* cmMakefile: Port users of GetStart* methods to new names.Stephen Kelly2015-04-201-2/+2
|
* cmMakefile: Rename GetCurrent{Output,Binary}Directory.Stephen Kelly2015-04-201-1/+1
| | | | Match names used in CMake code.
* cmMakefile: Rename GetCurrent{,Source}Directory.Stephen Kelly2015-04-201-1/+1
| | | | Match the names used in cmake code.