summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
Commit message (Collapse)AuthorAgeFilesLines
* clang-tidy: modernize-use-autoRegina Pfeifer2019-09-101-8/+5
| | | | | | 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: modernize-return-braced-init-listRegina Pfeifer2019-09-061-5/+3
|
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-041-1/+1
| | | | | | | | Automate the conversion with perl -i -0pe 's/typedef ([^;]*) ([^ ]+);/using $2 = $1;/g' then manually fix a few places.
* Merge topic 'cmake-initial-cache-dirs'Brad King2019-08-271-10/+7
|\ | | | | | | | | | | | | 4ca0526f8a cmake: Pass -S and -B into PreLoad.cmake and -C scripts Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3709
| * cmake: Pass -S and -B into PreLoad.cmake and -C scriptsPeter Waller2019-08-271-10/+7
| | | | | | | | | | | | | | Before this, it was not possible to see what the source or build directories were set to on the command line. Fixes: #19619
* | Merge topic 'source_sweep_ostringstream_single'Brad King2019-08-261-13/+7
|\ \ | | | | | | | | | | | | | | | | | | 3b2b02825d Source sweep: Replace std::ostringstream when used with a single append Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3726
| * | Source sweep: Replace std::ostringstream when used with a single appendSebastian Holtermann2019-08-231-13/+7
| | | | | | | | | | | | | | | | | | | | | This replaces `std::ostringstream`, when it is written to only once. If the single written argument was numeric, `std::to_string` is used instead. Otherwise, the single written argument is used directly instead of the `std::ostringstream::str()` invocation.
* | | Source sweep: Replace cmExpandList with the shorter cmExpandedListSebastian Holtermann2019-08-231-6/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | This replaces the code pattern ``` std::vector<std::string> args; cmExpandList(valueStr, args, ...) ``` with ``` std::vector<std::string> args = cmExpandedList(valueStr, ...) ```
* | Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-73/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)`
* | Merge topic 'isolate-declarations'Brad King2019-08-221-2/+4
|\ \ | | | | | | | | | | | | | | | | | | d331021255 clang-tidy: isolate declarations for readability Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3704
| * | clang-tidy: isolate declarations for readabilityRegina Pfeifer2019-08-201-2/+4
| |/
* | Merge topic 'cm-contains'Brad King2019-08-211-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | 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
| * cmAlgorithms: Add cmContainsRegina Pfeifer2019-08-191-1/+1
| | | | | | | | Also, use the new function where applicable.
* | Merge topic 'trace-redirect'Brad King2019-08-201-0/+20
|\ \ | | | | | | | | | | | | | | | | | | 3c94069660 Add --trace-redirect parameter to redirect trace output to a file Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3645
| * | Add --trace-redirect parameter to redirect trace output to a fileIgor Ivanov2019-08-101-0/+20
| | |
* | | Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-13/+9
| |/ |/| | | | | | | | | | | | | | | This replaces invocations of - `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn` - `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND` - `cmSystemTools::IsOn` with `cmIsOn` - `cmSystemTools::IsOff` with `cmIsOff`
* | Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-7/+7
| |
* | Merge topic 'cmRemoveQuotes'Kyle Edwards2019-08-131-8/+0
|\ \ | | | | | | | | | | | | | | | | | | 27090096ef cmStringAlgorithms: Add cmRemoveQuotes Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3665
| * | cmStringAlgorithms: Add cmRemoveQuotesSebastian Holtermann2019-08-091-8/+0
| | | | | | | | | | | | | | | - Add `cmRemoveQuotes` function to cmStringAlgorithms - Remove unused removeQuotes inline functions
* | | Refactor: Convert all instances of CMAKE_BUILD_WITH_CMAKE to CMAKE_BOOTSTRAPKitware Robot2019-08-091-19/+19
|/ /
* | clang-tidy: Enable performance-inefficient-string-concatenationSebastian Holtermann2019-08-051-2/+2
|/ | | | | | | Enables the clang-tidy test performance-inefficient-string-concatenation and replaces all inefficient string concatenations with `cmStrCat`. Closes: #19555
* cmake: Initialize booleans at declaration and cleanup constructorSebastian Holtermann2019-08-031-40/+17
|
* Cleanups: Use cmHas{Prefix,Suffix} instead of String{Starts,Ends}WithSebastian Holtermann2019-08-011-2/+1
|
* Merge topic 'clang-tidy-8'Brad King2019-07-311-1/+1
|\ | | | | | | | | | | | | 4af094c8df clang-tidy: Blacklist violations for version 8 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3627
| * clang-tidy: Blacklist violations for version 8Regina Pfeifer2019-07-301-1/+1
| | | | | | | | | | Check the codebase with clang-tidy version 8, fix the low hanging fruits, blacklist the rest.
* | cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.hSebastian Holtermann2019-07-291-0/+1
|/ | | | | This adds the `cmStringAlgorithms.h` header and moves all string functions from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
* Introduce memory management helper: cm_memory.hxxMarc Chevrier2019-07-141-1/+2
|
* IWYU: Fix handling of <memory> standard headerBrad King2019-07-101-1/+1
| | | | | | | | An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `<memory>` inclusions to follow the now-correct IWYU lints.
* cmake: Refactor file extension list setupSebastian Holtermann2019-07-041-38/+33
| | | | | Refactor the file extention list setup in cmake.h/cxx and add file extensions lists for Cuda and Fortran.
* modermize: replace some raw pointers w/ `unique_ptr`Alex Turbov2019-06-241-18/+7
|
* cmake: Teach -E capabilities to report supported fileapi requestsBrad King2019-06-071-0/+1
| | | | Fixes: #19339
* cmake: Simplify implementation of -E capabilitiesBrad King2019-06-071-4/+4
| | | | | | The `cmake -E capabilities` command-line tool is implemented only in a full-featured (non-bootstrap) CMake, and server mode is now always available in this case.
* Use cmAppend to append ranges to std::vector instancesSebastian Holtermann2019-05-231-4/+1
|
* Merge topic 'default-generator-env'Brad King2019-05-221-6/+61
|\ | | | | | | | | | | | | | | | | d0f0ba0f7a Tests: Add environment generator tests a48ce8f4bf Help: Add documentation for default generator environment variables 083cf7e8a2 cmake: Allow default generator to be set by environment variables Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3218
| * cmake: Allow default generator to be set by environment variablesEicke Herbertz2019-05-161-6/+61
| | | | | | | | | | | | | | | | | | | | When there is no Generator available in the Cache, this will read CMAKE_GENERATOR from environment before using the CMake platform default. If CMAKE_GENERATOR is empty, use the platform default. If a environment default generator is specified, subsequent variables CMAKE_GENERATOR_(INSTANCE,PLATFORM,TOOLSET) are also evaluated in the same way.
* | Source: change parameters to std::stringVitaly Stakhovsky2019-05-191-7/+6
| |
* | cmake: Display error if generate step failsKyle Edwards2019-05-131-0/+5
| |
* | message(): Add support for log levelsAlex Turbov2019-04-281-0/+27
|/ | | | | Relates: #18943 Co-Authored-By: Craig Scott <craig.scott@crascit.com>
* cmake: Fix missed `return` statement when CLI errors foundAlex Turbov2019-03-311-2/+3
|
* Merge topic 'ghs-linux'Brad King2019-03-221-2/+7
|\ | | | | | | | | | | | | | | | | | | | | 2c43fb5be3 FindThreads: Fix pthread library check in GHS Multi Generator 0404efe786 GHS: Add support for GHS Multi Generator in Linux 2060a1445c Tests: Fix file name case in GHS object library test ddad70c8a4 Tests: Run GHS tests in a separate ctest process f7dca1fc97 GHS: Fix include-what-you-use and clang-tidy diagnostics Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3006
| * GHS: Add support for GHS Multi Generator in LinuxNaren Manimohan2019-03-211-2/+7
| |
* | cmake: Use scopes to limit temporary object lifetimeSebastian Holtermann2019-03-181-14/+16
| |
* | Rename cmFileTimeCache::FileTimeCompare to cmFileTimeCache::CompareSebastian Holtermann2019-03-181-5/+4
| |
* | Substitute FileComparison in variable names with FileTimeCacheSebastian Holtermann2019-03-181-6/+6
| |
* | Rename cmFileTimeComparison to cmFileTimeCacheSebastian Holtermann2019-03-181-3/+3
|/ | | | | The name `cmFileTimeCache` reflects the functionality of the class more appropriately.
* Merge topic 'vs-no-stamp-messages'Brad King2019-03-061-15/+7
|\ | | | | | | | | | | | | 67428e9025 VS: Do not print message when generate.stamp is up-to-date. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3054
| * VS: Do not print message when generate.stamp is up-to-date.Olli Kallioinen2019-03-051-15/+7
| | | | | | | | Fixes: #16783
* | cmake: Teach --build mode to support multiple targetsBartosz Kosiorek2019-03-051-4/+4
|/ | | | Fixes: #16136
* cmSystemTools::Error: consolidate parameters into single std::stringVitaly Stakhovsky2019-02-201-10/+9
|
* Merge topic 'modernize-for-loops-c-arrays'Brad King2019-02-191-12/+11
|\ | | | | | | | | | | | | 706b93fa55 Modernize: C-arrays and loops over them Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2951